Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 464014 - games-puzzle/neverball-1.5.4: fails to emerge with undefined reference to symbol 'acosf@@GLIBC_2.2.5'
Summary: games-puzzle/neverball-1.5.4: fails to emerge with undefined reference to sym...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: underlinking
  Show dependency tree
 
Reported: 2013-03-31 20:21 UTC by Ted Tanberry
Modified: 2013-10-11 18:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,16.69 KB, text/plain)
2013-03-31 20:21 UTC, Ted Tanberry
Details
build.log (build.log,59.56 KB, text/plain)
2013-03-31 20:22 UTC, Ted Tanberry
Details
neverball-1.5.4-r1.ebuild (neverball-1.5.4-r1.ebuild,2.12 KB, text/plain)
2013-03-31 20:32 UTC, Ted Tanberry
Details
updated neverball-1.5.4-underlink.patch (neverball-1.5.4-underlink.patch,701 bytes, text/plain)
2013-04-20 18:42 UTC, Ted Tanberry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Tanberry 2013-03-31 20:21:15 UTC
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.
Comment 1 Ted Tanberry 2013-03-31 20:21:49 UTC
Created attachment 343860 [details]
emerge --info
Comment 2 Ted Tanberry 2013-03-31 20:22:07 UTC
Created attachment 343862 [details]
build.log
Comment 3 Ted Tanberry 2013-03-31 20:32:03 UTC
Created attachment 343864 [details]
neverball-1.5.4-r1.ebuild
Comment 4 Raymond Jennings 2013-04-01 08:18:53 UTC
Strange...I just tested it and it's working fine for me.

I'll recheck after glibc finishes building.
Comment 5 Raymond Jennings 2013-04-01 09:15:15 UTC
Ok, I just upgraded to glibc 2.15r3, and neverball compiled just fine.
Comment 6 Ted Tanberry 2013-04-01 09:56:22 UTC
Are you on ~amd64? This is with glibc 2.17. I can try without -ggdb later
Comment 7 Ted Tanberry 2013-04-03 08:18:15 UTC
Seeing that indeed sys-devel/binutils-2.23.2 is causing this issue, should we just close this bug?
Comment 8 Ted Tanberry 2013-04-20 18:41:28 UTC
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.
Comment 9 Ted Tanberry 2013-04-20 18:42:25 UTC
Created attachment 346106 [details]
updated neverball-1.5.4-underlink.patch
Comment 10 Jouni Rinne 2013-08-25 04:29:07 UTC
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
Comment 11 Small_Penguin 2013-08-26 19:19:45 UTC
I confirm the new underlink patch from comment 9 fixes the problem and neverball compiles fine now. Using binutils-2.23.2 here, too.
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2013-10-11 18:11:57 UTC
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!