compile error on linux 32 bit

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!

If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.

We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

compile error on linux 32 bit

Post by drfrag »

Trying to compile on linux with a 32 bit Pentium M i get these errors. The cpu supports SSE2, what's going on? LZDoom compiles here.
The compiler is gcc 7.2. Kubuntu 18.04.

Code: Select all

[ 92%] Building CXX object src/CMakeFiles/zdoom.dir/utility/palette.cpp.o
cd /home/drfrag/DEV/nzdoom/gzdoom/release/src && /usr/bin/c++  -DARCH_IA32 -DDYN_OPENAL -DHAVE_FPU_CONTROL -DHAVE_MMX=1 -DNEED_STRUPR=1 -DNO_GTK -D__forceinline=inline -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -I/usr/include/SDL2 -I/usr/include/i386-linux-gnu -I/home/drfrag/DEV/nzdoom/gzdoom/libraries/bzip2 -I/home/drfrag/DEV/nzdoom/gzdoom/libraries/lzma/C -I/home/drfrag/DEV/nzdoom/gzdoom/libraries/jpeg -I/home/drfrag/DEV/nzdoom/gzdoom/libraries/zmusic -I/home/drfrag/DEV/nzdoom/gzdoom/release/src -I/home/drfrag/DEV/nzdoom/gzdoom/src/. -I/home/drfrag/DEV/nzdoom/gzdoom/src/g_statusbar -I/home/drfrag/DEV/nzdoom/gzdoom/src/console -I/home/drfrag/DEV/nzdoom/gzdoom/src/playsim -I/home/drfrag/DEV/nzdoom/gzdoom/src/playsim/bots -I/home/drfrag/DEV/nzdoom/gzdoom/src/playsim/mapthinkers -I/home/drfrag/DEV/nzdoom/gzdoom/src/gamedata -I/home/drfrag/DEV/nzdoom/gzdoom/src/gamedata/textures -I/home/drfrag/DEV/nzdoom/gzdoom/src/gamedata/fonts -I/home/drfrag/DEV/nzdoom/gzdoom/src/rendering -I/home/drfrag/DEV/nzdoom/gzdoom/src/rendering/2d -I/home/drfrag/DEV/nzdoom/gzdoom/src/r_data -I/home/drfrag/DEV/nzdoom/gzdoom/src/sound -I/home/drfrag/DEV/nzdoom/gzdoom/src/sound/music -I/home/drfrag/DEV/nzdoom/gzdoom/src/sound/backend -I/home/drfrag/DEV/nzdoom/gzdoom/src/xlat -I/home/drfrag/DEV/nzdoom/gzdoom/src/utility -I/home/drfrag/DEV/nzdoom/gzdoom/src/utility/nodebuilder -I/home/drfrag/DEV/nzdoom/gzdoom/src/scripting -I/home/drfrag/DEV/nzdoom/gzdoom/src/scripting/vm -I/home/drfrag/DEV/nzdoom/gzdoom/src/rendering/vulkan/thirdparty -I/home/drfrag/DEV/nzdoom/gzdoom/src/../libraries/gdtoa -I/home/drfrag/DEV/nzdoom/gzdoom/src/../libraries/glslang/glslang/Public -I/home/drfrag/DEV/nzdoom/gzdoom/src/../libraries/glslang/spirv -I/home/drfrag/DEV/nzdoom/gzdoom/release/libraries/gdtoa -I/home/drfrag/DEV/nzdoom/gzdoom/src/posix -I/home/drfrag/DEV/nzdoom/gzdoom/src/posix/sdl  -std=gnu++14 -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers -ffp-contract=off -Wno-unused-result   -ffp-contract=off -fPIE -fopenmp -fno-rtti -fomit-frame-pointer -O2 -g -DNDEBUG    -include g_pch.h -o CMakeFiles/zdoom.dir/utility/palette.cpp.o -c /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp: In function ‘void DoBlending_SSE2(const PalEntry*, PalEntry*, int, int, int, int, int)’:
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:137:14: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
  blending256 = _mm_set_epi32(0x100, 0x1000100, 0x100, 0x1000100);
  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:758:1: error: inlining failed in call to always_inline ‘__m128i _mm_setzero_si128()’: target specific option mismatch
 _mm_setzero_si128 (void)
 ^~~~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:149:7: note: called from here
  zero = _mm_setzero_si128();
  ~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1106:1: error: inlining failed in call to always_inline ‘__m128i _mm_subs_epu16(__m128i, __m128i)’: target specific option mismatch
 _mm_subs_epu16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:147:13: note: called from here
  blendalpha = _mm_subs_epu16(blending256, blendalpha); // one minus alpha
  ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1124:1: error: inlining failed in call to always_inline ‘__m128i _mm_mullo_epi16(__m128i, __m128i)’: target specific option mismatch
 _mm_mullo_epi16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:146:13: note: called from here
  blendcolor = _mm_mullo_epi16(blendcolor, blendalpha); // premultiply blend by alpha
  ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:602:1: error: inlining failed in call to always_inline ‘__m128i _mm_set_epi32(int, int, int, int)’: target specific option mismatch
 _mm_set_epi32 (int __q3, int __q2, int __q1, int __q0)
 ^~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:143:13: note: called from here
  blendalpha = _mm_set_epi32(a, color, a, color);
  ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:602:1: error: inlining failed in call to always_inline ‘__m128i _mm_set_epi32(int, int, int, int)’: target specific option mismatch
 _mm_set_epi32 (int __q3, int __q2, int __q1, int __q0)
 ^~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:140:13: note: called from here
  blendcolor = _mm_set_epi32(r, color, r, color);
  ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:602:1: error: inlining failed in call to always_inline ‘__m128i _mm_set_epi32(int, int, int, int)’: target specific option mismatch
 _mm_set_epi32 (int __q3, int __q2, int __q1, int __q0)
 ^~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:137:14: note: called from here
  blending256 = _mm_set_epi32(0x100, 0x1000100, 0x100, 0x1000100);
  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:719:1: error: inlining failed in call to always_inline ‘void _mm_storeu_si128(__m128i_u*, __m128i)’: target specific option mismatch
 _mm_storeu_si128 (__m128i_u *__P, __m128i __B)
 ^~~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:165:20: note: called from here
    _mm_storeu_si128((__m128i *)to, _mm_packus_epi16(color1, color2));
    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:962:1: error: inlining failed in call to always_inline ‘__m128i _mm_packus_epi16(__m128i, __m128i)’: target specific option mismatch
 _mm_packus_epi16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:165:20: note: called from here
    _mm_storeu_si128((__m128i *)to, _mm_packus_epi16(color1, color2));
    ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1207:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi16(__m128i, int)’: target specific option mismatch
 _mm_srli_epi16 (__m128i __A, int __B)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:164:11: note: called from here
    color2 = _mm_srli_epi16(color2, 8);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1207:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi16(__m128i, int)’: target specific option mismatch
 _mm_srli_epi16 (__m128i __A, int __B)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:163:11: note: called from here
    color1 = _mm_srli_epi16(color1, 8);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1058:1: error: inlining failed in call to always_inline ‘__m128i _mm_adds_epu16(__m128i, __m128i)’: target specific option mismatch
 _mm_adds_epu16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:162:11: note: called from here
    color2 = _mm_adds_epu16(blendcolor, color2);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1058:1: error: inlining failed in call to always_inline ‘__m128i _mm_adds_epu16(__m128i, __m128i)’: target specific option mismatch
 _mm_adds_epu16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:161:11: note: called from here
    color1 = _mm_adds_epu16(blendcolor, color1);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1124:1: error: inlining failed in call to always_inline ‘__m128i _mm_mullo_epi16(__m128i, __m128i)’: target specific option mismatch
 _mm_mullo_epi16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:160:11: note: called from here
    color2 = _mm_mullo_epi16(blendalpha, color2);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1124:1: error: inlining failed in call to always_inline ‘__m128i _mm_mullo_epi16(__m128i, __m128i)’: target specific option mismatch
 _mm_mullo_epi16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:159:11: note: called from here
    color1 = _mm_mullo_epi16(blendalpha, color1);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:992:1: error: inlining failed in call to always_inline ‘__m128i _mm_unpacklo_epi8(__m128i, __m128i)’: target specific option mismatch
 _mm_unpacklo_epi8 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:158:11: note: called from here
    color1 = _mm_unpacklo_epi8(color1, zero);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:968:1: error: inlining failed in call to always_inline ‘__m128i _mm_unpackhi_epi8(__m128i, __m128i)’: target specific option mismatch
 _mm_unpackhi_epi8 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:157:11: note: called from here
    color2 = _mm_unpackhi_epi8(color1, zero);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:701:1: error: inlining failed in call to always_inline ‘__m128i _mm_loadu_si128(const __m128i_u*)’: target specific option mismatch
 _mm_loadu_si128 (__m128i_u const *__P)
 ^~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:155:11: note: called from here
    color1 = _mm_loadu_si128((__m128i *)from);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:713:1: error: inlining failed in call to always_inline ‘void _mm_store_si128(__m128i*, __m128i)’: target specific option mismatch
 _mm_store_si128 (__m128i *__P, __m128i __B)
 ^~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:183:19: note: called from here
    _mm_store_si128((__m128i *)to, _mm_packus_epi16(color1, color2));
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:962:1: error: inlining failed in call to always_inline ‘__m128i _mm_packus_epi16(__m128i, __m128i)’: target specific option mismatch
 _mm_packus_epi16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:183:19: note: called from here
    _mm_store_si128((__m128i *)to, _mm_packus_epi16(color1, color2));
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1207:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi16(__m128i, int)’: target specific option mismatch
 _mm_srli_epi16 (__m128i __A, int __B)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:182:11: note: called from here
    color2 = _mm_srli_epi16(color2, 8);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1207:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi16(__m128i, int)’: target specific option mismatch
 _mm_srli_epi16 (__m128i __A, int __B)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:181:11: note: called from here
    color1 = _mm_srli_epi16(color1, 8);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1058:1: error: inlining failed in call to always_inline ‘__m128i _mm_adds_epu16(__m128i, __m128i)’: target specific option mismatch
 _mm_adds_epu16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:180:11: note: called from here
    color2 = _mm_adds_epu16(blendcolor, color2);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1058:1: error: inlining failed in call to always_inline ‘__m128i _mm_adds_epu16(__m128i, __m128i)’: target specific option mismatch
 _mm_adds_epu16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:179:11: note: called from here
    color1 = _mm_adds_epu16(blendcolor, color1);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1124:1: error: inlining failed in call to always_inline ‘__m128i _mm_mullo_epi16(__m128i, __m128i)’: target specific option mismatch
 _mm_mullo_epi16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:178:11: note: called from here
    color2 = _mm_mullo_epi16(blendalpha, color2);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1124:1: error: inlining failed in call to always_inline ‘__m128i _mm_mullo_epi16(__m128i, __m128i)’: target specific option mismatch
 _mm_mullo_epi16 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:177:11: note: called from here
    color1 = _mm_mullo_epi16(blendalpha, color1);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:992:1: error: inlining failed in call to always_inline ‘__m128i _mm_unpacklo_epi8(__m128i, __m128i)’: target specific option mismatch
 _mm_unpacklo_epi8 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:176:11: note: called from here
    color1 = _mm_unpacklo_epi8(color1, zero);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:968:1: error: inlining failed in call to always_inline ‘__m128i _mm_unpackhi_epi8(__m128i, __m128i)’: target specific option mismatch
 _mm_unpackhi_epi8 (__m128i __A, __m128i __B)
 ^~~~~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:175:11: note: called from here
    color2 = _mm_unpackhi_epi8(color1, zero);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:110:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:695:1: error: inlining failed in call to always_inline ‘__m128i _mm_load_si128(const __m128i*)’: target specific option mismatch
 _mm_load_si128 (__m128i const *__P)
 ^~~~~~~~~~~~~~
