Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697624 - sys-libs/libcxx-9.0.0 - ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libsupc++.a(eh_globals.o): in function `__cxa_get_globals_fast': eh_globals.cc:(.text.__cxa_get_globals_fast+0xc): undefined reference to `__tls_get_addr'
Summary: sys-libs/libcxx-9.0.0 - ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libsupc++....
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal enhancement (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-13 14:07 UTC by Christian Stoitner
Modified: 2020-01-12 11:54 UTC (History)
2 users (show)

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


Attachments
build log (libcxx-9.0.0_build.log.xz,9.73 KB, application/x-xz)
2019-10-13 14:07 UTC, Christian Stoitner
Details
emerge --info (emerge--info.txt,6.35 KB, text/plain)
2019-10-13 14:08 UTC, Christian Stoitner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Stoitner 2019-10-13 14:07:20 UTC
Created attachment 592642 [details]
build log

When emerging sys-libs/libcxx-9.0.0 with USE="static-libs -libcxxabi -libcxxrt -libunwind -test" I get this linker error:

/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libsupc++.a(eh_globals.o): in function `__cxa_get_globals_fast':
eh_globals.cc:(.text.__cxa_get_globals_fast+0xc): undefined reference to `__tls_get_addr'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/libsupc++.a(eh_globals.o): in function `__cxa_get_globals':
/var/tmp/portage/sys-devel/gcc-9.2.0-r1/work/gcc-9.2.0/libstdc++-v3/libsupc++/eh_globals.cc:62: undefined reference to `__tls_get_addr'
collect2: error: ld returned 1 exit status

I also tried building the package with gcc-9.1.0 and gcc-8.3.0 and got the same error. See the attached build log for more details.
Comment 1 Christian Stoitner 2019-10-13 14:08:03 UTC
Created attachment 592644 [details]
emerge --info
Comment 2 Christian Stoitner 2019-10-13 14:12:23 UTC
I just noticed in the error message I am using ld.bfd for linking currently. Switched to ld.gold and the package links without a problem.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-14 05:54:34 UTC
I'm afraid I can't help you here.  We really only support USE=libcxxabi these days, the remaining variants are provided for expert users who can handle it.
Comment 4 Christian Stoitner 2019-10-14 10:53:45 UTC
Alright. As I mentioned, it is now working for me when linking with gold. Maybe the ebuild should enforce using gold with those use flags?

Adding a warning message when using unsupported use flags would be a good idea as well.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-14 12:56:18 UTC
Well, I'm planning to take a look at all this soon.  Most probably, I will lastrite libcxxrt and package.use.force libcxxabi.
Comment 6 Larry the Git Cow gentoo-dev 2020-01-12 11:48:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f9636c8c75ec0bd05b06bf434f5ee540eec88b8

commit 1f9636c8c75ec0bd05b06bf434f5ee540eec88b8
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2020-01-12 11:31:24 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2020-01-12 11:48:11 +0000

    profiles/base: Force sys-libs/libcxx[libcxxabi]
    
    Bug: https://bugs.gentoo.org/697624
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 profiles/base/package.use.force | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)