Package: luola Version: 1.3.2-7 Severity: wishlist Tags: patch User: [email protected] Usertags: ld-as-needed
luola fails to build with ld --as-needed. To link with libm CFLAGS is used in debian/rules. This is wrong, libraries must go into the LIBS variable so they get placed on the correct position on the command line. This is needed for as-needed where objects must be before libraries providing their undefined symbols See the ubuntu buildlog for the failure: https://launchpadlibrarian.net/83071903/buildlog_ubuntu-precise-i386.luola_1.3.2-7_FAILEDTOBUILD.txt.gz gcc -lm -Wl,-Bsymbolic-functions -Wl,-z,relro -o luola console.o list.o parser.o fs.o SFont.o level.o player.o ship.o physics.o animation.o particle.o projectile.o bullet.o weapon.o intro.o game.o levelfile.o special.o walker.o flyer.o critter.o pilot.o spring.o decor.o audio.o font.o menu.o hotseat.o selection.o startup.o demo.o ldat.o lconf.o lcmap.o main.o -L/usr/lib -lSDL -lz -lSDL_image -lSDL_gfx -lSDL_ttf -lSDL_mixer -lSDL_image /usr/bin/ld: level.o: undefined reference to symbol 'sin@@GLIBC_2.0' /usr/bin/ld: note: 'sin@@GLIBC_2.0' is defined in DSO /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libm.so so try adding it to the linker command line /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libm.so: could not read symbols: Invalid operation Patch to fix the issue: --- /var/cache/pbuilder/build/cow.23087/tmp/luola-1.3.2/debian/rules 2011-09-04 14:43:39.000000000 +0200 +++ /var/cache/pbuilder/build/cow.24543/tmp/luola-1.3.2/debian/rules 2011-10-23 15:15:01.342989928 +0200 @@ -50,7 +50,7 @@ --bindir=/usr/games \ --enable-sound \ --enable-sdl-gfx \ - CFLAGS=-lm + LIBS=-lm touch configure-stamp
signature.asc
Description: OpenPGP digital signature