/home/drfrag/DEV/nzdoom/gzdoom/src/utility/palette.cpp:173:11: note: called from here
    color1 = _mm_load_si128((__m128i *)from);
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: compile error on linux 32 bit

Post by Rachael »

The compiler flags are not set to compile as SSE2, they're set for -DARCH_IA32 which I assume means 80386-compatible instructions if I am not mistaken. The architecture has to be changed to SSE2.

First what I would do is fully update your toolchain - which is both GCC and CMake. You will then have to wipe the build folder and try again. Update to CMake's latest version - 1.16.4

If that still doesn't work, you can try and pass -DUSE_SSE2=NO on the command line to attempt to force it to compile without SSE2 support.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: compile error on linux 32 bit

Post by drfrag »

Thanks, i thought CMake was misdetecting the CPU flags but no i've booted my linux mint mate machine and i get the same error on a dual core Pentium. So seems linux 32 bit doesn't compile and it's a bug, all Travis checks are 64 bit.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: compile error on linux 32 bit

Post by drfrag »

What are we supposed to do add utility/palette here?

Code: Select all

	if( SSE_MATTERS )
		set_source_files_properties(
			rendering/polyrenderer/poly_all.cpp
			rendering/swrenderer/r_all.cpp
			utility/x86.cpp
			PROPERTIES COMPILE_FLAGS "-msse2 -mmmx" )
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: compile error on linux 32 bit

