wjakob / nanogui

Minimalistic GUI library for OpenGL
Other
4.66k stars 608 forks source link

LTO fatal error #178

Closed Mathiasb17 closed 7 years ago

Mathiasb17 commented 7 years ago

Hello,

When i try to build nanogui :

cmake .
make

I get the following error :

lto1: fatal error: bytecode stream generated with LTO version 3.0 instead of the expected 4.1
compilation terminated.
lto-wrapper: fatal error: /usr/bin/c++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
CMakeFiles/nanogui.dir/build.make:158: recipe for target 'libnanogui.so' failed
make[2]: *** [libnanogui.so] Error 1
CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/nanogui.dir/all' failed
make[1]: *** [CMakeFiles/nanogui.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I don't have any clue about what this is, do you have any idea ?

Mathiasb17 commented 7 years ago

The problem is that i was trying to build with g++-5.4 for some reason.

Works perfectly using the following :

cmake . -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.9 
make