bun icon indicating copy to clipboard operation
bun copied to clipboard

macOS build error - `ld: symbol(s) not found for architecture arm64`

Open vjpr opened this issue 1 year ago • 11 comments

/opt/homebrew/opt/llvm@13/bin/clang++  -DDU_DISABLE_RENAMING=1 -lstdc++ -fno-keep-static-consts /Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/lib/libJavaScriptCore.a /Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/lib/libWTF.a  /Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/lib/libbmalloc.a  -l icucore /opt/homebrew/opt/icu4c/lib/libicudata.a /opt/homebrew/opt/icu4c/lib/libicui18n.a /opt/homebrew/opt/icu4c/lib/libicuuc.a -I/opt/homebrew/opt/icu4c/include -L/Users/Vaughan/dev/fork/bun/src/deps -larchive -lz /Users/Vaughan/dev/fork/bun/src/deps/picohttpparser.o -lmimalloc -lssl -lcrypto -llolhtml /Users/Vaughan/dev/fork/bun/src/deps/libbacktrace.a -larchive -lbase64 -ltcc -lusockets /Users/Vaughan/dev/fork/bun/src/deps/libuwsockets.o  /opt/homebrew/opt/libiconv/lib/libiconv.a -I/Users/Vaughan/dev/fork/bun/src/deps/uws/uSockets/src -I/Users/Vaughan/dev/fork/bun/src/deps/uws/src -I/Users/Vaughan/dev/fork/bun/src/deps -I/Users/Vaughan/dev/fork/bun/src/deps/mimalloc/include -Isrc/napi -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/WTF/Headers -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/ICU/Headers -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/ -Isrc/bun.js/bindings/ -Isrc/bun.js/builtins/ -Isrc/bun.js/bindings/webcore -Isrc/bun.js/bindings/sqlite -Isrc/bun.js/builtins/cpp -Isrc/bun.js/bindings/node_os -Isrc/bun.js/modules -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/Source/bmalloc -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/Source -I/Users/Vaughan/webkit-build/include -std=c++2a -DSTATICALLY_LINKED_WITH_JavaScriptCore=1 -DSTATICALLY_LINKED_WITH_WTF=1 -DSTATICALLY_LINKED_WITH_BMALLOC=1 -DBUILDING_WITH_CMAKE=1 -DBUN_SINGLE_THREADED_PER_VM_ENTRY_SCOPE=1 -DNDEBUG=1 -DNOMINMAX -DIS_BUILD -DBUILDING_JSCONLY__ -DASSERT_ENABLED=0 -fvisibility=hidden -fvisibility-inlines-hidden   -DDU_DISABLE_RENAMING=1 -lstdc++ -fno-keep-static-consts   -l icucore /opt/homebrew/opt/icu4c/lib/libicudata.a /opt/homebrew/opt/icu4c/lib/libicui18n.a /opt/homebrew/opt/icu4c/lib/libicuuc.a -I/opt/homebrew/opt/icu4c/include  -g /Users/Vaughan/dev/fork/bun/packages/debug-bun-darwin-aarch64//headers.o -W -o /tmp/build-jsc-headers -lc;
undef: _llint_entry
undef: _wasm_entry
undef: _wasmLLIntPCRangeEnd
undef: _vmEntryHostFunction
undef: _io_darwin_create_machport
undef: _vmEntryCustomGetter
undef: _vmEntryToNative
undef: _sanitizeStackForVMImpl
undef: _vmEntryCustomSetter
undef: _vmEntryRecord
undef: _llintPCRangeStart
undef: _vmEntryToJavaScript
undef: _llintPCRangeEnd
undef: _wasmLLIntPCRangeStart
undef: _io_darwin_schedule_wakeup
Undefined symbols for architecture arm64:
  "_llint_entry", referenced from:
      JSC::LLInt::initialize() in libJavaScriptCore.a(UnifiedSource-6e4525b9-1.cpp.o)
     (maybe you meant: _llint_entry_osr_function_for_construct_arityCheck, _llint_entry_osr_function_for_call_arityCheck , _llint_entry_osr_function_for_construct , _llint_entry_osr , _llint_entry_osr_function_for_call )
  "_wasm_entry", referenced from:
      JSC::LLInt::initialize() in libJavaScriptCore.a(UnifiedSource-6e4525b9-1.cpp.o)
  "_wasmLLIntPCRangeEnd", referenced from:
      WTF::Detail::CallableWrapper<JSC::Wasm::prepareFastMemory()::$_1::operator()() const::'lambda'(WTF::Signal, WTF::SigInfo&, __darwin_arm_thread_state64&), WTF::SignalAction, WTF::Signal, WTF::SigInfo&, __darwin_arm_thread_state64&>::call(WTF::Signal, WTF::SigInfo&, __darwin_arm_thread_state64&) in libJavaScriptCore.a(UnifiedSource-15db4ad9-2.cpp.o)
  "_vmEntryHostFunction", referenced from:
      WTF::SharedTaskFunctor<void (JSC::LinkBuffer&), JSC::nativeForGenerator(JSC::VM&, JSC::ThunkFunctionType, JSC::CodeSpecializationKind, JSC::ThunkEntryType)::$_1>::run(JSC::LinkBuffer&) in libJavaScriptCore.a(UnifiedSource-3a3c4ec0-8.cpp.o)
      WTF::SharedTaskFunctor<void (JSC::LinkBuffer&), JSC::nativeForGenerator(JSC::VM&, JSC::ThunkFunctionType, JSC::CodeSpecializationKind, JSC::ThunkEntryType)::$_2>::run(JSC::LinkBuffer&) in libJavaScriptCore.a(UnifiedSource-3a3c4ec0-8.cpp.o)
  "_io_darwin_create_machport", referenced from:
      _.thread_pool.io.Waker.init in headers.o
  "_vmEntryCustomGetter", referenced from:
      WTF::SharedTaskFunctor<void (JSC::LinkBuffer&), JSC::AccessCase::generateImpl(JSC::AccessGenerationState&)::$_9>::run(JSC::LinkBuffer&) in libJavaScriptCore.a(UnifiedSource-f0a787a9-1.cpp.o)
      JSC::DFG::SpeculativeJIT::compileCallDOMGetter(JSC::DFG::Node*) in libJavaScriptCore.a(DFGSpeculativeJIT.cpp.o)
      JSC::FTL::(anonymous namespace)::LowerDFGToB3::compileCallDOMGetter() in libJavaScriptCore.a(FTLLowerDFGToB3.cpp.o)
  "_vmEntryToNative", referenced from:
      JSC::JSValue JSC::Interpreter::executeCallImpl<false>(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      JSC::JSObject* JSC::Interpreter::executeConstructImpl<false>(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::ArgList const&, JSC::JSValue) in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
  "_sanitizeStackForVMImpl", referenced from:
      JSC::sanitizeStackForVM(JSC::VM&) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-41.cpp.o)
  "_vmEntryCustomSetter", referenced from:
      WTF::SharedTaskFunctor<void (JSC::LinkBuffer&), JSC::AccessCase::generateImpl(JSC::AccessGenerationState&)::$_9>::run(JSC::LinkBuffer&) in libJavaScriptCore.a(UnifiedSource-f0a787a9-1.cpp.o)
  "_vmEntryRecord", referenced from:
      JSC::CallFrame::callerFrame(JSC::EntryFrame*&) const in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      JSC::CallFrame::unsafeCallerFrame(JSC::EntryFrame*&) const in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      JSC::CallFrame::convertToStackOverflowFrame(JSC::VM&, JSC::CodeBlock*) in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      JSC::StackVisitor::StackVisitor(JSC::CallFrame*, JSC::VM&) in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      JSC::StackVisitor::readNonInlinedFrame(JSC::CallFrame*, JSC::CodeOrigin*) in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer(JSC::StackVisitor&) const in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      JSC::AssemblyHelpers::restoreCalleeSavesFromVMEntryFrameCalleeSavesBufferImpl(JSC::ARM64Registers::RegisterID, JSC::RegisterSet const&) in libJavaScriptCore.a(UnifiedSource-3a3c4ec0-1.cpp.o)
      ...
  "_llintPCRangeStart", referenced from:
      JSC::isFromJSCode(void*) in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      JSC::VMTraps::tryInstallTrapBreakpoints(JSC::VMTraps::SignalContext&, WTF::StackBounds) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-41.cpp.o)
      JSC::SamplingProfiler::takeSample(WTF::Seconds&) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-33.cpp.o)
      JSC::CFrameWalker::walk(WTF::Vector<JSC::SamplingProfiler::UnprocessedStackFrame, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&, bool&) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-33.cpp.o)
      JSC::ARM64Disassembler::A64DOpcode::appendPCRelativeOffset(unsigned int*, int) in libJavaScriptCore.a(UnifiedSource-3c3e0d8c-1.cpp.o)
      JSC::ARM64Disassembler::MoveWideFormatTrait::ResultType JSC::ARM64Disassembler::A64DOpcodeMoveWide::parse<JSC::ARM64Disassembler::MoveWideFormatTrait>()::'lambda'()::operator()() const in libJavaScriptCore.a(UnifiedSource-3c3e0d8c-1.cpp.o)
  "_vmEntryToJavaScript", referenced from:
      JSC::stringProtoFuncReplaceUsingRegExp(JSC::JSGlobalObject*, JSC::CallFrame*) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-35.cpp.o)
      JSC::stringProtoFuncReplaceUsingStringSearch(JSC::JSGlobalObject*, JSC::CallFrame*) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-35.cpp.o)
      JSC::stringProtoFuncReplaceAllUsingStringSearch(JSC::JSGlobalObject*, JSC::CallFrame*) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-35.cpp.o)
      _operationStringProtoFuncReplaceRegExpEmptyStr in libJavaScriptCore.a(UnifiedSource-f2e18ffc-35.cpp.o)
      _operationStringProtoFuncReplaceRegExpString in libJavaScriptCore.a(UnifiedSource-f2e18ffc-35.cpp.o)
      _operationStringProtoFuncReplaceGeneric in libJavaScriptCore.a(UnifiedSource-f2e18ffc-35.cpp.o)
      JSC::Interpreter::execute(JSC::EvalExecutable*, JSC::JSGlobalObject*, JSC::JSValue, JSC::JSScope*) in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      ...
  "_llintPCRangeEnd", referenced from:
      JSC::isFromJSCode(void*) in libJavaScriptCore.a(UnifiedSource-0e543b66-1.cpp.o)
      JSC::VMTraps::tryInstallTrapBreakpoints(JSC::VMTraps::SignalContext&, WTF::StackBounds) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-41.cpp.o)
      JSC::SamplingProfiler::takeSample(WTF::Seconds&) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-33.cpp.o)
      JSC::CFrameWalker::walk(WTF::Vector<JSC::SamplingProfiler::UnprocessedStackFrame, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&, bool&) in libJavaScriptCore.a(UnifiedSource-f2e18ffc-33.cpp.o)
      JSC::ARM64Disassembler::A64DOpcode::appendPCRelativeOffset(unsigned int*, int) in libJavaScriptCore.a(UnifiedSource-3c3e0d8c-1.cpp.o)
      JSC::ARM64Disassembler::MoveWideFormatTrait::ResultType JSC::ARM64Disassembler::A64DOpcodeMoveWide::parse<JSC::ARM64Disassembler::MoveWideFormatTrait>()::'lambda'()::operator()() const in libJavaScriptCore.a(UnifiedSource-3c3e0d8c-1.cpp.o)
  "_wasmLLIntPCRangeStart", referenced from:
      WTF::Detail::CallableWrapper<JSC::Wasm::prepareFastMemory()::$_1::operator()() const::'lambda'(WTF::Signal, WTF::SigInfo&, __darwin_arm_thread_state64&), WTF::SignalAction, WTF::Signal, WTF::SigInfo&, __darwin_arm_thread_state64&>::call(WTF::Signal, WTF::SigInfo&, __darwin_arm_thread_state64&) in libJavaScriptCore.a(UnifiedSource-15db4ad9-2.cpp.o)
  "_io_darwin_schedule_wakeup", referenced from:
      _.thread_pool.io.Waker.wake in headers.o
