Comment 2 for bug 778292

Revision history for this message
Lorenzo Pistone (mrpisto) wrote :

might be related with the problem I encounter in compiling Cube 2: Sauerbraten with -flto[=n]:

/usr/bin/ld: /tmp/cc5LO1Ap.ltrans14.ltrans.o: undefined reference to symbol 'cosf@@GLIBC_2.2.5'
/usr/bin/ld: note: 'cosf@@GLIBC_2.2.5' is defined in DSO /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libm.so so try adding it to the linker command line
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libm.so: could not read symbols: Invalid operation

some people say that adding -lm at the end of the linker command fixes it, but it's not the case here. Of course, compiling goes fine without -flto.