Created attachment 861028 [details] emerge --info Building net-dialup/ppp-2.5.0-r2 fails on llvm profile with the following error ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/Scrt1.o is incompatible with elf32-i386 ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../lib64/crti.o is incompatible with elf32-i386 ld.lld: error: /usr/lib/llvm/16/bin/../../../../lib/clang/16/lib/linux/clang_rt.crtbegin-x86_64.o is incompatible with elf32-i386 ld.lld: error: pppd-auth.o is incompatible with elf32-i386 ld.lld: error: pppd-ccp.o is incompatible with elf32-i386 ld.lld: error: pppd-chap-md5.o is incompatible with elf32-i386 ld.lld: error: pppd-chap.o is incompatible with elf32-i386 ld.lld: error: pppd-demand.o is incompatible with elf32-i386 ld.lld: error: pppd-eap.o is incompatible with elf32-i386 ld.lld: error: pppd-ecp.o is incompatible with elf32-i386 ld.lld: error: pppd-fsm.o is incompatible with elf32-i386 ld.lld: error: pppd-ipcp.o is incompatible with elf32-i386 ld.lld: error: pppd-lcp.o is incompatible with elf32-i386 ld.lld: error: pppd-magic.o is incompatible with elf32-i386 ld.lld: error: pppd-main.o is incompatible with elf32-i386 ld.lld: error: pppd-options.o is incompatible with elf32-i386 ld.lld: error: pppd-session.o is incompatible with elf32-i386 ld.lld: error: pppd-tty.o is incompatible with elf32-i386 ld.lld: error: pppd-upap.o is incompatible with elf32-i386 ld.lld: error: pppd-utils.o is incompatible with elf32-i386 ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
Created attachment 861029 [details] build log
<snip> -L/usr/lib -lssl -lcrypto From a quick look it's likely just these -L/usr/lib given lld will try to use it if passed (bfd ignores), only did a quick look seems to be coming from m4/ax_check_openssl.m4, ax_check_pam.m4, and others, they about all have e.g.: OPENSSL_LDFLAGS="-L$ssldir/lib"
I was able to somewhat get around the bug by cd-ing into /var/tmp/portage/net-dialup/ppp-2.5.0-r4/work/ppp-2.5.0/pppd and then clang -O2 -pipe -Wl,-E -Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed -o pppd pppd-auth.o pppd-ccp.o pppd-chap-md5.o pppd-chap.o pppd-demand.o pppd-eap.o pppd-ecp.o pppd-fsm.o pppd-ipcp.o pppd-lcp.o pppd-magic.o pppd-main.o pppd-options.o pppd-session.o pppd-tty.o pppd-upap.o pppd-utils.o pppd-sys-linux.o pppd-chap_ms.o pppd-crypto_ms.o pppd-cbcp.o pppd-mppe.o pppd-ipv6cp.o pppd-eui64.o pppd-eap-tls.o pppd-tls.o pppd-peap.o -lcrypt -ldl ./.libs/libppp_crypto.a -L/usr/lib64 -lssl -lcrypto So I guess @Ionen Wolkens was right.
*** Bug 913565 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c77e202de12022ab787403085c70c7b4c6801591 commit c77e202de12022ab787403085c70c7b4c6801591 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2024-03-05 19:49:19 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2024-03-05 19:49:19 +0000 net-dialup/ppp: fix build with lld Closes: https://bugs.gentoo.org/905442 Signed-off-by: Mike Gilbert <floppym@gentoo.org> .../ppp/files/ppp-2.5.0-openssl-pkgconfig.patch | 79 +++++++++++++++++++++ net-dialup/ppp/files/ppp-2.5.0-pam-pkgconfig.patch | 81 ++++++++++++++++++++++ net-dialup/ppp/ppp-2.5.0-r6.ebuild | 7 +- 3 files changed, 165 insertions(+), 2 deletions(-)