ld: symbol(s) not found for architecture arm64
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [headers] Error 1

Prettier clang command

/opt/homebrew/opt/llvm@13/bin/clang++

-DDU_DISABLE_RENAMING=1
-lstdc++
-fno-keep-static-consts
/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/lib/libJavaScriptCore.a
/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/lib/libWTF.a

/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/lib/libbmalloc.a

-l
icucore
/opt/homebrew/opt/icu4c/lib/libicudata.a
/opt/homebrew/opt/icu4c/lib/libicui18n.a
/opt/homebrew/opt/icu4c/lib/libicuuc.a
-I/opt/homebrew/opt/icu4c/include
-L/Users/Vaughan/dev/fork/bun/src/deps
-larchive
-lz
/Users/Vaughan/dev/fork/bun/src/deps/picohttpparser.o
-lmimalloc
-lssl
-lcrypto
-llolhtml
/Users/Vaughan/dev/fork/bun/src/deps/libbacktrace.a
-larchive
-lbase64
-ltcc
-lusockets
/Users/Vaughan/dev/fork/bun/src/deps/libuwsockets.o

/opt/homebrew/opt/libiconv/lib/libiconv.a
-I/Users/Vaughan/dev/fork/bun/src/deps/uws/uSockets/src
-I/Users/Vaughan/dev/fork/bun/src/deps/uws/src
-I/Users/Vaughan/dev/fork/bun/src/deps
-I/Users/Vaughan/dev/fork/bun/src/deps/mimalloc/include
-Isrc/napi
-I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders
-I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/WTF/Headers
-I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/ICU/Headers
-I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/
-Isrc/bun.js/bindings/
-Isrc/bun.js/builtins/
-Isrc/bun.js/bindings/webcore
-Isrc/bun.js/bindings/sqlite
-Isrc/bun.js/builtins/cpp
-Isrc/bun.js/bindings/node_os
-Isrc/bun.js/modules
-I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/Source/bmalloc
-I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/Source
-I/Users/Vaughan/webkit-build/include
-std=c++2a
-DSTATICALLY_LINKED_WITH_JavaScriptCore=1
-DSTATICALLY_LINKED_WITH_WTF=1
-DSTATICALLY_LINKED_WITH_BMALLOC=1
-DBUILDING_WITH_CMAKE=1
-DBUN_SINGLE_THREADED_PER_VM_ENTRY_SCOPE=1
-DNDEBUG=1
-DNOMINMAX
-DIS_BUILD
-DBUILDING_JSCONLY__
-DASSERT_ENABLED=0
-fvisibility=hidden
-fvisibility-inlines-hidden


