Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 464152 - sys-devel/binutils-2.23.2 --no-copy-dt-needed-entries linking errors
Summary: sys-devel/binutils-2.23.2 --no-copy-dt-needed-entries linking errors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/bugzilla/show_b...
Whiteboard:
Keywords:
Depends on: underlinking
Blocks:
  Show dependency tree
 
Reported: 2013-04-02 04:58 UTC by Ryan Hill (RETIRED)
Modified: 2014-01-19 03:42 UTC (History)
12 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2013-04-02 04:58:20 UTC
Errors are similar to:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld: lib/.libs/libstardict.a(pluginmanager.o): undefined reference to symbol 'g_module_symbol'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'g_module_symbol' is defined in DSO /usr/lib64/libgmodule-2.0.so.0 so try adding it to the linker command line
/usr/lib64/libgmodule-2.0.so.0: could not read symbols: Invalid operation

or

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld: usb.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'pthread_create@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation

gcc version does not matter (i reproduced these with 4.7.2).  binutils-2.23.1 works.  

this looks a lot like the errors you get with --no-copy-dt-needed-entries (aka --no-add-needed), and adding --add-needed fixes it.  did they change the default or something?
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2013-04-02 05:46:59 UTC
The default changed to --no-copy-dt-needed-entries back in 2.22.  Why we're hitting it now I don't know.  The only commit related to it in 2.23.2 I can find is http://sourceware.org/ml/binutils/2012-12/msg00060.html but reverting it doesn't help.
Comment 2 SpanKY gentoo-dev 2013-04-02 17:23:02 UTC
i want to say behavior related to weak symbols has changed ... might be related

i first posted this in Bug 458164.  but i'm not sure these are bugs in binutils itself vs the packages missing linking ...

