On 64 bit ARM (but not amd64) a program or shared library built with gcc13 from gcc13-devel does not have ELFOSABI_FREEBSD set in the e_ident field of the ELF header. This upsets ldd, which complains ldd: lib/libclang.so.18.1.8: not a FreeBSD ELF shared object The difference can be observed with file, which reports (FreeBSD) or (SYSV) depending on compiler used. ELF 64-bit LSB shared object, ARM aarch64, version 1 (FreeBSD), dynamically linked, with debug_info, not stripped ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, with debug_info, not stripped The difference can be observed with elfdump -e, which reports ELFOSABI_FREEBSD or ELFOSABI_NONE. e_ident: ELFCLASS64 ELFDATA2LSB ELFOSABI_FREEBSD e_ident: ELFCLASS64 ELFDATA2LSB ELFOSABI_NONE This also affects gcc14-devel and perhaps all gcc packages.
Thanks for reporting. I will try to look into this as soon as possible. However, unfortunately, we have many open issues with GCC ports (including an exp run to update default version), so it might take some time... I am going to try to speed up all of this.