Page 1 of 1

Compilation error (missing -lm in LDFLAGS)

Posted: Tue 31.05.2011, 12:47
by picnik
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.

Re: Compilation error (missing -lm in LDFLAGS)

Posted: Tue 31.05.2011, 14:25
by Flambard
Thanks for the report. We shouldn't be using libm anyway. What version are you compiling ?