error when building the macos option [6]
running step 6 of the build.py gives the following error:
make[2]: *** No rule to make target `../../v8.out//libv8_monolith.a', needed by `libj2v8-macosx-x86_64.dylib'. Stop.
make[2]: *** Waiting for unfinished jobs....
Full output:
python2 build.py -i
entering interactive mode...
[0] android-x86 @ Docker
[1] android-arm @ Docker
[2] alpine-linux-x64 @ Docker
[3] linux-x64
[4] linux-x64 @ Docker
[5] linux-x86 @ Docker
[6] macosx-x64
[7] macosx-x64 @ Vagrant
[8] macosx-x86 @ Vagrant
[9] windows-x64
[10] windows-x64 @ Docker
[11] windows-x64 @ Vagrant
Select a predefined build-configuration to run: 6
Building: macosx-x64
Override build-steps ? (leave empty to run pre-configured steps):
WARNING: skipping build step "v8" (not configured and/or supported for platform "macos")
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.
Updating Maven configuration (./docker/shared/pom.xml)...
SHELL building macos@x64 => j2v8cmake
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Java version 1.8.0.181 found!
Using Java-Root: /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.1.0/Contents/Home
--------------------------------------------------
J2V8_LIB_ARCH_NAME = x86_64
J2V8_LIB_VENDOR_NAME =
J2V8_LIB_PLATFORM_NAME = macosx
J2V8_TARGET_ARCH = x86_64
J2V8_BUILD_X64 = TRUE
--------------------------------------------------
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
J2V8_NODE_ENABLED
-- Build files have been written to: /Users/chris/Desktop/j2v8/J2V8-master/cmake.out/macos.x64
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.
Updating Maven configuration (./docker/shared/pom.xml)...
SHELL building macos@x64 => j2v8jni
Generating JNI header files...
Done
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.
Updating Maven configuration (./docker/shared/pom.xml)...
SHELL building macos@x64 => j2v8cpp
/usr/local/Cellar/cmake/3.19.1/bin/cmake -S/Users/chris/Desktop/j2v8/J2V8-master -B/Users/chris/Desktop/j2v8/J2V8-master/cmake.out/macos.x64 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.19.1/bin/cmake -E cmake_progress_start /Users/chris/Desktop/j2v8/J2V8-master/cmake.out/macos.x64/CMakeFiles /Users/chris/Desktop/j2v8/J2V8-master/cmake.out/macos.x64//CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/j2v8.dir/build.make CMakeFiles/j2v8.dir/depend
cd /Users/chris/Desktop/j2v8/J2V8-master/cmake.out/macos.x64 && /usr/local/Cellar/cmake/3.19.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/chris/Desktop/j2v8/J2V8-master /Users/chris/Desktop/j2v8/J2V8-master /Users/chris/Desktop/j2v8/J2V8-master/cmake.out/macos.x64 /Users/chris/Desktop/j2v8/J2V8-master/cmake.out/macos.x64 /Users/chris/Desktop/j2v8/J2V8-master/cmake.out/macos.x64/CMakeFiles/j2v8.dir/DependInfo.cmake --color=
Scanning dependencies of target j2v8
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/j2v8.dir/build.make CMakeFiles/j2v8.dir/build
make[2]: *** No rule to make target `../../v8.out//libv8_monolith.a', needed by `libj2v8-macosx-x86_64.dylib'. Stop.
make[2]: *** Waiting for unfinished jobs....
[ 50%] Building CXX object CMakeFiles/j2v8.dir/jni/com_eclipsesource_v8_V8Impl.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Dj2v8_EXPORTS -I/Users/chris/Desktop/j2v8/J2V8-master/v8.out/include -I/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.1.0/Contents/Home/include -I/Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.1.0/Contents/Home/include/darwin -O3 -DNDEBUG -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -fPIC -std=gnu++14 -o CMakeFiles/j2v8.dir/jni/com_eclipsesource_v8_V8Impl.cpp.o -c /Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:357:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
object->Set(context, v8Key, value);
^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:858:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
(*script)->Run(context);
^~~~~~~~~~~~~~ ~~~~~~~
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:1474:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
array->Set(context, index, Null(isolate));
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:1488:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
array->Set(context, index, Undefined(isolate));
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:1504:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
array->Set(context, index, v8Value);
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:1519:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
array->Set(context, index, v8Value);
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:1534:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
array->Set(context, index, v8Value);
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:1549:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
array->Set(context, index, v8Value);
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:1564:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
array->Set(context, index, v8Value);
^~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
/Users/chris/Desktop/j2v8/J2V8-master/jni/com_eclipsesource_v8_V8Impl.cpp:1918:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
object->SetPrototype(context, prototype);
^~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
10 warnings generated.
make[1]: *** [CMakeFiles/j2v8.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
File "build.py", line 13, in <module>
interactive.run_interactive_cli()
File "/Users/chris/Desktop/j2v8/J2V8-master/build_system/build_interactive.py", line 58, in run_interactive_cli
bex.execute_build(build_params)
File "/Users/chris/Desktop/j2v8/J2V8-master/build_system/build_executor.py", line 322, in execute_build
execute_build_step(target_compiler, target_step)
File "/Users/chris/Desktop/j2v8/J2V8-master/build_system/build_executor.py", line 231, in execute_build_step
build_system.build(build_step)
File "/Users/chris/Desktop/j2v8/J2V8-master/build_system/build_structures.py", line 96, in build
self.exec_build(config)
File "/Users/chris/Desktop/j2v8/J2V8-master/build_system/shell_build.py", line 27, in exec_build
self.exec_cmd(shell_str, config)
File "/Users/chris/Desktop/j2v8/J2V8-master/build_system/build_structures.py", line 113, in exec_cmd
self.__exec_cmd_core(cmd, config, config.build_cwd)
File "/Users/chris/Desktop/j2v8/J2V8-master/build_system/build_structures.py", line 122, in __exec_cmd_core
utils.execute(cmd, cwd)
File "/Users/chris/Desktop/j2v8/J2V8-master/build_system/build_utils.py", line 157, in execute
raise subprocess.CalledProcessError(return_code, cmd)
subprocess.CalledProcessError: Command 'cd /Users/chris/Desktop/j2v8/J2V8-master && cd ./cmake.out/macos.x64/ && make -j4' returned non-zero exit status 2
Hey. Some of the interactive build options don't work right now. I've recently made a build for macos j2v8-6.2.0-mac-x64, by first manually compiling v8, and using vagrant build options in the builder.
@zcaudate, Currently, the build script is not compatible with the latest changes on J2V8. You can still build using the following command: with building V8:
python build.py -t macos -a x64 v8 j2v8cmake j2v8jni j2v8cpp j2v8optimize j2v8java j2v8test
You also need to adapt the changes from this file.
EDIT: Add v8 flag and remove without building V8 part.
@ahmadov Just a few notes
-
Your first command doesn't build v8 (the v8 flag is missing, and setting it doesn't help). V8 build appears to be broken on the mac, and I would recommend just building the monolith on your own by following the official guide. Of note, to anyone attempting to build, is that the version 8.3.110.9 will not build without a small change to
find_sdk.pyon macOS with version 11.something of the SDK. The tool is looking for an SDK version 10, but will build find with 11. -
The zipped monolith doesn't contain a mac build either.
My feeling is that J2V8 needs a some cleaning done. Removing some old artifacts, updating V8, etc. I wouldn't mind contributing in spare time, if you are up for it.
Cheers
Thanks @gleno, I fixed it :)
My feeling is that J2V8 needs a some cleaning done. Removing some old artifacts, updating V8, etc.
This is totally right and it should be done ASAP.
@gleno @ahmadov thanks for the updates. tbh... I really just needed the macosx artifact which wasn't on maven and so struggled through the build. I also wanted a jar instead of an aar file but thought I'd first copy the libs into the classpath first.
I ended up creating a node repl testing out some code that way but it'll be great to have the bindings working.
@gleno I'm trying to build j2v8 6.2.1 for macos (catalina) using Vagrant. I've added provision script to build v8 inside Vagrant:
gclient
mkdir -p ~/v8
cd ~/v8
fetch v8
cd v8
git checkout 9.3.345.11
gclient sync
./tools/dev/v8gen.py x64.release
echo "target_cpu = \\"x64\\"
is_component_build = false
is_debug = false
v8_monolithic = true
v8_use_external_startup_data = false
symbol_level = 0
v8_target_cpu = \\"x64\\"
v8_enable_i18n_support = false
v8_enable_pointer_compression = false" > out.gn/x64.release/args.gn
ninja -C out.gn/x64.release v8_monolith
mkdir -p ../../j2v8/v8.out
cp out.gn/x64.release/obj/libv8_monolith.a ../../j2v8/v8.out/
But then when I build j2v8 using python2 build.py -t macos -a x64 -vgr --sys-image osx-catalina j2v8cmake j2v8jni j2v8cpp j2v8optimize j2v8java I get following error:
Undefined symbols for architecture x86_64: "std::__1::basic_stringbuf<char, std::__1::char_traits
, std::__1::allocator >::str() const", referenced from: std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >* v8::base::MakeCheckOpString<int, int>(int, int, char const*) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > v8::base::detail::PrintToString (int&&) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >* v8::base::MakeCheckOpString<long, long>(long, long, char const*) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > v8::base::detail::PrintToString (long&&) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >* v8::base::MakeCheckOpString<long long, long long>(long long, long long, char const*) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > v8::base::detail::PrintToString (long long&&) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >* v8::base::MakeCheckOpString<unsigned int, unsigned int>(unsigned int, unsigned int, char const*) in libv8_monolith.a(logging.o) ... "std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >::__assign_external(char const*)", referenced from: v8::internal::(anonymous namespace)::JsonTraceValue::JsonTraceValue(v8::internal::Isolate*, v8::internal::Handlev8::internal::String) in libv8_monolith.a(builtins-trace.o) v8::internal::BasicBlockProfilerData::SetFunctionName(std::__1::unique_ptr<char [], std::__1::default_delete<char []> >) in libv8_monolith.a(basic-block-profiler.o) v8::internal::BasicBlockProfilerData::CopyFromJSHeap(v8::internal::OnHeapBasicBlockProfilerData) in libv8_monolith.a(basic-block-profiler.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >::operator=(char const*) in libv8_monolith.a(ic.o) v8::internal::compiler::PipelineStatistics::PipelineStatistics(v8::internal::OptimizedCompilationInfo*, v8::internal::CompilationStatistics*, v8::internal::compiler::ZoneStats*) in libv8_monolith.a(pipeline-statistics.o) "std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >::__assign_external(char const*, unsigned long)", referenced from: v8::WasmStreaming::SetUrl(char const*, unsigned long) in libv8_monolith.a(wasm-js.o) "std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >& std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >::__assign_no_alias (char const*, unsigned long)", referenced from: v8::internal::compiler::PipelineImpl::SelectInstructions(v8::internal::compiler::Linkage*) in libv8_monolith.a(pipeline.o) v8::internal::CompilationStatistics::RecordPhaseStats(char const*, char const*, v8::internal::CompilationStatistics::BasicStats const&) in libv8_monolith.a(compilation-statistics.o) v8::internal::CompilationStatistics::BasicStats::Accumulate(v8::internal::CompilationStatistics::BasicStats const&) in libv8_monolith.a(compilation-statistics.o) v8::internal::CompilationStatistics::RecordPhaseKindStats(char const*, v8::internal::CompilationStatistics::BasicStats const&) in libv8_monolith.a(compilation-statistics.o) v8::internal::CompilationStatistics::RecordTotalStats(v8::internal::CompilationStatistics::BasicStats const&) in libv8_monolith.a(compilation-statistics.o) v8::internal::compiler::PipelineStatistics::CommonStats::End(v8::internal::compiler::PipelineStatistics*, v8::internal::CompilationStatistics::BasicStats*) in libv8_monolith.a(pipeline-statistics.o) "std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >& std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >::__assign_no_alias (char const*, unsigned long)", referenced from: v8::internal::compiler::PipelineImpl::SelectInstructions(v8::internal::compiler::Linkage*) in libv8_monolith.a(pipeline.o) v8::internal::CompilationStatistics::RecordPhaseStats(char const*, char const*, v8::internal::CompilationStatistics::BasicStats const&) in libv8_monolith.a(compilation-statistics.o) v8::internal::CompilationStatistics::BasicStats::Accumulate(v8::internal::CompilationStatistics::BasicStats const&) in libv8_monolith.a(compilation-statistics.o) v8::internal::CompilationStatistics::RecordPhaseKindStats(char const*, v8::internal::CompilationStatistics::BasicStats const&) in libv8_monolith.a(compilation-statistics.o) v8::internal::CompilationStatistics::RecordTotalStats(v8::internal::CompilationStatistics::BasicStats const&) in libv8_monolith.a(compilation-statistics.o) v8::internal::compiler::PipelineStatistics::CommonStats::End(v8::internal::compiler::PipelineStatistics*, v8::internal::CompilationStatistics::BasicStats*) in libv8_monolith.a(pipeline-statistics.o) "std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >::__init_copy_ctor_external(char const*, unsigned long)", referenced from: v8::WasmStreaming::WasmStreamingImpl::SetClient(std::__1::shared_ptrv8::WasmStreaming::Client)::'lambda'(std::__1::shared_ptrv8::internal::wasm::NativeModule const&)::operator()(std::__1::shared_ptrv8::internal::wasm::NativeModule const&) const in libv8_monolith.a(wasm-js.o) v8::internal::Isolate::DumpAndResetStats() in libv8_monolith.a(isolate.o) std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >, std::__1::pair<unsigned long long, unsigned long long> >, std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >, std::__1::pair<unsigned long long, unsigned long long> >, void*>, long>, bool> std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator ) in libv8_monolith.a(bytecodes.o) std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::basic_string<char, std::__1::char_traits>, std::__1::pair<unsigned long long, unsigned long long> >, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >, std::__1::pair<unsigned long long, unsigned long long> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > >, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >, std::__1::pair<unsigned long long, unsigned long long> > > >::__emplace_unique_key_args<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > const&>, std::__1::tuple<> >(std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > const&, std::__1::piecewise_construct_t const&, std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > const&>&&, std::__1::tuple<>&&) in libv8_monolith.a(isolate.o) v8_crdtp::DomainDispatcher::sendResponse(int, v8_crdtp::DispatchResponse const&, std::__1::unique_ptr<v8_crdtp::Serializable, std::__1::default_delete<v8_crdtp::Serializable> >) in libv8_monolith.a(dispatch.o) v8::base::OS::GetSharedLibraryAddresses() in libv8_monolith.a(platform-macos.o) v8::internal::interpreter::Bytecodes::ToString(v8::internal::interpreter::Bytecode, v8::internal::interpreter::OperandScale, char const , std::__1::allocator >, void*>>, bool> std::__1::__hash_table<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator const*, unsigned long, v8::base::debug::(anonymous namespace)::BacktraceOutputHandler*) in libv8_monolith.a(stack_trace_posix.o) "std::__1::basic_filebuf<char, std::__1::char_traits>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > > >::__emplace_unique_key_args<std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > const&>(std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > const&) in libv8_monolith.a(basic-block-profiler.o) ... "std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >::__erase_external_with_move(unsigned long, unsigned long)", referenced from: v8::base::debug::(anonymous namespace)::ProcessBacktrace(void >::open(char const*, unsigned int)", referenced from: v8::internal::V8::InitializeOncePerProcessImpl() in libv8_monolith.a(v8.o) v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) in libv8_monolith.a(isolate.o) v8::internal::compiler::TurboJsonFile::TurboJsonFile(v8::internal::OptimizedCompilationInfo*, unsigned int) in libv8_monolith.a(graph-visualizer.o) v8::internal::compiler::TurboJsonFile::TurboJsonFile(v8::internal::OptimizedCompilationInfo*, unsigned int) in libv8_monolith.a(graph-visualizer.o) v8::internal::compiler::TurboCfgFile::TurboCfgFile(v8::internal::Isolate*) in libv8_monolith.a(graph-visualizer.o) v8::internal::compiler::TurboCfgFile::TurboCfgFile(v8::internal::Isolate*) in libv8_monolith.a(graph-visualizer.o) "std::__1::basic_filebuf<char, std::__1::char_traits >::basic_filebuf()", referenced from: v8::internal::V8::InitializeOncePerProcessImpl() in libv8_monolith.a(v8.o) v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) in libv8_monolith.a(isolate.o) v8::internal::compiler::TurboJsonFile::TurboJsonFile(v8::internal::OptimizedCompilationInfo*, unsigned int) in libv8_monolith.a(graph-visualizer.o) v8::internal::compiler::TurboJsonFile::TurboJsonFile(v8::internal::OptimizedCompilationInfo*, unsigned int) in libv8_monolith.a(graph-visualizer.o) v8::internal::compiler::TurboCfgFile::TurboCfgFile(v8::internal::Isolate*) in libv8_monolith.a(graph-visualizer.o) v8::internal::compiler::TurboCfgFile::TurboCfgFile(v8::internal::Isolate*) in libv8_monolith.a(graph-visualizer.o) "std::__1::basic_filebuf<char, std::__1::char_traits >::~basic_filebuf()", referenced from: v8::internal::V8::InitializeOncePerProcessImpl() in libv8_monolith.a(v8.o) v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) in libv8_monolith.a(isolate.o) v8::internal::compiler::TurboJsonFile::~TurboJsonFile() in libv8_monolith.a(graph-visualizer.o) v8::internal::compiler::TurboJsonFile::~TurboJsonFile() in libv8_monolith.a(graph-visualizer.o) virtual thunk to v8::internal::compiler::TurboJsonFile::~TurboJsonFile() in libv8_monolith.a(graph-visualizer.o) v8::internal::compiler::TurboJsonFile::~TurboJsonFile() in libv8_monolith.a(graph-visualizer.o) virtual thunk to v8::internal::compiler::TurboJsonFile::~TurboJsonFile() in libv8_monolith.a(graph-visualizer.o) ... "std::__1::basic_stringbuf<char, std::__1::char_traits , std::__1::allocator >::str(std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > const&)", referenced from: v8::internal::TracingAccountingAllocator::UpdateMemoryTrafficAndReportMemoryUsage(unsigned long) in libv8_monolith.a(isolate.o) v8::platform::tracing::TraceConfig::IsCategoryGroupEnabled(char const*) const in libv8_monolith.a(trace-config.o) "VTT for std::__1::basic_ofstream<char, std::__1::char_traits >", referenced from: v8::internal::V8::InitializeOncePerProcessImpl() in libv8_monolith.a(v8.o) v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) in libv8_monolith.a(isolate.o) std::__1::basic_ofstream<char, std::__1::char_traits >::~basic_ofstream() in libv8_monolith.a(graph-visualizer.o) std::__1::basic_ofstream<char, std::__1::char_traits >::~basic_ofstream() in libv8_monolith.a(graph-visualizer.o) virtual thunk to std::__1::basic_ofstream<char, std::__1::char_traits >::~basic_ofstream() in libv8_monolith.a(graph-visualizer.o) virtual thunk to std::__1::basic_ofstream<char, std::__1::char_traits >::~basic_ofstream() in libv8_monolith.a(graph-visualizer.o) "VTT for std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >", referenced from: v8::base::debug::StackTrace::ToString() const in libv8_monolith.a(stack_trace.o) std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >::basic_stringstream() in libv8_monolith.a(js-objects.o) v8::internal::Heap::DumpJSONHeapStatistics(std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >&)::$_0::operator()(int) const in libv8_monolith.a(heap.o) v8::internal::AddressToString(unsigned long) in libv8_monolith.a(isolate.o) std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >::basic_stringstream() in libv8_monolith.a(mark-compact.o) std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >::~basic_stringstream() in libv8_monolith.a(mark-compact.o) v8::internal::ICInfo::AppendToTracedValue(v8::tracing::TracedValue*) const in libv8_monolith.a(ic-stats.o) ... "VTT for std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >", referenced from: v8::base::(anonymous namespace)::PrettyPrintChar(int) in libv8_monolith.a(logging.o) std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >::~basic_ostringstream() in libv8_monolith.a(logging.o) std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >::~basic_ostringstream() in libv8_monolith.a(logging.o) virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >::~basic_ostringstream() in libv8_monolith.a(logging.o) virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >::~basic_ostringstream() in libv8_monolith.a(logging.o) v8::internal::Object::ShortPrint(v8::internal::StringStream*) const in libv8_monolith.a(objects.o) v8::internal::(anonymous namespace)::PrintFunctionSource(v8::internal::StringStream*, v8::internal::SharedFunctionInfo, v8::internal::Code) in libv8_monolith.a(frames.o) ... "vtable for std::__1::basic_ofstream<char, std::__1::char_traits >", referenced from: v8::internal::V8::InitializeOncePerProcessImpl() in libv8_monolith.a(v8.o) v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) in libv8_monolith.a(isolate.o) std::__1::basic_ofstream<char, std::__1::char_traits >::~basic_ofstream() in libv8_monolith.a(graph-visualizer.o) std::__1::basic_ofstream<char, std::__1::char_traits >::~basic_ofstream() in libv8_monolith.a(graph-visualizer.o) virtual thunk to std::__1::basic_ofstream<char, std::__1::char_traits >::~basic_ofstream() in libv8_monolith.a(graph-visualizer.o) virtual thunk to std::__1::basic_ofstream<char, std::__1::char_traits >::~basic_ofstream() in libv8_monolith.a(graph-visualizer.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for std::__1::basic_stringbuf<char, std::__1::char_traits , std::__1::allocator >", referenced from: std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >* v8::base::MakeCheckOpString<int, int>(int, int, char const*) in libv8_monolith.a(logging.o) v8::base::CheckMessageStream::~CheckMessageStream() in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > v8::base::detail::PrintToString (int&&) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >* v8::base::MakeCheckOpString<long, long>(long, long, char const*) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > v8::base::detail::PrintToString (long&&) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >* v8::base::MakeCheckOpString<long long, long long>(long long, long long, char const*) in libv8_monolith.a(logging.o) std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > v8::base::detail::PrintToString (long long&&) in libv8_monolith.a(logging.o) ... NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >", referenced from: v8::base::debug::StackTrace::ToString() const in libv8_monolith.a(stack_trace.o) std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >::basic_stringstream() in libv8_monolith.a(js-objects.o) v8::internal::Heap::DumpJSONHeapStatistics(std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >&)::$_0::operator()(int) const in libv8_monolith.a(heap.o) v8::internal::AddressToString(unsigned long) in libv8_monolith.a(isolate.o) std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >::basic_stringstream() in libv8_monolith.a(mark-compact.o) v8::internal::ICInfo::AppendToTracedValue(v8::tracing::TracedValue*) const in libv8_monolith.a(ic-stats.o) std::__1::basic_stringstream<char, std::__1::char_traits , std::__1::allocator >::basic_stringstream(unsigned int) in libv8_monolith.a(gc-tracer.o) ... NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >", referenced from: v8::base::(anonymous namespace)::PrettyPrintChar(int) in libv8_monolith.a(logging.o) std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >::~basic_ostringstream() in libv8_monolith.a(logging.o) std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >::~basic_ostringstream() in libv8_monolith.a(logging.o) virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >::~basic_ostringstream() in libv8_monolith.a(logging.o) virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits , std::__1::allocator >::~basic_ostringstream() in libv8_monolith.a(logging.o) v8::internal::Object::ShortPrint(v8::internal::StringStream*) const in libv8_monolith.a(objects.o) v8::internal::(anonymous namespace)::PrintFunctionSource(v8::internal::StringStream*, v8::internal::SharedFunctionInfo, v8::internal::Code) in libv8_monolith.a(frames.o) ... NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64
@blabno Not sure why you tagged me.... But since you did, let me tell you a story - building V8 is always a journey for me. It goes something like this
- Step 1. Be angry with myself that I didn't document how I did it last time.
- Step 2. Figure out everything anew, mostly rediscovering obvious things.
- Step 3. Give up a couple of times.
- Step 4. Build a version that segfaults.
- Step 5. Give up for good.
- Step 6. Somehow manage to make a build that works.
This is my usual process. Last time I actually made some notes:
- Get the official v8 from source.
- Install depot_tools (whatever that is)
- Use the tools to get v8 sources (
fetch v8) - git checkout a version that you like eg '8.3.110.9'
- Do
gclient sync - generate
out.gnfolder by runningpython tools/dev/v8gen.py x64.release - Edit
out.gn/args.gn:
target_os = "mac"
target_cpu = "x64"
is_component_build = false
is_debug = false
use_custom_libcxx = false
v8_monolithic = true
v8_use_external_startup_data = false
symbol_level = 0
v8_enable_i18n_support= false
v8_enable_pointer_compression = false
ninja -C out.gn/x64.release -t cleanninja -C out.gn/x64.release/ v8_monolith
That should spit out the file you need.
Oh, and vagrant was a dead end; and the Docker build didn't work at all. I vaguely remember pulling out hair, then trying the same docker build on a Windows machine, which worked for some reason - don't ask.
Last thing, if you absolutely can't get it working, here's a file I found on my Mac. It may work, it may not, it may be a secret virus intended to screw up nuclear centrifuges - but if all else fails....