Summary: | gui-libs/gtk-4.12.5: fails to compile with clang: /usr/lib/llvm/18/bin/llvm-objcopy: error: 'gtk/gtkresources_blob.o': Symbol table has link index of 5 which is not a valid index | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Rahul Sandhu <nvraxn> |
Component: | Current packages | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | leio, llvm, lockalsash, nvraxn, sam, toolchain |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | https://gitlab.gnome.org/GNOME/gtk/-/issues/6047 | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=915402 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963 | ||
Attachments: |
build.log
emerge --info |
Description
Rahul Sandhu
2024-04-07 21:22:12 UTC
Created attachment 889783 [details]
build.log
Created attachment 889784 [details]
emerge --info
I was wondering why this doesn't happen for me, but that's apparently because it only uses objcopy on x86_64 and when binutils linker is used, but I'm on arm64 and us lld: if not meson.is_cross_build() and build_machine.cpu_family() == 'x86_64' and build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and objcopy_supports_section_alignment and ld.fo und() and ld_is_bfd can_use_objcopy_for_resources = true else can_use_objcopy_for_resources = false endif That means I can't really reproduce this to investigate first-hand :( Adding some CC's on who might. Those projects may feel free to un-CC themselves if they don't find it relevant. Upstream added all these conditions to avoid this problem, apparently by ending up not using it with llvm-objcopy, but it seems to be used again now, maybe by having implemented --add-symbol and --set-section-alignment in more recent versions? But I see those options there in llvm-17 too... Upstream does not currently use binutils, so a workaround to compile with clang for now is to create a portage environment to use GNU objcopy: mkdir -pv /etc/portage/{package.,}env echo 'OBJCOPY="objcopy"' > /etc/portage/env/clang-no-llvm-objcopy # note this command will overwrite the contents of that file so ensure there is no current environment located there echo 'gui-libs/gtk clang-no-llvm-objcopy' >> /etc/portage/package.env/gui-libs emerge -va1 gui-libs/gtk More discussions here: https://bugs.gentoo.org/915402 Please links both bugs to https://bugs.gentoo.org/408963 (for those who can link). |