Bug 246515

Summary: Non-unified build with LLD fails due to undefined AuxiliaryBarrier<JSC::Butterfly*> constructor
Product: WebKit Reporter: Adrian Perez <aperez>
Component: Tools / TestsAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Linux   

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>