Post by drfrag »

Now i get other errors in that file, there are several missing includes since i happen to have gcc 5 installed there. And i get an undeclared identifer error for abs and using std::abs i get an incompatible types error. Where is it defined? Now it's compiling on the laptop but takes an hour...
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: compile error on linux 32 bit

Post by Rachael »

My bad. You need to pass -DZDOOM_USE_SSE2=NO to CMake. Try that.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: compile error on linux 32 bit

Post by drfrag »

Never mind, as i stated now i get the other errors and i know why.
This commit was reverted:

Code: Select all

- fixed missing #include's for targets without precompiled header

src/utility/palette.cpp:76:21: error: ‘DBL_MAX’ was not declared in this scope
src/utility/palette.cpp:84:76: error: ‘pow’ was not declared in this scope
src/utility/palette.cpp:89:41: error: ‘abs’ was not declared in this scope
src/utility/palette.cpp:92:3: error: ‘fdist’ was not declared in this scope
src/utility/palette.cpp:196:46: error: ‘memcpy’ was not declared in this scope
src/utility/palette.cpp:298:19: error: ‘floor’ was not declared in this scope
And this one doesn't work here:

Code: Select all

- temporary solution to fix build of non-MSVC targets

Precompilation of prefix header for GCC and Clang requires some efforts thanks to CMake which doesn't support this feature out of the box
Existing thirparty solutions must be tuned to our needs, and our configuration should be adjusted to a chosen module
Why adding the includes was not adequate?
Edit: now it continues. But <cmath> didn't work.
Blzut3
 
 
Posts: 3144
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: compile error on linux 32 bit

