Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915067 - app-office/libreoffice-7.5.5.2 fails to link with clang-17: ld.lld: error: version script assignment of 'PRIVATE_1.4' to symbol '_ZN3sal13backtrace_getEm' failed: symbol not defined
Summary: app-office/libreoffice-7.5.5.2 fails to link with clang-17: ld.lld: error: ve...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: LD-is-lld, systemwide-lld systemwide-libcxx 912821
  Show dependency tree
 
Reported: 2023-10-02 07:33 UTC by ppw0
Modified: 2023-12-02 11:59 UTC (History)
5 users (show)

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


Attachments
build log (app-office:libreoffice-7.5.5.2:20231002-072310.log.gz,225.13 KB, application/gzip)
2023-10-02 07:33 UTC, ppw0
Details
emerge --info (emerge_info.log,7.36 KB, text/x-log)
2023-10-02 07:34 UTC, ppw0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ppw0 2023-10-02 07:33:47 UTC
Created attachment 872000 [details]
build log

In a clang-17[default-libcxx] environment, emerging app-office/libreoffice-7.5.5.2 will fail in the linking phase:
---
ld.lld: error: version script assignment of 'PRIVATE_1.4' to symbol '_ZN3sal13backtrace_getEm' failed: symbol not defined
ld.lld: error: version script assignment of 'GLIBCXX_3.4' to symbol '_ZNSs4_Rep20_S_empty_rep_storageE' failed: symbol not defined
x86_64-pc-linux-gnu-clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/var/tmp/portage/app-office/libreoffice-7.5.5.2/work/libreoffice-7.5.5.2/sal/Library_sal.mk:11: /var/tmp/portage/app-office/libreoffice-7.5.5.2/work/libreoffice-7.5.5.2/instdir/program/libuno_sal.so.3] Error 1
make[1]: *** Waiting for unfinished jobs....
---

This failure can be avoided by passing "-Wl,--undefined-version" to LDFLAGS.

Attaching logs.
Comment 1 ppw0 2023-10-02 07:34:12 UTC
Created attachment 872001 [details]
emerge --info
Comment 2 Peter Asplund 2023-10-02 16:44:39 UTC
I can verify that I have the same issue.
Comment 3 Gary E. Miller 2023-10-08 20:54:12 UTC
#MeToo
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-09 03:07:29 UTC
meh. The upstream "fix" is to just silence it: https://github.com/LibreOffice/core/commit/baddc742c3fe260d20d7924ab134f0fbf179fd85.
Comment 5 Joe Kappus 2023-10-09 19:49:57 UTC
This also happens in a clang-17[-default-libcxx] environment. The attached patch does not solve the issue for me.
Comment 6 Daniel Dawson 2023-10-10 09:11:37 UTC
It also does not work for me. Looking at the build log, I can't even find the option it sets anywhere. I guess it needs some changes or something.

Currently, I have to set USE=-clang to get libreoffice (any available version) to build.
Comment 7 Gary E. Miller 2023-10-10 20:32:15 UTC
USE="-clang" worked.  Thanks!
Comment 8 Roman Gruber 2023-10-11 07:52:13 UTC
fail compile too

    -DLIBO_INTERNAL_ONLY  -c $S/salhelper/source/simplereferenceobject.cxx -o $W/CxxObject/salhelper/source/simplereferenceobject.o  -I$S/include -I/opt/openjdk-bin-17.0.8.1_p1/include -I/opt/openjdk-bin-17.0.8.1_p1/include/linux -I$S/config_host    
[CXX] salhelper/source/thread.cxx
ld.lld: error: version script assignment of 'PRIVATE_1.4' to symbol '_ZN3sal13backtrace_getEm' failed: symbol not defined
ld.lld: error: version script assignment of 'GLIBCXX_3.4' to symbol '_ZNSs4_Rep20_S_empty_rep_storageE' failed: symbol not defined
x86_64-pc-linux-gnu-clang++: error: linker command failed with exit code 1 (use -v to see invocation)


 * ERROR: app-office/libreoffice-7.5.7.1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-office/libreoffice-7.5.7.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-office/libreoffice-7.5.7.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-office/libreoffice-7.5.7.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-office/libreoffice-7.5.7.1/temp/environment'.
 * Working directory: '/var/tmp/portage/app-office/libreoffice-7.5.7.1/work/libreoffice-7.5.7.1'
 * S: '/var/tmp/portage/app-office/libreoffice-7.5.7.1/work/libreoffice-7.5.7.1'
!!! When you file a bug report, please include the following information:
GENTOO_VM=openjdk-bin-17  CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-17.0.8.1_p1"
JAVACFLAGS="-source 11 -target 11" COMPILER=""
and of course, the output of emerge --info =libreoffice-7.5.7.1


Sienna_Cichlid /home/roman # emerge --info|grep Time
Timestamp of repository gentoo: Tue, 10 Oct 2023 12:30:02 +0000
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-11 07:55:45 UTC
No need for repeated confirmations, thanks. The problem is clear.
Comment 10 Larry the Git Cow gentoo-dev 2023-10-11 08:30:14 UTC
The bug has been closed via the following commit(s):

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

commit 1c9e8df3cb2bccfcd1699bbae7c30ee7ca616435
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-11 08:29:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-11 08:29:22 +0000

    app-office/libreoffice: workaround failure w/ lld 17
    
    Closes: https://bugs.gentoo.org/915067
    Signed-off-by: Sam James <sam@gentoo.org>

 app-office/libreoffice/libreoffice-7.5.7.1.ebuild  | 3 +++
 app-office/libreoffice/libreoffice-7.5.9999.ebuild | 3 +++
 app-office/libreoffice/libreoffice-9999.ebuild     | 3 +++
 3 files changed, 9 insertions(+)
Comment 11 Larry the Git Cow gentoo-dev 2023-10-28 04:53:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=275a3af1b2d6af3da05f7a0ba6a1f11bb5dee198

commit 275a3af1b2d6af3da05f7a0ba6a1f11bb5dee198
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-28 04:45:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-28 04:52:39 +0000

    app-office/libreoffice: backport lld 17 workaround
    
    Closes: https://bugs.gentoo.org/916333
    Bug: https://bugs.gentoo.org/915067
    Signed-off-by: Sam James <sam@gentoo.org>

 app-office/libreoffice/libreoffice-7.5.6.2.ebuild | 3 +++
 1 file changed, 3 insertions(+)
Comment 12 LE GARREC Vincent 2023-12-02 11:59:22 UTC
For the record, I still have the problem with "-clang" use.

But adding "append-ldflags -Wl,--undefined-version" for "-clang" fix this problem.

Then now I have https://bugs.gentoo.org/727188