In emerging dev-perl/Unicode-LineBreak-2019.1.0 on Gentoo 17.1 using the Clang-16 and…
- User
In emerging dev-perl/Unicode-LineBreak-2019.1.0 on Gentoo 17.1 using the Clang-16 and LLVM-16 toolchain (including libc++-16), I encountered the following fatal error:
rm -f "libsombok.a" /usr/lib/llvm/15/bin/llvm-ar cr "libsombok.a" lib/8.0.0.o lib/break.o lib/charprop.o lib/gcstring.o lib/linebreak.o lib/southeastasian.o lib/utf8.o lib/utils.o /usr/lib/llvm/15/bin/llvm-ar: error: libsombok.a: Unknown attribute kind (86) (Producer: 'LLVM16.0.0+libcxx' Reader: 'LLVM 15.0.7libcxx') make[1]: *** [Makefile:499: libsombok.a] Error 1 make[1]: Leaving directory '/var/tmp/portage/dev-perl/Unicode-LineBreak-2019.1.0/work/Unicode-LineBreak-2019.001/sombok' make: *** [Makefile:1119: sombok/libsombok.a] Error 2
- Assistant
It looks like there is a compatibility issue between the version of LLVM used to build the library and the version of LLVM used to link the library.
The error message indicates that the LLVM 15.0.7 library is being used as the reader and LLVM 16.0.0+libcxx as the producer. This means that the library was produced with a newer version of LLVM (version 16.0.0 with libc++-16) than the version of LLVM being used to link the library (version 15.0.7).
To resolve this issue, you could try updating the LLVM library to version 16.0.0+libcxx or newer. Alternatively, you could try using an older version of Unicode-LineBreak library that was built with LLVM 15.0.7.
- User
Which packages should I emerge or how should I alter Gentoo's configuration to resolve the problem so that LLVM-16 prevails?
- Assistant
To ensure that LLVM-16 is used to build the Unicode-LineBreak package on Gentoo 17.1, you can follow these steps:
- Update the Gentoo system using the following command:
cssemerge --sync && emerge -avuDN --with-bdeps=y @world- Add the
llvmpackage to the/etc/portage/package.accept_keywordsfile to allow the installation of the latest version of LLVM:
bashecho "sys-devel/llvm ~amd64" >> /etc/portage/package.accept_keywords- Install the latest version of LLVM and its dependencies using the following command:
bashemerge -av sys-devel/llvm- Set the
clangandllvmflags in the/etc/portage/make.conffile to point to the LLVM-16 and Clang-16 toolchain, respectively:
bash