-DDU_DISABLE_RENAMING=1
-lstdc++
-fno-keep-static-consts


-l
icucore
/opt/homebrew/opt/icu4c/lib/libicudata.a
/opt/homebrew/opt/icu4c/lib/libicui18n.a
/opt/homebrew/opt/icu4c/lib/libicuuc.a
-I/opt/homebrew/opt/icu4c/include

-g
/Users/Vaughan/dev/fork/bun/packages/debug-bun-darwin-aarch64//headers.o
-W
-o
/tmp/build-jsc-headers
-lc;

$ nm /Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/lib/libJavaScriptCore.a

                 U _llint_entry
0000000000001d74 T _llint_entry_osr
0000000000001fb4 T _llint_entry_osr_function_for_call
0000000000002004 T _llint_entry_osr_function_for_call_arityCheck
0000000000001fdc T _llint_entry_osr_function_for_construct
000000000000202c T _llint_entry_osr_function_for_construct_arityCheck

_llint_entry is undefined.


Seems to be defined here:

https://github.com/WebKit/WebKit/blob/f94e8397ec82f36422b7d2a5e8949948e3d4863e/Source/JavaScriptCore/llint/LowLevelInterpreter.asm#L1870-L1874

if C_LOOP or C_LOOP_WIN
    # Dummy entry point the C Loop uses to initialize.
    _llint_entry:
        crash()
