Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Aug 2024 00:04:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        gecko@FreeBSD.org
Subject:   [Bug 268328] www/firefox fails to build with LTO enabled
Message-ID:  <bug-268328-21738-MmdUpMiRu9@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-268328-21738@https.bugs.freebsd.org/bugzilla/>
References:  <bug-268328-21738@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268328

robbak@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robbak@gmail.com

--- Comment #8 from robbak@gmail.com ---
(In reply to Nuno Teixeira from comment #7)
I'm experiencing it, The error is happens fairly far back, and looks like t=
his:

security/manager/ssl/builtins/dynamic-library/libnssckbi.so
rm -f ../../../../../dist/bin/libnssckbi.so
/usr/local/bin/clang17 -std=3Dgnu99 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D2
-fstack-protector-strong -fstack-clash-protection -DLIBICONV_PLUG -isystem
/usr/local/include -pthread -ffunction-sections -fdata-sections -fno-math-e=
rrno
-fPIC -O2 -pipe -march=3Dcore2 -O3 -DLIBICONV_PLUG -fstack-protector-strong
-isystem /usr/local/include -fno-strict-aliasing -O2 -O3 -fomit-frame-point=
er
-funwind-tables -shared -Wl,-z,defs -Wl,--warn-unresolved-symbols
-Wl,--gc-sections -Wl,-h,libnssckbi.so -o ../../../../../dist/bin/libnssckb=
i.so
stub.o   -flto=3Dthin -Wl,-plugin-opt=3D-import-instr-limit=3D10
-Wl,-plugin-opt=3D-import-hot-multiplier=3D30 -Wl,--as-needed
-Wl,--undefined-version -fstack-protector-strong -fuse-ld=3Dlld -Wl,--icf=
=3Dsafe
-Wl,--build-id=3Dsha1 -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,now
-Wl,-z,nocopyreloc -fstack-protector-strong -fstack-clash-protection
-Wl,-rpath-link,/usr/home/obj/ports/usr/ports/www/firefox/work/.build/dist/=
bin
-O2 -O3  ../../../../../x86_64-unknown-freebsd/release/libbuiltins_static.a=
=20
-Wl,--version-script,libnssckbi.so.symbols  -ldl
ld.lld: error:
../../../../../x86_64-unknown-freebsd/release/libbuiltins_static.a(builtins=
_static-3fc9a9f4a8be076d.builtins_static.91ec9682c27a3d0c-cgu.0.rcgu.o):
Unknown attribute kind (91) (Producer: 'LLVM18.1.7-rust-1.79.0-stable' Read=
er:
'LLVM 17.0.6')
clang: error: linker command failed with exit code 1 (use -v to see invocat=
ion)
gmake[3]: ***
[/usr/home/obj/ports/usr/ports/www/firefox/work/firefox-129.0/config/rules.=
mk:539:
../../../../../dist/bin/libnssckbi.so] Error 1
gmake[3]: Leaving directory
'/usr/home/obj/ports/usr/ports/www/firefox/work/.build/security/manager/ssl=
/builtins/dynamic-library'
gmake[2]: ***
[/usr/home/obj/ports/usr/ports/www/firefox/work/firefox-129.0/config/recurs=
e.mk:72:
security/manager/ssl/builtins/dynamic-library/target] Error 2
gmake[2]: *** Waiting for unfinished jobs....

I'll turn off LTO and build again.

--- Comment #9 from Charlie Li <vishwin@freebsd.org> ---
(In reply to robbak from comment #8)
You must use the same LLVM version (from ports) building the C/C++ bits as =
the
LLVM in Rust. Right now you are indicating a version mismatch: port LLVM 17=
 and
Rust LLVM 18.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268328-21738-MmdUpMiRu9>