[Bug 283155] Link fails with -flto: error loading plugin: Cannot open "/usr/bin/../lib/LLVMgold.so" (port multimedia/kew)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Dec 2024 14:33:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283155 --- Comment #9 from Dimitry Andric <dim@FreeBSD.org> --- (In reply to Mark Millard from comment #8) Yes, so the first problem is that other ports use the prefix ${arch}-portbld-freebsdX.Y-, while devel/binutils tries to be different, and uses ${arch}-unknown-freebsdX.Y-: $ ls -l /usr/local/bin/x8* -rwxr-xr-x 4 root wheel 1720112 2024-11-23 23:37:08 /usr/local/bin/x86_64-portbld-freebsd15.0-c++13* -rwxr-xr-x 4 root wheel 1720112 2024-11-23 23:37:08 /usr/local/bin/x86_64-portbld-freebsd15.0-g++13* -rwxr-xr-x 3 root wheel 1716464 2024-11-24 00:07:52 /usr/local/bin/x86_64-portbld-freebsd15.0-gcc-13.3.0* -rwxr-xr-x 2 root wheel 26208 2024-11-24 00:07:55 /usr/local/bin/x86_64-portbld-freebsd15.0-gcc-ar13* -rwxr-xr-x 2 root wheel 26144 2024-11-24 00:07:55 /usr/local/bin/x86_64-portbld-freebsd15.0-gcc-nm13* -rwxr-xr-x 2 root wheel 26144 2024-11-24 00:07:55 /usr/local/bin/x86_64-portbld-freebsd15.0-gcc-ranlib13* -rwxr-xr-x 3 root wheel 1716464 2024-11-24 00:07:52 /usr/local/bin/x86_64-portbld-freebsd15.0-gcc13* -rwxr-xr-x 2 root wheel 1719056 2024-11-23 23:37:14 /usr/local/bin/x86_64-portbld-freebsd15.0-gfortran13* -r-xr-xr-x 1 root wheel 1212928 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-addr2line* -r-xr-xr-x 2 root wheel 1245144 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-ar* -r-xr-xr-x 2 root wheel 1955200 2024-12-06 15:17:54 /usr/local/bin/x86_64-unknown-freebsd15.0-as* -r-xr-xr-x 1 root wheel 1211304 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-c++filt* -r-xr-xr-x 1 root wheel 38968 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-elfedit* -r-xr-xr-x 1 root wheel 1275096 2024-12-06 15:17:54 /usr/local/bin/x86_64-unknown-freebsd15.0-gprof* -r-xr-xr-x 4 root wheel 2236920 2024-12-06 15:17:54 /usr/local/bin/x86_64-unknown-freebsd15.0-ld* -r-xr-xr-x 4 root wheel 2236920 2024-12-06 15:17:54 /usr/local/bin/x86_64-unknown-freebsd15.0-ld.bfd* -r-xr-xr-x 2 root wheel 1229232 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-nm* -r-xr-xr-x 2 root wheel 1360832 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-objcopy* -r-xr-xr-x 2 root wheel 2533640 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-objdump* -r-xr-xr-x 2 root wheel 1245144 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-ranlib* -r-xr-xr-x 2 root wheel 1112456 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-readelf* -r-xr-xr-x 1 root wheel 1214704 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-size* -r-xr-xr-x 1 root wheel 1218776 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-strings* -r-xr-xr-x 2 root wheel 1360848 2024-12-06 15:17:53 /usr/local/bin/x86_64-unknown-freebsd15.0-strip* This particular bug would simply go away if devel/binutils used ${arch}-portbld-freebsdX.Y- too. The second problem is that the GNU ld driver searches in the wrong path for LLVMgold.so. If somebody would actually want to use LLVMgold.so (not really recommended), they'd have to first choose an LLVM version to use, then try any of: /usr/local/llvm15/lib/LLVMgold.so /usr/local/llvm16/lib/LLVMgold.so /usr/local/llvm17/lib/LLVMgold.so /usr/local/llvm18/lib/LLVMgold.so /usr/local/llvm19/lib/LLVMgold.so That said, the better solution seems fixing binutils to me. -- You are receiving this mail because: You are the assignee for the bug.