Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Feb 2021 16:30:35 +0000
From:      bugzilla-noreply@freebsd.org
To:        gecko@FreeBSD.org
Subject:   maintainer-feedback requested: [Bug 253539] www/firefox: fails to build with LTO enabled
Message-ID:  <bug-253539-21738-PsNfNZ5dY7@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-253539-21738@https.bugs.freebsd.org/bugzilla/>
References:  <bug-253539-21738@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-gecko (Nobody)
<gecko@FreeBSD.org> for maintainer-feedback:
Bug 253539: www/firefox: fails to build with LTO enabled
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253539



--- Description ---
OS: 13.0-STABLE stable/13-n244516-a73aaaeb579b

When I enable LTO options, firefox fails build:

/usr/local/bin/clang++11 -std=3Dgnu++17 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=
=3D2
-fstack-protector-strong -Qunused-arguments -DLIBICONV_PLUG -isystem
/usr/local/include -Qunused-arguments -Wall -Wbitfield-enum-conversion
-Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith
-Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits
-Wunreachable-code -Wunreachable-code-return -Wwrite-strings
-Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt
-Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis
-Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function
-Wunused-variable -Wstring-conversion -Wtautological-overlap-compare
-Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-comp=
are
-Wno-error=3Dtautological-type-limit-compare -Wno-inline-new-delete
-Wno-error=3Ddeprecated-declarations -Wno-error=3Darray-bounds
-Wno-error=3Dbackend-plugin -Wno-error=3Dreturn-std-move
-Wno-error=3Datomic-alignment -Wno-error=3Ddeprecated-copy -Wformat
-Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi
-Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -O2 -p=
ipe
-O2 -pipe -march=3Dnative -mtune=3Dnative -O3 -DLIBICONV_PLUG
-fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing
-DLIBICONV_PLUG -isystem /usr/local/include -fno-exceptions
-fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections
-fno-exceptions -fno-math-errno -pipe -O2 -O2 -O3 -fomit-frame-pointer
-funwind-tables  -fPIC -shared -Wl,-z,defs -Wl,--warn-unresolved-symbols
-Wl,--gc-sections -Wl,-h,libxul.so -o libxul.so
/tmpfs/usr/ports/www/firefox/work/.build/toolkit/library/build/libxul_so.li=
st=20
-flto=3Dthin -Wl,-plugin-opt=3D-import-instr-limit=3D10
-Wl,-plugin-opt=3Dnew-pass-manager -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
-Wl,-rpath-link,/tmpfs/usr/ports/www/firefox/work/.build/dist/bin
-Wl,-rpath-link,/usr/local/lib	../../../js/src/build/libjs_static.a
/tmpfs/usr/ports/www/firefox/work/.build/x86_64-unknown-freebsd/release/lib=
gkru
st.a
../../../config/external/lgpllibs/liblgpllibs.so
../../../config/external/sqlite/libmozsqlite3.so
../../../widget/gtk/mozgtk/stub/libmozgtk_stub.so   -L/usr/local/lib -licui=
18n
-L/usr/local/lib -licuuc -licudata -laom -ldav1d -lX11 -lX11-xcb -lxcb
-lXcomposite -lXcursor -lXdamage -lXext -lXfixes -lXi -lXrender -lpthread -=
lffi
-lplds4 -lplc4 -lnspr4 -pthread -ldl -lz -lm -lnss3 -lsmime3 -lssl3 -lnssut=
il3
-lfreetype -lfontconfig -lutil -lpng -lwebpdemux -lwebp -lgraphite2 -lharfb=
uzz
-levent -lvpx -lpixman-1 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -l=
intl
-lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf=
-2.0
-lgio-2.0 -lxcb-shm -lpangoft2-1.0 -lXt -lgthread-2.0
ld: warning: undefined symbol: environ
>>> referenced by std.4i6l8qi9-cgu.4
>>>=09=09=20
std-51221f867f83fee2.std.4i6l8qi9-cgu.4.rcgu.o:(std::sys::unix::os::env::h4=
012e
7da961963c4) in archive
/tmpfs/usr/ports/www/firefox/work/.build/x86_64-unknown-freebsd/release/lib=
gkru
st.a
>>> referenced by std.4i6l8qi9-cgu.8
>>>=09=09=20
std-51221f867f83fee2.std.4i6l8qi9-cgu.8.rcgu.o:(std::sys::unix::process::pr=
oces
s_inner::_$LT$impl$u20$std..sys..unix..process..process_common..Command$GT$=
::sp
awn::h150bb45ff1056f1c) in archive
/tmpfs/usr/ports/www/firefox/work/.build/x86_64-unknown-freebsd/release/lib=
gkru
st.a
>>> referenced by std.4i6l8qi9-cgu.8
>>>=09=09=20
std-51221f867f83fee2.std.4i6l8qi9-cgu.8.rcgu.o:(std::sys::unix::process::pr=
oces
s_inner::_$LT$impl$u20$std..sys..unix..process..process_common..Command$GT$=
::do
_exec::h18490b6b7e7a764d) in archive
/tmpfs/usr/ports/www/firefox/work/.build/x86_64-unknown-freebsd/release/lib=
gkru
st.a
>>> referenced 2 more times

