Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 370115

Summary: dev-libs/msgpack fails because of underlinking
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: QA CC: atoth, kripton
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 372079    
Attachments: Build log

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2011-06-05 12:03:52 UTC
Created attachment 275899 [details]
Build log

Hello there!

You're getting this bug because the package in Summary failed to build in my tinderbox using the gold link editor from binutils. Before closing the bug as INVALID let me explain why this is still important!

The gold link editor does not support underlinking of shared objects, which is something I have described in my blog post:

http://blog.flameeyes.eu/2010/11/26/it-s-not-all-gold-that-shines-why-underlinking-is-a-bad-thing

Even the basic link editor (ld.bfd) has an option to support this but it is a heck to enable and get passed, so linking with gold is simply quicker.

Fixing underlinking provides optimized --as-needed builds (because the "softer" version no longer need to recover libraries that are underlinked), so it is a Good Thing To Do.

Thank you very much for the attention!
Comment 1 Patrick Lauer gentoo-dev 2014-01-09 03:40:24 UTC
make[2]: Entering directory '/var/tmp/portage/dev-libs/msgpack-0.5.6/work/msgpack-0.5.6/test'
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I../src   -O4 -Wall -O2 -pipe -g -MT zone.o -MD -MP -MF .deps/zone.Tpo -c -o zone.o zone.cc
mv -f .deps/zone.Tpo .deps/zone.Po
/bin/sh ../libtool --tag=CXX   --mode=link x86_64-pc-linux-gnu-g++  -O4 -Wall -O2 -pipe -g ../src/libmsgpack.la -lgtest_main -pthread -Wl,-O1 -Wl,--as-needed -o zone zone.o  
libtool: link: x86_64-pc-linux-gnu-g++ -O4 -Wall -O2 -pipe -g -pthread -Wl,-O1 -Wl,--as-needed -o .libs/zone zone.o  ../src/.libs/libmsgpack.so -lgtest_main -pthread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: zone.o: undefined reference to symbol '_ZN7testing8internal13PrintStringToERKSsPSo'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: note: '_ZN7testing8internal13PrintStringToERKSsPSo' is defined in DSO /usr/lib64/libgtest.so.0 so try adding it to the linker command line
/usr/lib64/libgtest.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:347: recipe for target 'zone' failed
make[2]: *** [zone] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-libs/msgpack-0.5.6/work/msgpack-0.5.6/test'
Makefile:594: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-libs/msgpack-0.5.6/work/msgpack-0.5.6/test'
Makefile:315: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1
 * ERROR: dev-libs/msgpack-0.5.6::gentoo failed (test phase):
 *   Make check failed. See above for details.
Comment 2 Sergey Popov gentoo-dev 2014-02-10 07:43:31 UTC
+  10 Feb 2014; Sergey Popov <pinkbyte@gentoo.org> -msgpack-0.5.6.ebuild,
+  +msgpack-0.5.6-r1.ebuild:
+  Revision bump: EAPI 5, epatch_user, fix underlinking in tests, wrt bug
+  #370115, thanks to Diego Elio Pettenò. Drop old