Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 528906 - sys-devel/gcc 4.8.3 CXXFLAGS="-march=native -std=gnu++11 -mno-sse2" - In file included from ssse2.cpp:1: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/emmintrin.h:31:3: error: #error "SSE2 instruction set not enabled"
Summary: sys-devel/gcc 4.8.3 CXXFLAGS="-march=native -std=gnu++11 -mno-sse2" - In file...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-11 10:57 UTC by OursDesCavernes
Modified: 2015-10-22 14:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
games-strategy/spring-98.0 build log (build.log,198.08 KB, text/plain)
2014-11-11 10:57 UTC, OursDesCavernes
Details
__AES__ variable declaration (file_528906.txt,6.61 KB, text/plain)
2014-11-11 19:23 UTC, OursDesCavernes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description OursDesCavernes 2014-11-11 10:57:52 UTC
Created attachment 389068 [details]
games-strategy/spring-98.0 build log

Hello,

I noticed this issue after trying to rebuid the game springrts after upgrading from gcc 4.7 to gcc 4.8.
the gae layman is : https://raw.githubusercontent.com/springlobby/overlay/master/overlays.xml

I've created a minimal cpp file and command line to reproduce this issue :

thomas@gentoo ~/test-gcc $ cat sse2.cpp
#include <algorithm>

int main()
{
        return 1;
}
thomas@gentoo ~/test-gcc $ /usr/bin/x86_64-pc-linux-gnu-g++ -march=native -std=gnu++11 -mno-sse2 -o sse2.o -c sse2.cpp
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/wmmintrin.h:31:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/x86intrin.h:58,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4/x86_64-pc-linux-gnu/bits/opt_random.h:33,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4/random:51,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4/bits/stl_algo.h:65,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4/algorithm:62,
                 from ssse2.cpp:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/emmintrin.h:31:3: error: #error "SSE2 instruction set not enabled"
 # error "SSE2 instruction set not enabled"
   ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/x86intrin.h:58:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4/x86_64-pc-linux-gnu/bits/opt_random.h:33,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4/random:51,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4/bits/stl_algo.h:65,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4/algorithm:62,
                 from ssse2.cpp:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/wmmintrin.h:42:17: error: '__m128i' does not name a type
 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/wmmintrin.h:50:17: error: '__m128i' does not name a type
 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/wmmintrin.h:59:17: error: '__m128i' does not name a type
 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/wmmintrin.h:67:17: error: '__m128i' does not name a type
 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/wmmintrin.h:75:17: error: '__m128i' does not name a type
 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
                 ^


The cpp file compiles with any 2 of the 3 options.


My system is:
profile: default/linux/amd64/13.0/desktop/kde/systemd
CPU:
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 70
model name      : Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz
stepping        : 1
microcode       : 0xa
cpu MHz         : 2001.000
cache size      : 6144 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
bugs            :
bogomips        : 3991.11
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

gcc version:
thomas@gentoo ~/test-gcc $ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.3/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.3 p1.1, pie-0.5.9' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --enable-lto --without-cloog --enable-libsanitizer
Thread model: posix
gcc version 4.8.3 (Gentoo 4.8.3 p1.1, pie-0.5.9)

If you need any other information, feel free to ask, i'll do my best.

Thanks for your help,

Thomas.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-11 11:05:29 UTC
That's not a compiler problem. I may be a problem with the ebuild, which isn't in an official repository.

*** This bug has been marked as a duplicate of bug 103819 ***
Comment 2 OursDesCavernes 2014-11-11 15:18:29 UTC
Hello Jeroen,

This case is not a duplicate of 103819 (about springrts not compiling) because I juste need to switch to gcc-4.7.3-r1 to have it compile and work fine.
This case is about a regression from gcc-4.7.3-r1 to gcc-4.8.3 where there is maybe a bug and maybe 4.8.3 has been marked stable too early.
Comment 3 OursDesCavernes 2014-11-11 15:24:02 UTC
Some piece of information I'm trying to gather :
thomas@gentoo ~/test-gcc $ diff /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/wmmintrin.h /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/include/wmmintrin.h
1c1
< /* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
---
> /* Copyright (C) 2008-2013 Free Software Foundation, Inc.

The include section were I have the issue is in #ifdef __AES__
Comment 4 OursDesCavernes 2014-11-11 19:23:48 UTC
Created attachment 389114 [details]
__AES__ variable declaration

The behavior for the 2 compilers is the same:
__AES__ is defined according to -march= option.
My understanding is that the type __m128i is not defined when " -std=gnu++11 -mno-sse2" CFLAGS are given.
I'll write some code to test it.
Comment 5 OursDesCavernes 2014-11-18 17:05:51 UTC
Hello,

I tried to reproduce the issue on a 32bit system but its cpu doesn't have the AES instruction set, so I could not reproduce the issue on it.

Can someone test it on a 32bit system with the AES instruction set available ?

Thomas.
Comment 6 Balint Dobai-Pataky 2015-09-30 09:07:38 UTC
Is there a solution to this one?
Im hitting the same build error:

In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/wmmintrin.h:31:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/x86intrin.h:58,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/g++-v4/x86_64-pc-linux-gnu/bits/opt_random.h:33,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/g++-v4/random:51,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/g++-v4/bits/stl_algo.h:65,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/g++-v4/algorithm:62,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:37,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/System/Net/Connection.h:7,
                 from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/System/Net/Connection.cpp:3:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/emmintrin.h:31:3: error: #error "SSE2 instruction set not enabled"
 # error "SSE2 instruction set not enabled"
Comment 7 Balint Dobai-Pataky 2015-09-30 09:40:59 UTC
looks like gcc version 5.2.0 (Gentoo 5.2.0 p1.1, pie-0.6.4) 
has passed this error with same compile options

C               -march=core-avx-i -mtune=core-avx-i -mno-f16c -mno-fsgsbase -mno-rdrnd -O2 -pipe 
C++             -march=core-avx-i -mtune=core-avx-i -mno-f16c -mno-fsgsbase -mno-rdrnd -O2 -pipe              -std=gnu++11 -f
diagnostics-color=always -mtune=generic -msse -mfpmath=sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -
mno-sse4a -mno-avx -mno-fma -mno-fma4 -mno-xop -mno-lwp -mno-avx2 -fsingle-precision-constant -frounding-math -mieee-fp -pipe
 -fno-strict-aliasing  -fvisibility=hidden  -fvisibility-inlines-hidden -pthread
Comment 8 SpanKY gentoo-dev 2015-10-22 14:29:03 UTC
gcc-4.9 is stable now, so throwing away older bugs we don't plan on doing backports for as this should be fixed w/4.9+.  please re-open if it's still an issue with 4.9.3+ though.