ld: error: undefined hidden symbol:
JS::SetHostCleanupFinalizationRegistryCallback(JSContext*, void
(*)(JSFunction*, JSObject*, void*), void*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::~CycleCollectedJSContext())
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned
int))

ld: error: undefined hidden symbol: JS_SetContextPrivate(JSContext*, void*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::~CycleCollectedJSContext())
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned
int))

ld: error: undefined hidden symbol: JS_DestroyContext(JSContext*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::~CycleCollectedJSContext())
>>> referenced by Unified_cpp_netwerk_base0.cpp
>>>		  lto.tmp:(mozilla::net::ProxyAutoConfig::SetupJS())
>>> referenced by Unified_cpp_netwerk_base0.cpp
>>>		  lto.tmp:(mozilla::net::ProxyAutoConfig::SetupJS())
>>> referenced 1 more times

ld: error: undefined hidden symbol: JS_NewContext(unsigned int, JSRuntime*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned
int))
>>> referenced by Unified_cpp_netwerk_base0.cpp
>>>		  lto.tmp:(mozilla::net::ProxyAutoConfig::SetupJS())

ld: error: undefined hidden symbol: JS::SetJobQueue(JSContext*, JS::JobQueu=
e*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned
int))

ld: error: undefined hidden symbol:
JS::SetPromiseRejectionTrackerCallback(JSContext*, void (*)(JSContext*, boo=
l,
JS::Handle<JSObject*>, JS::PromiseRejectionHandlingState, void*), void*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned
int))

ld: error: undefined hidden symbol: JS::AddPersistentRoot(JS::RootingContex=
t*,
JS::RootKind, JS::PersistentRooted<JS::detail::RootListEntry*>*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned
int))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned
int))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned
int))
>>> referenced 35 more times

ld: error: undefined hidden symbol: JS::GetPromiseID(JS::Handle<JSObject*>)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::PromiseRejectionTrackerCallback(=
JSCo
ntext*, bool, JS::Handle<JSObject*>, JS::PromiseRejectionHandlingState, voi=
d*))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Run())
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Cance=
l())
>>> referenced 1 more times

ld: error: undefined hidden symbol: JS::GetPromiseResult(JS::Handle<JSObjec=
t*>)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::PromiseRejectionTrackerCallback(=
JSCo
ntext*, bool, JS::Handle<JSObject*>, JS::PromiseRejectionHandlingState, voi=
d*))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Run())
>>> referenced by Unified_cpp_dom_promise0.cpp
>>>=09=09=20
lto.tmp:(mozilla::dom::PromiseDebugging::GetState(mozilla::dom::GlobalObjec=
t&,
JS::Handle<JSObject*>, mozilla::dom::PromiseDebuggingStateHolder&,
mozilla::ErrorResult&))
>>> referenced 2 more times

ld: error: undefined hidden symbol: JS::CurrentGlobalOrNull(JSContext*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::enqueuePromiseJob(JSContext*,
JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>,
JS::Handle<JSObject*>))
>>> referenced by Unified_cpp_xpcom_base2.cpp
>>>		  lto.tmp:(nsSystemInfo::GetProcessInfo(JSContext*,
mozilla::dom::Promise**))
>>> referenced by Unified_cpp_intl_l10n0.cpp
>>>=09=09=20
lto.tmp:(mozilla::intl::Localization::FormatValues(JSContext*,
mozilla::dom::Sequence<mozilla::dom::OwningUTF8StringOrL10nIdArgs> const&,
mozilla::ErrorResult&))
>>> referenced 2220 more times

ld: error: undefined hidden symbol: JS::HeapObjectPostWriteBarrier(JSObject=
**,
JSObject*, JSObject*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::enqueuePromiseJob(JSContext*,
JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>,
JS::Handle<JSObject*>))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::enqueuePromiseJob(JSContext*,
JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>,
JS::Handle<JSObject*>))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::enqueuePromiseJob(JSContext*,
JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>,
JS::Handle<JSObject*>))
>>> referenced 4228 more times