we probably should unkeyword 2.23.2 though until we understand the issue better and have a concrete plan.
Comment 3 SpanKY gentoo-dev 2013-04-02 17:27:46 UTC
Commit message: Dekeyword until we can get a handle on missing symbol linkage errors
http://sources.gentoo.org/sys-devel/binutils/binutils-2.23.2.ebuild?r1=1.1&r2=1.2
Comment 4 Billy DeVincentis 2013-04-02 21:32:09 UTC
Lovely, you've downgraded binutils which will break almost everyone's system (and has broke mine already, What exactly do we do to fix our systems with the downgraded binutils?
Comment 5 SpanKY gentoo-dev 2013-04-02 23:18:05 UTC
(In reply to comment #4)

no idea wtf you're talking about.  you've provided 0 real details.
Comment 6 Billy DeVincentis 2013-04-03 01:57:01 UTC
What I'm saying is that after binutils was downgraded on my box, nothing would emerge. The only way to fix it was to keyword the broken version and I will have to wait for 2.23.2 to get fixed before emerging anymore packages. WTF I'm saying is that you know you cannot just downgrade binutils without breaking the toolchain. What simple way is there to fix the toolchain?
Comment 7 SpanKY gentoo-dev 2013-04-03 02:24:51 UTC
(In reply to comment #6)

considering your premise is false (you can, actually, downgrade binutils just fine and have things still work), no, i have no idea wtf you're talking about.  and you still have posted 0 real details.
Comment 8 Billy DeVincentis 2013-04-03 02:56:39 UTC
When I did an update before, binutils was downgraded. I was just about to do a full world rebuild (usually once a month or so) and I noticed gcc would not emerge. Nor did glibc afterwards. I will try this again and see what happens.
Comment 9 Billy DeVincentis 2013-04-03 03:08:28 UTC
here with the downgraded binutils, gcc doesn't emerge

/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/gcc-4.7.2/gcc/doc/cppopts.texi:806: @itemx must follow @item
make[3]: *** [doc/cpp.info] Error 1
make[3]: *** Waiting for unfinished jobs....







/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/gcc-4.7.2/gcc/doc/md.texi:1631: warning: node prev `Machine Constraints' in menu `Disable Insn Alternatives' and in sectioning `Modifiers' differ
/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/gcc-4.7.2/gcc/doc/md.texi:3755: warning: node next `Disable Insn Alternatives' in menu `Machine Constraints' and in sectioning `Define Constraints' differ
/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/gcc-4.7.2/gcc/doc/md.texi:3755: warning: node prev `Disable Insn Alternatives' in menu `Modifiers' and in sectioning `Machine Constraints' differ
/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/gcc-4.7.2/gcc/doc/md.texi:3848: warning: node prev `Define Constraints' in menu `Machine Constraints' and in sectioning `Disable Insn Alternatives' differ
make[3]: *** [doc/gccint.info] Error 1
rm gcc.pod
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/build'
make: *** [bootstrap-lean] Error 2
emake failed
 * ERROR: sys-devel/gcc-4.7.2-r1 failed (compile phase):
 *   emake failed with bootstrap-lean
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 4145:  Called toolchain_src_compile
 *   environment, line 4808:  Called gcc_do_make
 *   environment, line 2444:  Called die
 * The specific snippet of code:
 *       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.7.2-r1'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.7.2-r1'`.
 * 
 * Please include /var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/build/gcc-build-logs.tar.bz2 in your bug report
 * 
 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.7.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.7.2-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/build'
 * S: '/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/build'

>>> Failed to emerge sys-devel/gcc-4.7.2-r1, Log file:

>>>  '/var/tmp/portage/sys-devel/gcc-4.7.2-r1/temp/build.log'
 * 
 * The following package has failed to build or install:
 * 
 *  (sys-devel/gcc-4.7.2-r1::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/sys-devel/gcc-4.7.2-r1/temp/build.log'
 * 
Linux1 billydv #
Comment 10 Ryan Hill (RETIRED) gentoo-dev 2013-04-03 04:11:11 UTC
That isn't due to a binutils downgrade.  Probably the update to texinfo 5.1 caused that (it's been a fun week).
Comment 11 SpanKY gentoo-dev 2013-04-03 04:52:47 UTC
(In reply to comment #9)

as Ryan said, that has absolutely nothing to do with binutils.  there is a bug open already on the topic.
Comment 12 Billy DeVincentis 2013-04-04 03:16:33 UTC
My aplologies, it's an amazing coincidence that the first two packages that I tried to emerge after downgrading binutils failed, gcc and glibc, I of course assumed it was the binutils downgrade.
Thanks
Comment 13 Alan Modra 2013-04-04 07:46:07 UTC
(In reply to comment #1)
> The default changed to --no-copy-dt-needed-entries back in 2.22.  Why we're
> hitting it now I don't know.

--no-copy-dt-needed-entries in 2.22 was buggy.

http://sourceware.org/ml/binutils/2013-01/msg00085.html
Comment 14 Ryan Hill (RETIRED) gentoo-dev 2013-04-20 03:57:50 UTC
Okay, so assuming that these are valid underlinking errors we should start fixing packages.  Are you okay with keeping this masked?
Comment 15 SpanKY gentoo-dev 2013-04-20 04:50:35 UTC
(In reply to comment #14)

that's fine.  some of these packages are a little suspicious in that they use C++ features (like atomics) which implicitly pull in pthreads.  a bit more discussion might have to be had for that.
Comment 16 Ryan Hill (RETIRED) gentoo-dev 2013-04-20 05:39:50 UTC
Looks like we already have an active tracker for underlinking (bug #372079) so let's use that instead.
Comment 17 Ryan Hill (RETIRED) gentoo-dev 2013-06-15 07:51:56 UTC
Well this is going nowhere.  Time to unmask?  Can you expand on the pthreads comment?
Comment 18 SpanKY gentoo-dev 2013-06-30 03:31:39 UTC
(In reply to Ryan Hill from comment #17)

i think the pthreads thing is just latest 2.23.52.x.x and not 2.23.2 (see the referenced upstream bug for details).  unmasking 2.23.2 should be fine as long as all the bugs we see are actually bugs in the package (seems like that's the case).
Comment 19 SpanKY gentoo-dev 2013-08-12 18:02:41 UTC
Commit message: Unmask again since we know better what is failing (the packages themselves).

I built a good number of packages now using 2.23.2, so hopefully most packages should be sane and we can put pressure on the few still failing.

http://sources.gentoo.org/sys-devel/binutils/binutils-2.23.2.ebuild?r1=1.2&r2=1.3
Comment 20 SpanKY gentoo-dev 2014-01-19 03:42:48 UTC
there are no more issues in the tree afaik