Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2022 11:26:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 268328] www/firefox fails to build with LTO enabled
Message-ID:  <bug-268328-7788@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 268328
           Summary: www/firefox fails to build with LTO enabled
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: gecko@FreeBSD.org
          Reporter: freebsd-bug-report-yf@yf.bsdclub.org
          Assignee: gecko@FreeBSD.org
             Flags: maintainer-feedback?(gecko@FreeBSD.org)

On FreeBSD/amd64 13.1-RELEASE-p5, when I built www/firefox with LTO option
enabled (because I built it for updating before ports tree
fc0a979a30ea24c8d28d8a3893bb5ac0549e56cb , which was enabled by default), it
failed with:

...
/usr/local/bin/clang13 -Qunused-arguments -std=3Dgnu99 -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=3D2 -fstack-protector-strong -fstack-clash-protection
-DLIBICONV_PLUG -isystem /usr/local/include -O2 -pipe -O3 -DLIBICONV_PLUG
-fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -=
fPIC
-ffunction-sections -fdata-sections -fno-math-errno -pipe -O2 -O3
-fomit-frame-pointer -funwind-tables  -shared -Wl,-z,defs
-Wl,--warn-unresolved-symbols -Wl,--gc-sections -Wl,-h,libnssckbi.so -o
libnssckbi.so stub.o  -flto=3Dthin -Wl,-plugin-opt=3D-import-instr-limit=3D=
10
-Wl,-plugin-opt=3D-import-hot-multiplier=3D30 -pthread -Wl,--as-needed
-fstack-protector-strong -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro
-Wl,-z,nocopyreloc -Wl,-Bsymbolic-functions -Wl,--build-id=3Dsha1
-fstack-protector-strong -fstack-clash-protection
-Wl,-rpath-link,/opt/ports/usr/ports/www/firefox/work/.build/dist/bin
-Wl,-rpath-link,/usr/local/lib=20
/opt/ports/usr/ports/www/firefox/work/.build/x86_64-unknown-freebsd/release=
/libbuiltins_static.a
 -Wl,--version-script,libnssckbi.so.symbols  -L/usr/local/lib
ld: error:
/opt/ports/usr/ports/www/firefox/work/.build/x86_64-unknown-freebsd/release=
/libbuiltins_static.a(builtins_static-e6f7a98e90c6be5b.1da5sob8z9irceuj.rcg=
u.o):
Unknown attribute kind (82) (Producer: 'LLVM15.0.0-rust-1.65.0-stable' Read=
er:
'LLVM 13.0.1')
clang-13: error: linker command failed with exit code 1 (use -v to see
invocation)

It seems it was caused by llvm version missmatch between objects produced by
Rust and clang13.=20

And why clang13 is used is the description below in Mk/bsd.gecko.mk.

[[[
#    if !defined(DEFAULT_VERSIONS) || ! ${DEFAULT_VERSIONS:Mllvm*} ||
${PORT_OPT
IONS:MLTO}
LLVM_DEFAULT=3D   13 # chase bundled LLVM in lang/rust for LTO
LLVM_VERSION=3D   13.0.1 # keep in sync with
devel/wasi-compiler-rt${LLVM_DEFAULT}
#    endif
]]]

actually after I run 'make config' to unset LTO option, the port was built
successfuly.

--=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-7788>