ld: error: undefined hidden symbol:
JS::GetPromiseUserInputEventHandlingState(JS::Handle<JSObject*>)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::enqueuePromiseJob(JSContext*,
JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>,
JS::Handle<JSObject*>))

ld: error: undefined hidden symbol: JS::JobQueueMayNotBeEmpty(JSContext*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::PerformMicroTaskCheckPoint(bool))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::DispatchToMicroTask(already_AddR=
efed
<mozilla::MicroTaskRunnable>))
>>> referenced by Unified_cpp_dom_workers0.cpp
>>>=09=09=20
lto.tmp:(mozilla::dom::WorkerJSContext::DispatchToMicroTask(already_AddRefe=
d<mo
zilla::MicroTaskRunnable>))
>>> referenced 1 more times

ld: error: undefined hidden symbol: JS::JobQueueIsEmpty(JSContext*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::PerformMicroTaskCheckPoint(bool))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::PerformDebuggerMicroTaskCheckpoi=
nt()
)

ld: error: undefined hidden symbol: js::MallocArena
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::saveJobQueue(JSContext*))
>>> referenced by Unified_cpp_netwerk_base0.cpp
>>>		  lto.tmp:(mozilla::Vector<JS::Value, 8ul,
js::TempAllocPolicy>::growStorageBy(unsigned long))
>>> referenced by Unified_cpp_netwerk_base0.cpp
>>>		  lto.tmp:(mozilla::Vector<JS::Value, 8ul,
js::TempAllocPolicy>::growStorageBy(unsigned long))
>>> referenced 78 more times

ld: error: undefined hidden symbol: JS_ReportOutOfMemory(JSContext*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::saveJobQueue(JSContext*))
>>> referenced by Unified_cpp_netwerk_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::net::Dashboard::GetSockets(mozilla::net::SocketData*))
>>> referenced by Unified_cpp_netwerk_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::net::Dashboard::GetHttpConnections(mozilla::net::HttpData=
*))
>>> referenced 597 more times

ld: error: undefined hidden symbol: JS::IsIdleGCTaskNeeded(JSRuntime*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::AfterProcessTask(unsigned int))

ld: error: undefined hidden symbol: JS::ClearKeptObjects(JSContext*)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::AfterProcessMicrotasks())

ld: error: undefined hidden symbol:
JS::GetPromiseIsHandled(JS::Handle<JSObject*>)
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Run())
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>=09=09=20
lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Run())

ld: error: undefined hidden symbol: JS::GCCellPtr::outOfLineKind() const
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>		  lto.tmp:(NoteWeakMapChildrenTracer::onChild(JS::GCCellPtr
const&))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>		  lto.tmp:(NoteWeakMapChildrenTracer::onChild(JS::GCCellPtr
const&))
>>> referenced by Unified_cpp_xpcom_base0.cpp
>>>		  lto.tmp:(NoteWeakMapChildrenTracer::onChild(JS::GCCellPtr
const&))
>>> referenced 829 more times

ld: error: too many errors emitted, stopping now (use -error-limit=3D0 to s=
ee all
errors)
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
gmake[5]: ***
[/tmpfs/usr/ports/www/firefox/work/firefox-85.0.2/config/rules.mk:545:
libxul.so] Error 1
gmake[5]: Leaving directory
'/tmpfs/usr/ports/www/firefox/work/.build/toolkit/library/build'
gmake[4]: ***
[/tmpfs/usr/ports/www/firefox/work/firefox-85.0.2/config/recurse.mk:72:
toolkit/library/build/target] Error 2
gmake[4]: Leaving directory '/tmpfs/usr/ports/www/firefox/work/.build'
gmake[3]: ***
[/tmpfs/usr/ports/www/firefox/work/firefox-85.0.2/config/recurse.mk:34:
compile] Error 2
gmake[3]: Leaving directory '/tmpfs/usr/ports/www/firefox/work/.build'
gmake[2]: ***
[/tmpfs/usr/ports/www/firefox/work/firefox-85.0.2/config/rules.mk:355: all]
Error 2
gmake[2]: Leaving directory '/tmpfs/usr/ports/www/firefox/work/.build'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/firefox
*** Error code 1

Stop.
make: stopped in /usr/ports/www/firefox

=3D=3D=3D>>> make build failed for www/firefox
=3D=3D=3D>>> Aborting update



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