Compiling error on Ubuntu 13.04

All your MAngband related technical questions answered. Problems compiling or running the game/server? No problem! Ask here.
Post Reply
blazeorion
Pitiful-Looking Beggar
Posts: 2
Joined: Sat 06.07.2013, 02:00

Compiling error on Ubuntu 13.04

Post by blazeorion » Sat 06.07.2013, 02:08

Hi after getting all dependecies, I am getting this error when running the make file:

-L/usr/lib/i386-linux-gnu -lSDL
/usr/bin/ld: client/maim-sdl.o: undefined reference to symbol 'floor@@GLIBC_2.0'
/usr/bin/ld: note: 'floor@@GLIBC_2.0' is defined in DSO /lib/i386-linux-gnu/libm.so.6 so try adding it to the linker command line
/lib/i386-linux-gnu/libm.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [mangclient] Error 1

Thanks.
Blaze

blazeorion
Pitiful-Looking Beggar
Posts: 2
Joined: Sat 06.07.2013, 02:00

Re: Compiling error on Ubuntu 13.04

Post by blazeorion » Thu 18.07.2013, 15:27

I was able to compile by doing exactly what it said, add the /lib/i386-linux-gnu/libm.so.6 to the linker command line in the Makefile...

Code: Select all

# AutoTools
CC = gcc
CFLAGS = $(SVNREV)  -Wall -g -pipe -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTR$
LIBS =  -L/usr/lib/i386-linux-gnu -lSDL
became:

Code: Select all

# AutoTools
CC = gcc
CFLAGS = $(SVNREV)  -Wall -g -pipe -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTR$
LIBS =  -L/usr/lib/i386-linux-gnu /lib/i386-linux-gnu/libm.so.6 -lSDL
Thanks

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

Re: Compiling error on Ubuntu 13.04

Post by Flambard » Fri 15.11.2013, 13:27

Sorry about that! The floor() functions would be removed from the next version, making the libm dependency non-existent.

Post Reply