else

vjpr avatar Aug 30 '22 09:08 vjpr

Would be better to ask on Bun's discord dev-general

xHyroM avatar Aug 30 '22 09:08 xHyroM

@Jarred-Sumner

I noticed the libLowLevelInterpreterLib.a is commented out on macOS. This is where my missing symbols are:

https://github.com/oven-sh/bun/blob/c1734c6ec5ef709ee4126b3474c7bee0a377a1fa/Makefile#L1286-L1290

vjpr avatar Aug 30 '22 10:08 vjpr

I think you're using a version of JSC from months ago

Those symbols are part of libJavaScriptCore.a now

Jarred-Sumner avatar Aug 30 '22 10:08 Jarred-Sumner

Yep was an issue with the JSC submodule not updating.

$ git submodule update --init --recursive --progress --depth=1
Skipping submodule 'src/bun.js/WebKit'

https://stackoverflow.com/questions/63974493/why-would-git-submodule-update-skip-a-submodule

[submodule "src/javascript/jsc/WebKit"]
	active = true
	url = https://github.com/Jarred-Sumner/WebKit.git
	update = none

Adding --checkout is necessary for updating it.

git submodule update --init --recursive --progress --depth=1 --checkout

Improvement

I assumed the make command was updating it as necessary.

Checking if the required utilities are available...
You have the dependencies installed! Woo
git submodule update --init --recursive --progress --depth=1
Skipping submodule 'src/bun.js/WebKit'

