I tried to compile The Ur-Quan Masters on Debian testing and ran into a problem. While trying to compile I get the following at the end:
Code:
LINK uqm /usr/bin/ld: obj/release/src/libs/lua/lmathlib.c.o: undefined reference to symbol 'fmod@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile.build:88: recipe for target 'uqm' failed make: *** [uqm] Error 1
I don't know what to make of this. Although INSTALL tells me I need GCC3.0 Debian testing only provides GCC4.9.1, so of course I tried with that.
Very interesting. I can reproduce this here (current testing/amd64) with current git, but not with v0.7.0, and not in my Ubuntu utopic VM. At first glance the error comes from the included liblua, but when working around that by using Debian's system liblua it hits a similar linker error elsewhere:
Code:
/usr/bin/ld.bfd.real: obj/release/src/uqm/setupmenu.c.o: undefined reference to symbol 'exp@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile.build:88: recipe for target 'uqm' failed make: *** [uqm] Error 1
It trips over a different (yet very similar...) linker error somewhere *else* on a debug build. Very perplexing indeed.
[EDIT] McMartin helpfully pointed out in IRC that the linker probably wanted to see libm added to its command line. For now, you can do that by setting LDFLAGS to "-lm" like so:
Code:
LDFLAGS="-lm" ./build.sh uqm
« Last Edit: November 13, 2014, 03:59:58 am by oldlaptop »