Summary: | =kde-frameworks/khtml-5.49.0 with ld.gold and GCC8 fails with "ld: warning: discarding version information for __cxa_finalize@GLIBC_2.2.5, defined in unused shared library /lib64/libc.so.6 (linked with --as-needed)" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Steffen Hau <steffen> |
Component: | Current packages | Assignee: | Gentoo KDE team <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra, gentoo, jstein, toolchain, zoltan |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 269315 | ||
Attachments: | kde-frameworks/khtml-5.49.0 build.log |
Description
Steffen Hau
2018-08-13 14:14:20 UTC
(In reply to Steffen Hau from comment #0) > Created attachment 543252 [details] > kde-frameworks/khtml-5.49.0 build.log > > See attached build.log. > > Either disabling LTO makes the warning disappear or removing > "-Wl,--fatal-warnings" solve the issue. I have no clue why ld (Gold, didn't > test ld.bfd) reports this warning. I had a similar experience with kwallet (don't have much kde on my system) but, following your suggestion, running LDFLAGS="${LDFLAGS} -Wl,--no-fatal-warnings" emerge -1v --nodeps kwallet meant that the build succeeded. This was true for the then currently-installed 5.48.0 which wouldn't rebuild (both gcc and clang were tried as also ld.bdf and ld.gold). *** Bug 664008 has been marked as a duplicate of this bug. *** These packages are also affected: kde-apps/kio-extras-18.08.0 kde-apps/kleopatra-18.08.0 kde-apps/kompare-18.08.0 kde-apps/libkleo-18.08.0 I would note that I am *not* using explicitly enabling LTO. These packages fail to link with the rather mundane flags: CFLAGS="-march=native -O3 -ggdb -pipe" CXXFLAGS="${CFLAGS}" LDFLAGS="-Wl,-O2 -Wl,--as-needed" /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: discarding version information for __pthread_key_create@GLIBC_2.2.5, defined in unused shared library /lib64/libpthread.so.0 (linked with --as-needed) /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: treating warnings as errors collect2: error: ld returned 1 exit status CCing toolchain to get insight into this linker warning. In the meantime, we could consider removing -Wl,--fatal-warnings from KDECompilerSettings.cmake in ECM to avoid triggering a build failure when this warning is encountered. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=d02ce6c1b55141859d389596b079200ad6e9e400 commit d02ce6c1b55141859d389596b079200ad6e9e400 Author: Michael Palimaka <kensington@gentoo.org> AuthorDate: 2018-08-19 14:00:12 +0000 Commit: Michael Palimaka <kensington@gentoo.org> CommitDate: 2018-08-19 14:00:25 +0000 kde-frameworks/extra-cmake-modules: avoid build failure with GCC8 and ld.gold Bug: https://bugs.gentoo.org/663512 Package-Manager: Portage-2.3.44, Repoman-2.3.10 .../extra-cmake-modules-9999.ebuild | 2 ++ ...extra-cmake-modules-5.49.0-no-fatal-warnings.patch | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a49d8c2a95711b9f166c59e3be0df26b75b88290 commit a49d8c2a95711b9f166c59e3be0df26b75b88290 Author: Michael Palimaka <kensington@gentoo.org> AuthorDate: 2018-08-19 14:03:30 +0000 Commit: Michael Palimaka <kensington@gentoo.org> CommitDate: 2018-08-19 14:07:54 +0000 kde-frameworks/extra-cmake-modules: avoid build failure with GCC8 and ld.gold Bug: https://bugs.gentoo.org/663512 Package-Manager: Portage-2.3.44, Repoman-2.3.10 ....0.ebuild => extra-cmake-modules-5.49.0-r1.ebuild} | 2 ++ ...extra-cmake-modules-5.49.0-no-fatal-warnings.patch | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) The patched kde-frameworks/extra-cmake-modules eliminates the link failures in the four packages I listed in Comment #3. Thanks. Note that the warnings about discarded version information are still present, as would be expected, but they no longer force the linker to fail. (In reply to Matt Whitlock from comment #3) > These packages are also affected: > > kde-apps/kio-extras-18.08.0 > kde-apps/kleopatra-18.08.0 > kde-apps/kompare-18.08.0 > kde-apps/libkleo-18.08.0 > > I would note that I am *not* using explicitly enabling LTO. These packages > fail to link with the rather mundane flags: > > CFLAGS="-march=native -O3 -ggdb -pipe" > CXXFLAGS="${CFLAGS}" > LDFLAGS="-Wl,-O2 -Wl,--as-needed" > > /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ > ld: warning: discarding version information for > __pthread_key_create@GLIBC_2.2.5, defined in unused shared library > /lib64/libpthread.so.0 (linked with --as-needed) > /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ > ld: error: treating warnings as errors > collect2: error: ld returned 1 exit status Next binutils (future 2.32 release) will not warn about it by default (guarded by --warn-drop-version): https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=3a12c78d1491c4877928e7294c8cdbe8171dfeed The build failure has been worked around, so I am unblocking gcc-8. |