Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915208 - x11-libs/libxklavier-5.4-r1 fails to link with clang-17: ld.lld: error: version script assignment of 'global' to symbol 'xkl_engine_VOID__FLAGS_INT_BOOLEAN' failed: symbol not defined
Summary: x11-libs/libxklavier-5.4-r1 fails to link with clang-17: ld.lld: error: versi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: LD-is-lld, systemwide-lld 912821
  Show dependency tree
 
Reported: 2023-10-05 11:48 UTC by ppw0
Modified: 2024-01-14 04:53 UTC (History)
0 users

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


Attachments
build log (x11-libs:libxklavier-5.4-r1:20231005-113143.log,26.47 KB, text/x-log)
2023-10-05 11:48 UTC, ppw0
Details
emerge --info (emerge_info.log,7.38 KB, text/x-log)
2023-10-05 11:48 UTC, ppw0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ppw0 2023-10-05 11:48:23 UTC
Created attachment 872170 [details]
build log

In a clang-17[default-libcxx] environment, x11-libs/libxklavier-5.4-r1 will fail to link during emerge with the following error message:
```
ld.lld: error: version script assignment of 'global' to symbol 'xkl_engine_VOID__FLAGS_INT_BOOLEAN' failed: symbol not defined
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [Makefile:477: libxklavier.la] Error 1
make[3]: Leaving directory '/var/tmp/portage/x11-libs/libxklavier-5.4-r1/work/libxklavier-5.4/libxklavier'
make[2]: *** [Makefile:408: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/x11-libs/libxklavier-5.4-r1/work/libxklavier-5.4/libxklavier'
make[1]: *** [Makefile:461: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/x11-libs/libxklavier-5.4-r1/work/libxklavier-5.4'
make: *** [Makefile:367: all] Error 2
```

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

Attaching logs.
Comment 1 ppw0 2023-10-05 11:48:45 UTC
Created attachment 872171 [details]
emerge --info
Comment 2 Larry the Git Cow gentoo-dev 2024-01-14 04:53:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=417e4bb0088b9835519879f7a0e9af8eaedeb5cb

commit 417e4bb0088b9835519879f7a0e9af8eaedeb5cb
Author:     Nicholas Vinson <nvinson234@gmail.com>
AuthorDate: 2024-01-10 23:59:55 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-14 04:51:30 +0000

    x11-libs/libxklavier: Remove undefined symbol
    
    Symbol xkl_engine_VOID__FLAGS_INT_BOOLEAN is not defined. Upstream is
    dead per https://www.freedesktop.org/wiki/Software/LibXklavier/.
    
    This change allows libxklavier to build with clang-17 by deleting the
    undefined symbol from the version symbol map.
    
    Despite upstream status, the following packages still depend on
    libxklavier:
    
        app-accessibility/caribou
        dev-libs/eekboard
        dev-libs/input-pad
        gnome-base/libgnomekbd
        gnome-extra/cinnamon-control-center
        gnome-extra/cinnamon-settings-daemon
        mate-base/libmatekbd
        mate-base/mate-control-center
        mate-base/mate-settings-daemon
        mate-extra/mate-screensaver
        x11-misc/lightdm
        xfce-base/xfce4-settings
        xfce-extra/xfce4-screensaver
        xfce-extra/xfce4-xkb-plugin
    
    Closes: https://bugs.gentoo.org/915208
    Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/34739
    Signed-off-by: Sam James <sam@gentoo.org>

 x11-libs/libxklavier/files/clang-17.patch      | 14 ++++++++++++++
 x11-libs/libxklavier/libxklavier-5.4-r1.ebuild |  4 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6377170184510f517a79fcb7aa79b85022bd3071

commit 6377170184510f517a79fcb7aa79b85022bd3071
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-14 04:51:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-14 04:51:41 +0000

    x11-libs/libxklavier: tweak patch formatting
    
    Bug: https://bugs.gentoo.org/915208
    Signed-off-by: Sam James <sam@gentoo.org>

 x11-libs/libxklavier/files/clang-17.patch | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)