But it was skipping it...probably because it takes a long time as noted elsewhere in the readme.

Would be good to add to readme how to update it, or to error if out of date...

I think something like this would work:

git -C src/bun.js/WebKit remote update
git -C src/bun.js/WebKit rev-list HEAD...origin/main --count

From https://stackoverflow.com/questions/3258243/check-if-pull-needed-in-git/3278427#comment20583319_12791408

vjpr avatar Aug 30 '22 10:08 vjpr

Also, the submodule name and path no longer align, which is confusing. The submodule should be renamed to WebKit or src/bun.js/WebKit.

.gitmodules

[submodule "src/javascript/jsc/WebKit"]
path = src/bun.js/WebKit
url = https://github.com/Jarred-Sumner/WebKit.git
ignore = dirty
depth = 1
update = none
shallow = true
fetchRecurseSubmodules = false

vjpr avatar Aug 30 '22 10:08 vjpr

Still battling:

undef: _io_darwin_schedule_wakeup
undef: _io_darwin_create_machport
Undefined symbols for architecture arm64:
  "_io_darwin_schedule_wakeup", referenced from:
      _.thread_pool.io.Waker.wake in headers.o
  "_io_darwin_create_machport", referenced from:
      _.thread_pool.io.Waker.init in headers.o
ld: symbol(s) not found for architecture arm64
nm /xxx/bun/packages/debug-bun-darwin-aarch64/headers.o

https://github.com/oven-sh/bun/blob/c1734c6ec5ef709ee4126b3474c7bee0a377a1fa/src/io/io_darwin.cpp#L46-L63

vjpr avatar Aug 31 '22 14:08 vjpr

Those ones are new

Run make bindings On Wed, Aug 31, 2022 at 7:08 AM Vaughan Rouesnel @.***> wrote:

Still battling:

undef: _io_darwin_schedule_wakeup undef: _io_darwin_create_machport Undefined symbols for architecture arm64: "_io_darwin_schedule_wakeup", referenced from: _.thread_pool.io.Waker.wake in headers.o "_io_darwin_create_machport", referenced from: _.thread_pool.io.Waker.init in headers.o ld: symbol(s) not found for architecture arm64

