Found a workaround to create static file successfully but I am not sure if this is a valid method: I found that removing use_custom_libcxx=false gn args created the static successfully. In the documentation I read that use_custom_libcxx is used to use c++ library present in buildTools. My System c++ library is clang. I am suspecting that is the reason it is failing.
I am unsure what the best practice is here. Should we use use_custom_libcxx or not? Anyhelp would be much appreciated. On Monday, July 31, 2023 at 5:08:24 PM UTC+5:30 Shivam Gupta wrote: > Hi Guys, > I am trying to create a static lib(monolith) for v8 11.3(11.3.244.12-pgo) > but while doing so I see below error in mksnapshot: > > *[1424/1433] LINK ./mksnapshot* > > FAILED: mksnapshot mksnapshot.dSYM/Contents/Info.plist > mksnapshot.dSYM/Contents/Resources/DWARF/mksnapshot > > TOOL_VERSION=1690480611 ../../build/toolchain/apple/linker_driver.py > -Wcrl,strippath,/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip > > -Wcrl,installnametoolpath,/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool > > ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wcrl,dsym,. > -Wcrl,dsymutilpath,../../tools/clang/dsymutil/bin/dsymutil -Werror > -fuse-ld=lld -Wl,-fatal_warnings -Wl,--icf=all -Wl,--color-diagnostics > -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -flto=thin > -Wl,--thinlto-jobs=all -Wl,-cache_path_lto,thinlto-cache > -Wcrl,object_path_lto > -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 > > -Wl,-mllvm,-import-instr-limit=30 -fwhole-program-vtables > -Wl,--strict-auto-link -Wl,--no-call-graph-profile-sort -arch x86_64 > -no-canonical-prefixes -isysroot > ../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk > > -mmacos-version-min=10.13 -Wl,--lto-O0 -Wl,-ObjC -Wcrl,strip,-x,-S > -Wl,-dead_strip -Wl,-no_data_in_code_info -Wl,-no_function_starts -o > "./mksnapshot" "@./mksnapshot.rsp" > > *ld64.lld: error: undefined symbol: vtable for > v8::internal::SimpleStringResource<unsigned short, > v8::String::ExternalStringResource>* > > *>>> referenced by externalize-string-extension.cc:23 > (../../src/extensions/externalize-string-extension.cc:23)* > > *>>> > /Users/shivamgupta/Desktop/v8/v8/out.gn/x64.release/tmpzjkia50z/141.x86_64.lto.o:(symbol > > <http://out.gn/x64.release/tmpzjkia50z/141.x86_64.lto.o:(symbol> > v8::internal::ExternalizeStringExtension::Externalize(v8::FunctionCallbackInfo<v8::Value> > > const&)+0x203)* > > > *ld64.lld: error: undefined symbol: vtable for > v8::internal::SimpleStringResource<char, > v8::String::ExternalOneByteStringResource>* > > *>>> referenced by externalize-string-extension.cc:23 > (../../src/extensions/externalize-string-extension.cc:23)* > > *>>> > /Users/shivamgupta/Desktop/v8/v8/out.gn/x64.release/tmpzjkia50z/141.x86_64.lto.o:(symbol > > <http://out.gn/x64.release/tmpzjkia50z/141.x86_64.lto.o:(symbol> > v8::internal::ExternalizeStringExtension::Externalize(v8::FunctionCallbackInfo<v8::Value> > > const&)+0x19a)* > > *>>> referenced by externalize-string-extension.cc:25 > (../../src/extensions/externalize-string-extension.cc:25)* > > *>>> > /Users/shivamgupta/Desktop/v8/v8/out.gn/x64.release/tmpzjkia50z/141.x86_64.lto.o:(symbol > > <http://out.gn/x64.release/tmpzjkia50z/141.x86_64.lto.o:(symbol> > v8::internal::SimpleStringResource<char, > v8::String::ExternalOneByteStringResource>::~SimpleStringResource()+0x7)* > > *>>> referenced by externalize-string-extension.cc:25 > (../../src/extensions/externalize-string-extension.cc:25)* > > *>>> * > */Users/shivamgupta/Desktop/v8/v8/out.gn/x64.release/tmpzjkia50z/141.x86_64.lto.o:(symbol > > <http://out.gn/x64.release/tmpzjkia50z/141.x86_64.lto.o:(symbol> > v8::internal::SimpleStringResource<char, > v8::String::ExternalOneByteStringResource>::~SimpleStringResource()+0xc)* > > I used the following gn commands: > is_debug=false > target_cpu="arm64" ("x64" for x86 arch) > v8_target_cpu="arm64" ("x64" for x86 arch) > v8_monolithic=true > v8_use_external_startup_data=false > is_component_build=false > use_custom_libcxx=false > symbol_level=2 > v8_enable_i18n_support=false > is_official_build=true > chrome_pgo_phase=false > > Does anybody know what could be the possible reason or possible fix for > this? Anyhelp would be much appreciated. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/b32a0e79-4bbb-4331-a232-2f229e194175n%40googlegroups.com.