The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
December 04, 2024, 10:05:04 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Compilation of UQM fails on Debian testing
« previous next »
Pages: [1] Print
Author Topic: Compilation of UQM fails on Debian testing  (Read 3776 times)
Antsan
Zebranky food
*
Offline Offline

Posts: 6



View Profile
Compilation of UQM fails on Debian testing
« on: November 11, 2014, 04:23:46 pm »

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.
Logged
oldlaptop
*Smell* controller
****
Offline Offline

Posts: 337



View Profile
Re: Compilation of UQM fails on Debian testing
« Reply #1 on: November 13, 2014, 03:25:45 am »

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 » Logged

Play Supermelee online in #uqm-arena!
Netmelee Improvement Mod
Antsan
Zebranky food
*
Offline Offline

Posts: 6



View Profile
Re: Compilation of UQM fails on Debian testing
« Reply #2 on: November 14, 2014, 10:06:51 am »

It works as you described after doing
Code:
./build.sh uqm clean
I'm not familiar with C++'s build process, so I don't know why linking is influenced by already built object files.

Thank you (and McMartin) very much!
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!