nm /xxx/bun/packages/debug-bun-darwin-aarch64/headers.o

https://github.com/oven-sh/bun/blob/c1734c6ec5ef709ee4126b3474c7bee0a377a1fa/src/io/io_darwin.cpp#L46-L63

— Reply to this email directly, view it on GitHub https://github.com/oven-sh/bun/issues/1181#issuecomment-1232988349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFNGS2S6CKW4HLCQOJEBLLV35RMBANCNFSM6AAAAAAQAHOYTA . You are receiving this because you were mentioned.Message ID: @.***>

Jarred-Sumner avatar Aug 31 '22 14:08 Jarred-Sumner

Did a make clean then make vendor identifier-cache jsc dev

$ make bindings
/opt/homebrew/opt/llvm@13/bin/clang++ -I/Users/Vaughan/dev/fork/bun/src/deps/uws/uSockets/src -I/Users/Vaughan/dev/fork/bun/src/deps/uws/src -I/Users/Vaughan/dev/fork/bun/src/deps -I/Users/Vaughan/dev/fork/bun/src/deps/mimalloc/include -Isrc/napi -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/WTF/Headers -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/ICU/Headers -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/WebKitBuild/Release/ -Isrc/bun.js/bindings/ -Isrc/bun.js/builtins/ -Isrc/bun.js/bindings/webcore -Isrc/bun.js/bindings/sqlite -Isrc/bun.js/builtins/cpp -Isrc/bun.js/bindings/node_os -Isrc/bun.js/modules -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/Source/bmalloc -I/Users/Vaughan/dev/fork/bun/src/bun.js/WebKit/Source -I/Users/Vaughan/webkit-build/include -std=c++2a -DSTATICALLY_LINKED_WITH_JavaScriptCore=1 -DSTATICALLY_LINKED_WITH_WTF=1 -DSTATICALLY_LINKED_WITH_BMALLOC=1 -DBUILDING_WITH_CMAKE=1 -DBUN_SINGLE_THREADED_PER_VM_ENTRY_SCOPE=1 -DNDEBUG=1 -DNOMINMAX -DIS_BUILD -DBUILDING_JSCONLY__ -DASSERT_ENABLED=0 -fvisibility=hidden -fvisibility-inlines-hidden  \
		-mmacosx-version-min=11.0 \
		-O1 -mtune=native \
		-fno-exceptions \
		-fno-rtti \
		-ferror-limit=1000 \
		 \
		-g3 -c -o src/bun.js/debug-bindings-obj/ActiveDOMCallback.o src/bun.js/bindings/ActiveDOMCallback.cpp
error: unable to open output file 'src/bun.js/debug-bindings-obj/ActiveDOMCallback.o': 'No such file or directory'
1 error generated.
make: *** [src/bun.js/debug-bindings-obj/ActiveDOMCallback.o] Error 1

vjpr avatar Aug 31 '22 14:08 vjpr

The output dir was not being created properly.

This rule doesn't seem to trigger:

$(DEBUG_OBJ_DIR):
	mkdir -p $(DEBUG_OBJ_DIR)

vjpr avatar Aug 31 '22 15:08 vjpr

The Makefile should read

bindings: $(DEBUG_OBJ_DIR) $(DEBUG_OBJ_FILES) $(DEBUG_WEBCORE_OBJ_FILES) $(DEBUG_SQLITE_OBJ_FILES) $(DEBUG_NODE_OS_OBJ_FILES) $(DEBUG_BUILTINS_OBJ_FILES) $(DEBUG_IO_FILES)

(that first $(DEBUG_OBJ_DIR) is missing)

bwasti avatar Sep 01 '22 05:09 bwasti

the other fix is to add DEBUG_IO_FILES to the headers

Screen Shot 2022-09-01 at 1 52 24 AM

bwasti avatar Sep 01 '22 05:09 bwasti