This might be caused by my recent upgrade to glibc. Anyway, I've upgraded and decided anyways to enable -ggdb for my global CFLAGS and on emerge -e world games-puzzle/neverball-1.5.4 failed to emerge. Reproducible: Always Steps to Reproduce: 1. Emerge glibc-2.17 (not sure?) 2. Emerge neverball with -ggdb in CFLAGS (again, not sure?) Actual Results: <snippet> x86_64-pc-linux-gnu-gcc -Wall -ansi -pedantic -march=core2 -O2 -pipe -ggdb -o neverball-mapc share/vec3.o share/base_image.o share/solid.o share/binary.o share/base_config.o share/common.o share/fs.o share/fs_png.o share/fs_jpg.o share/dir.o share/array.o share/mapc.o -Wl,-O1 -Wl,--as-needed -ljpeg -lpng15 -lphysfs /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: share/mapc.o: undefined reference to symbol 'acosf@@GLIBC_2.2.5' /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'acosf@@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 collect2: error: ld returned 1 exit status make: *** [neverball-mapc] Error 1 emake failed Expected Results: Should link up and finish off. I've twiddled with the ebuild a bit to add -lm and (of which I am not sure) --as-needed in order to reduce the linking burden. I've uploaded my ebuild, but due to the fact that I am not an experienced ebuild writer, it might not confirm to Gentoo's standards.
Created attachment 343860 [details] emerge --info
Created attachment 343862 [details] build.log
Created attachment 343864 [details] neverball-1.5.4-r1.ebuild
Strange...I just tested it and it's working fine for me. I'll recheck after glibc finishes building.
Ok, I just upgraded to glibc 2.15r3, and neverball compiled just fine.
Are you on ~amd64? This is with glibc 2.17. I can try without -ggdb later
Seeing that indeed sys-devel/binutils-2.23.2 is causing this issue, should we just close this bug?
I've modified the neverball-1.5.4-underlink.patch a bit and shuffled around the -lm flag such that it is included in $BASE_LIBS. With this, neverball links up with binutils-2.23.2.
Created attachment 346106 [details] updated neverball-1.5.4-underlink.patch
Ted, your ebuild is missing the libpng patch, please update the ebuild - epatch "${FILESDIR}"/${P}-underlink.patch + epatch \ + "${FILESDIR}"/${P}-underlink.patch \ + "${FILESDIR}"/${P}-libpng.patch
I confirm the new underlink patch from comment 9 fixes the problem and neverball compiles fine now. Using binutils-2.23.2 here, too.
Pushed -lm fix as: >*neverball-1.5.4-r1 (11 Oct 2013) > > 11 Oct 2013; Sergei Trofimovich <slyfox@gentoo.org> > +files/neverball-1.5.4-lm.patch, +neverball-1.5.4-r1.ebuild: > Fix underlinking against libm: bug #464014 and fix by Ted Tanberry. If it will happen to underlink aganst other libs - don't hesitate to reopen and post a build failure. Thanks guys!