I managed to get the makefiles working properly on MacOS 12.6, but the build process fails with the following linker errors.
/Applications/Xcode.app/Contents/Developer/usr/bin/make MODULE=vm module-static
CFLAGS="" LFLAGS="" JUST_HOME="/Users/renemuala/Documents/playground/just-js/just" /Applications/Xcode.app/Contents/Developer/usr/bin/make -C modules/vm/ FLAGS=-DSTATIC library
g++ -DSTATIC -c -fno-exceptions -ffunction-sections -fdata-sections -fPIC -std=c++17 -DV8_COMPRESS_POINTERS -I/Users/renemuala/Documents/playground/just-js/just -I/Users/renemuala/Documents/playground/just-js/just/deps/v8/include -g -O3 -march=native -mtune=native -Wall -Wextra -flto -Wno-unused-parameter vm.cc
g++ -g -shared -flto -pthread -m64 vm.o -Wl,-install_name,vm.so -Wl,-dead_strip -o vm.so
Undefined symbols for architecture x86_64:
"v8::HandleScope::CreateHandle(v8::internal::Isolate*, unsigned long)", referenced from:
just::vm::EnterContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::ExitContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::HandleScope::HandleScope(v8::Isolate*)", referenced from:
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::HandleScope::~HandleScope()", referenced from:
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::api_internal::ToLocalEmpty()", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::api_internal::DisposeGlobal(unsigned long*)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::api_internal::FromJustIsNothing()", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::api_internal::GlobalizeReference(v8::internal::Isolate*, unsigned long*)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::api_internal::CopyGlobalReference(unsigned long*)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::ObjectTemplate::SetInternalFieldCount(int)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::ObjectTemplate::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::Init(v8::Isolate*, v8::Local<v8::ObjectTemplate>) in lto.o
"v8::PrimitiveArray::New(v8::Isolate*, int)", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::PrimitiveArray::Set(v8::Isolate*, int, v8::Local<v8::Primitive>)", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::ScriptCompiler::CachedData::~CachedData()", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::ScriptCompiler::CompileModule(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason)", referenced from:
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::ScriptCompiler::ConsumeCodeCacheTask::~ConsumeCodeCacheTask()", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::ScriptCompiler::CompileFunctionInContext(v8::Local<v8::Context>, v8::ScriptCompiler::Source*, unsigned long, v8::Local<v8::String>*, unsigned long, v8::Local<v8::Object>*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason, v8::Local<v8::ScriptOrModule>*)", referenced from:
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::ScriptCompiler::Compile(v8::Local<v8::Context>, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason)", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Module::InstantiateModule(v8::Local<v8::Context>, v8::MaybeLocal<v8::Module> (*)(v8::Local<v8::Context>, v8::Local<v8::String>, v8::Local<v8::FixedArray>, v8::Local<v8::Module>))", referenced from:
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Module::Evaluate(v8::Local<v8::Context>)", referenced from:
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Number::New(v8::Isolate*, double)", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Object::SetAlignedPointerInInternalField(int, void*)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Object::SlowGetAlignedPointerFromInternalField(int)", referenced from:
just::vm::EnterContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::ExitContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Object::Get(v8::Local<v8::Context>, unsigned int)", referenced from:
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Script::Run(v8::Local<v8::Context>)", referenced from:
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::String::NewFromUtf8Literal(v8::Isolate*, char const*, v8::NewStringType, int)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Context::AllowCodeGenerationFromStrings(bool)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Context::New(v8::Isolate*, v8::ExtensionConfiguration*, v8::MaybeLocal<v8::ObjectTemplate>, v8::MaybeLocal<v8::Value>, v8::DeserializeInternalFieldsCallback, v8::MicrotaskQueue*)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Context::Exit()", referenced from:
just::vm::ExitContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Context::Enter()", referenced from:
just::vm::EnterContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Context::Global()", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Isolate::GetCurrentContext()", referenced from:
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Isolate::SetPromiseRejectCallback(void (*)(v8::PromiseRejectMessage))", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Isolate::GetEnteredOrMicrotaskContext()", referenced from:
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::TryCatch::ReThrow()", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::TryCatch::TryCatch(v8::Isolate*)", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::TryCatch::~TryCatch()", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"just::SET_METHOD(v8::Isolate*, v8::Local<v8::ObjectTemplate>, char const*, void (*)(v8::FunctionCallbackInfo<v8::Value> const&))", referenced from:
just::vm::Init(v8::Isolate*, v8::Local<v8::ObjectTemplate>) in lto.o
"just::SET_MODULE(v8::Isolate*, v8::Local<v8::ObjectTemplate>, char const*, v8::Local<v8::ObjectTemplate>)", referenced from:
just::vm::Init(v8::Isolate*, v8::Local<v8::ObjectTemplate>) in lto.o
"just::OnModuleInstantiate(v8::Local<v8::Context>, v8::Local<v8::String>, v8::Local<v8::FixedArray>, v8::Local<v8::Module>)", referenced from:
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"just::PromiseRejectCallback(v8::PromiseRejectMessage)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"just::Init(v8::Isolate*, v8::Local<v8::ObjectTemplate>)", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::ScriptOrigin::VerifyHostDefinedOptions() const", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Array::Length() const", referenced from:
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::Value::BooleanValue(v8::Isolate*) const", referenced from:
just::vm::CreateContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::TryCatch::HasTerminated() const", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
"v8::TryCatch::HasCaught() const", referenced from:
just::vm::CompileInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileAndRunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunInContext(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::CompileScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunScript(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
just::vm::RunModule(v8::FunctionCallbackInfo<v8::Value> const&) in lto.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [library] Error 1
make[1]: *** [module-static] Error 2
make: *** [module-static-vm] Error 2
i tried to replace the libv8 file in deps by a macos version, but the build stills failing.