Post by Blzut3 »

The issue is when GZDoom started requiring SSE2 there was nothing changed in the CMake to turn it on globally, just still for the files that used to contain optional SSE2 code.

For the debian packages I added "-march=pentium4 -mtune=prescott" to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS. In your case you'd want to use "-march=native -mtune=native".

On a related note ARCH_IA32 is only used in one file and given that it's only defined when compiling 32-bit I'm wondering if there's a bug there. If so that macro can probably be removed.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: compile error on linux 32 bit

Post by drfrag »

IMO it's a bug and it's fixed doing what i said earlier, it should work out of the box. Actually SSE is not required on ARM and could be optional on x86 as well but i don't know if it's worth, LZDoom compiles without SSE2 with an option for that.
But there are other problems: right now SoftPoly only works compiling with Vulkan and adding a fallback from Vulkan complicates things a bit here, i'm on it but i'm tired and tinnitus is strong now so...
Another one is that gamedata/textures/hires/gl_hqresize.cpp doesn't exist and should be changed to hqresize.cpp, i already fixed that.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: compile error on linux 32 bit

Post by drfrag »

It's done, in my master i'm making the GL backend optional and it's not worth adding more complexity since Vulkan is disabled there anyway.
This should fix the SoftPoly problem, just moving the ifdef:

Code: Select all

	Priv::softpolyEnabled = vid_preferbackend == 2;
#ifdef HAVE_VULKAN
	Priv::vulkanEnabled = vid_preferbackend == 1
		&& Priv::Vulkan_GetDrawableSize && Priv::Vulkan_GetInstanceExtensions && Priv::Vulkan_CreateSurface;

	if (Priv::vulkanEnabled)
	{
		Priv::CreateWindow(Priv::VulkanWindowFlag | SDL_WINDOW_HIDDEN);

		if (Priv::window == nullptr)
		{
			Priv::vulkanEnabled = false;
		}
	}
#endif
	if (Priv::softpolyEnabled)
	{
		Priv::CreateWindow(SDL_WINDOW_HIDDEN);
	}
I was referring to the compilation bug, the other one looks like a hack _mental_ added in "disabled usage of intrinsics on non-Intel platforms" but it's not a bug. Certainly that X64 there looks strange:

Code: Select all

if( X64 OR ${ZDOOM_TARGET_ARCH} MATCHES "i386" )
	add_definitions( -DARCH_IA32 )
endif()
Then there's that commented out code in CMakelists.txt:

Code: Select all

	# Use SSE 2 as minimum always as the true color drawers needs it for __vectorcall
	#set( ALL_C_FLAGS "${ALL_C_FLAGS} /arch:SSE2") # This is already the default


#	if( CMAKE_SIZEOF_VOID_P MATCHES "4")
#		# SSE2 option (to allow x87 in 32 bit and disallow extended feature sets which have not yet been checked for precision)
#		option (ZDOOM_USE_SSE2	"Use SSE2 instruction set")
But yeah i'll probably add the non SSE option for intel platforms too.

@_mental_ Now what about the missing includes? Seems the "temporary solution to fix build of non-MSVC targets" is overkill and only one file was affected. Is it okay to revert that and make the includes in palette.cpp platform specific?

BTW why was the other linux thread closed?
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: compile error on linux 32 bit

Post by _mental_ »

Could you please provide a PR for GZDoom master branch with your changes? I assume that all targets compile on Travis CI, right?
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: compile error on linux 32 bit

Post by drfrag »

You mean those two problems i mentioned earlier? Sure i could do it. And i'll rebase the MinGW PR when the ZMusic dll stuff is finished.
And what about those includes?
It compiles but OpenGL is not optional for MacOS as i can't do it, no big deal for me. But those changes are unrelated to the issues in master.
https://github.com/drfrag666/gzdoom/commits/master
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: compile error on linux 32 bit

Post by _mental_ »

What includes? Honestly, I lost track of your changes. All I understood is that I added some hack, and my another build fix is an overkill. So, I expected that you have a ready-to-use solution of all these issues, and for 32-bit Linux as well.
Also, may I ask you to refer commits by links to GitHub, not by their names?
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: compile error on linux 32 bit

Post by drfrag »

I haven't fixed that yet, i was waiting for your reply. These:
https://github.com/coelckers/gzdoom/com ... ab7b55c41b
https://github.com/coelckers/gzdoom/com ... c44dde2aa5
Edit: about the possible hack is something Blzut3 mentioned it could be a bug, no problemo for me.
https://github.com/coelckers/gzdoom/com ... 31082789e6
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: compile error on linux 32 bit

Post by _mental_ »

What hack? What bug? I cannot comprehend this from all previous posts. Could you please give me some details, i.e. what's wrong exactly with these commit?
Post Reply

Return to “Technical Issues”