Bug 246515 - Non-unified build with LLD fails due to undefined AuxiliaryBarrier<JSC::Butterfly*> constructor
Summary: Non-unified build with LLD fails due to undefined AuxiliaryBarrier<JSC::Butt...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Linux
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-14 05:17 PDT by Adrian Perez
Modified: 2022-10-14 09:23 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2022-10-14 05:17:46 PDT
From https://build.webkit.org/#/builders/133/builds/13263/steps/10/logs/errors

---- 8< ----

ld.lld: error: undefined symbol: JSC::AuxiliaryBarrier<JSC::Butterfly*>::AuxiliaryBarrier<JSC::Butterfly*&>(JSC::VM&, JSC::JSCell*, JSC::Butterfly*&)
collect2: error: ld returned 1 exit status
Comment 1 Adrian Perez 2022-10-14 05:25:14 PDT
JFTR, given that the linker error is all but useful, I ended up using
the following big hammer 🔨️ approach to find which .o file had an
undefined reference to the inline:

  % nm -PCul WebKitBuild/GTK/Debug/Source/JavaScriptCore/**/*.o \
      | grep AuxiliaryBarrier
 JSC::AuxiliaryBarrier<JSC::Butterfly*>::AuxiliaryBarrier<JSC::Butterfly*&>(JSC::VM&, JSC::JSCell*, JSC::Butterfly*&)  U    WebAssemblyArrayPrototype.cpp:0

Scanning all the object files works because, as an inline, the undefined
function implementation should have been inlined into each object file
that needs it, instead of resulting in an undefined symbol 😉️

Patch incoming...
Comment 2 Adrian Perez 2022-10-14 05:27:59 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5374
Comment 3 EWS 2022-10-14 09:22:28 PDT
Committed 255536@main (f76663a6c9ce): <https://commits.webkit.org/255536@main>

Reviewed commits have been landed. Closing PR #5374 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2022-10-14 09:23:19 PDT
<rdar://problem/101175334>