Compilation error (missing -lm in LDFLAGS)

Think you've found a bug? Please report it here.
Post Reply
picnik
Blubbering Idiot
Posts: 1
Joined: Tue 31.05.2011, 12:01

Compilation error (missing -lm in LDFLAGS)

Post by picnik » Tue 31.05.2011, 12:47

I am trying to compile mangband from the sources on my x86_64 laptop.
When I try to run 'make', I get this error:

Code: Select all

/usr/bin/ld: client/maim-sdl.o: undefined reference to symbol 'ceil@@GLIBC_2.2.5'
/usr/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
/lib64/libm.so.6: could not read symbols: Invalid operation
As I have figured out, the problem was in missing linker flag "-lm". Thus, to compile mangband, one must run

Code: Select all

LDFLAGS="-lm" make
instead of 'make'.

I hope devteam will fix this soon.

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: Compilation error (missing -lm in LDFLAGS)

Post by Flambard » Tue 31.05.2011, 14:25

Thanks for the report. We shouldn't be using libm anyway. What version are you compiling ?

Post Reply