View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004977 | Spring engine | Linux | public | 2015-09-30 10:20 | 2015-10-02 00:28 | ||||
Reporter | dpblnt | ||||||||
Assigned To | abma | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | no change required | ||||||
Product Version | 100.0 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004977: # error "SSE2 instruction set not enabled" | ||||||||
Description | trying to emerge spring from layman fails here 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 /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/lib/assimp/code/AssimpPCH.h:115, from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/lib/assimp/code/PostStepRegistry.cpp:49: /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" | ||||||||
Steps To Reproduce | emerge spring or cmake . make spring | ||||||||
Additional Information | gcc version 4.8.5 (Gentoo 4.8.5 p1.3, pie-0.6.2) dev-util/cmake-3.2.2 i noticed during configure this: C -march=core-avx-i -mno-f16c -mno-fsgsbase -mno-rdrnd -O2 -pipe C++ -march=core-avx-i -mno-f16c -mno-fsgsbase -mno-rdrnd -O2 -pipe -std=gnu++11 -march=core-avx-i -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 i thought that the -mno-sse2 is causing the above error so i skipped gentoo's ebuild system and tried to configure by hand using cmake -D CMAKE_CXX_FLAGS="-march=core-avx-i -mtune=core-avx-i -mno-f16c -mno-fsgsbase -mno-rdrnd -O2 -pipe" . which resulted in Using custom CXX_FLAGS: -march=core-avx-i -mtune=core-avx-i -mno-f16c -mno-fsgsbase -mno-rdrnd -O2 -pipe this build will very likely not sync in online mode! ... Compiler flags: C C++ -march=core-avx-i -mtune=core-avx-i -mno-f16c -mno-fsgsbase -mno-rdrnd -O2 -pipe -std=gnu++11 -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 but building fails... make spring Scanning dependencies of target engineSim [ 1%] Building CXX object rts/Sim/CMakeFiles/engineSim.dir/Features/Feature.cpp.o 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 /usr/include/boost/date_time/time_clock.hpp:17, from /usr/include/boost/thread/thread_time.hpp:9, from /usr/include/boost/thread/lock_types.hpp:18, from /usr/include/boost/thread/pthread/thread_data.hpp:12, from /usr/include/boost/thread/thread_only.hpp:17, from /usr/include/boost/thread/thread.hpp:12, from /usr/include/boost/thread.hpp:13, from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/System/Platform/Linux/ThreadSupport.h:12, from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/System/Platform/Threading.h:9, from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/System/Object.h:10, from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/Sim/Objects/WorldObject.h:6, from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/Sim/Objects/SolidObject.h:6, from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/Sim/Features/Feature.h:11, from /dev/shm/portage/games-strategy/spring-100.0/work/spring_100.0/rts/Sim/Features/Feature.cpp:4: /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" ^ Why is -mno-sse2 always attached to the compiler options? Is that the source of my compilation failure? | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
jK (developer) 2015-09-30 12:12 |
stop applying custom compiler args ... also the ebuild gives you a warning ... |
dpblnt (reporter) 2015-09-30 13:04 |
Trying with custom cflags was my last resort. It did not build in the first place. Since that I upgraded gcc to 5.2.0 which builds fine without any tweaks. |
hokomoko (developer) 2015-10-01 13:56 |
it happened to me without custom args as well. Managed to solve it by changing compiler, which may be an issue. abma? |
abma (administrator) 2015-10-01 16:31 |
https://github.com/spring/spring/blob/develop/rts/build/cmake/TestCXXFlags.cmake#L64 very likely completely cleaning the build dir will fix the compile error. you should do that every time you change compile flags as cmake caches settings. try this first, if this doesn't help, you very likely hit a bug in gcc headers. |
abma (administrator) 2015-10-01 16:55 |
some guy reported a similar issue: https://springrts.com/phpbb/viewtopic.php?t=26582#p496966 note: the post is from 2011 |
abma (administrator) 2015-10-01 23:44 |
upstream bug report: https://bugs.gentoo.org/show_bug.cgi?id=528906 |
abma (administrator) 2015-10-01 23:47 |
@dpblnt: does this compile for you? cat sse2.cpp #include <algorithm> int main() { return 1; } g++ -march=native -std=gnu++11 -mno-sse2 -o sse2.o -c sse2.cpp |
abma (administrator) 2015-10-02 00:28 |
seems to be a g++ 4.8 bug. compiles: g++-4.8 -march=x86-64 std=gnu++11 -mno-sse2 -o sse2.o -c sse2.cpp doesn't compile: g++-4.8 -march=x86-64 -maes std=gnu++11 -mno-sse2 -o sse2.o -c sse2.cpp doesn't compile: g++-4.8 -march=core-avx-i -mno-aes -std=gnu++11 -mno-sse2 -o sse2.o -c sse2.cpp -mno-aes seems to have no effect for core-avx-i. so either compile with march=x86-64 or don't use g++ 4.8. with a custom march set you very likely will get desyncs (!!!), don't do that when playing online! |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2015-09-30 10:20 | dpblnt | New Issue | |
2015-09-30 12:12 | jK | Note Added: 0015256 | |
2015-09-30 13:04 | dpblnt | Note Added: 0015257 | |
2015-10-01 13:56 | hokomoko | Note Added: 0015258 | |
2015-10-01 16:31 | abma | Note Added: 0015259 | |
2015-10-01 16:55 | abma | Note Added: 0015260 | |
2015-10-01 23:44 | abma | Note Added: 0015261 | |
2015-10-01 23:47 | abma | Note Added: 0015262 | |
2015-10-01 23:55 | abma | Status | new => feedback |
2015-10-02 00:28 | abma | Note Added: 0015265 | |
2015-10-02 00:28 | abma | Status | feedback => resolved |
2015-10-02 00:28 | abma | Resolution | open => no change required |
2015-10-02 00:28 | abma | Assigned To | => abma |