How can I resolve or workaround this undefined symbol, building V8 on Windows 10, MSVC++2017?

53 views
Skip to first unread message

Ben Ernst

unread,
Oct 30, 2019, 9:09:51 AM10/30/19
to v8-users
I am building V8 7.8 (Windows 10, MSVC++ 2017) . My arguments to "GN" are as follows:

treat_warnings_as_errors=false
is_component_build=true
v8_enable_i18n_support=false
v8_use_snapshot=true

I invoke ninja as follows. 

ninja -C out.gn/x64.release 

I encounter the below error toward the end of the build. An undefined symbol referring to "unibrow". Any idea how I might resolve or work around this error? Thank you in advance for any advice.

     [exec] [1204/1220] CXX obj/test/cctest/cctest_sources/test-run-wasm-atomics.obj
     [exec] [1205/1220] CXX obj/test/cctest/cctest_sources/test-orderedhashtable.obj
     [exec] [1206/1220] CXX obj/test/cctest/cctest_sources/test-roots.obj
     [exec] [1207/1220] CXX obj/tools/debug_helper/v8_debug_helper/class-debug-readers-tq.obj
     [exec] [1208/1220] CXX obj/test/cctest/cctest_sources/test-types.obj
     [exec] [1209/1220] CXX obj/tools/debug_helper/v8_debug_helper/get-object-properties.obj
     [exec] [1210/1220] LINK(DLL) v8_debug_helper.dll v8_debug_helper.dll.lib v8_debug_helper.dll.pdb
     [exec] [1211/1220] STAMP obj/test/cctest/cctest_sources.stamp
     [exec] [1212/1220] LINK cctest.exe cctest.exe.pdb
     [exec] FAILED: cctest.exe cctest.exe.pdb
     [exec] ninja -t msvc -e environment.x64 -- ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /OUT:./cctest.exe /PDB:./cctest.exe.pdb @./cctest.exe.rsp
     [exec] lld-link: error: undefined symbol: public: static int __cdecl unibrow::ToUppercase::Convert(unsigned int, unsigned int, unsigned int *, bool *)
     [exec] >>> referenced by .\..\..\test\cctest\test-regexp.cc:1333
     [exec] >>>               obj/test/cctest/cctest_sources/test-regexp.obj:(void __cdecl v8::internal::test_regexp::TestLatinCanonicalize(void))
     [exec] >>> referenced by .\..\..\test\cctest\test-strings.cc:1642
     [exec] >>>               obj/test/cctest/cctest_sources/test-strings.obj:(void __cdecl v8::internal::test_strings::TestLatin1IgnoreCase(void))
     [exec] >>> referenced by .\..\..\test\cctest\test-strings.cc:1658
     [exec] >>>               obj/test/cctest/cctest_sources/test-strings.obj:(void __cdecl v8::internal::test_strings::TestLatin1IgnoreCase(void))
     [exec]
     [exec] lld-link: error: undefined symbol: public: static int __cdecl unibrow::ToLowercase::Convert(unsigned int, unsigned int, unsigned int *, bool *)
     [exec] >>> referenced by .\..\..\test\cctest\test-strings.cc:1641
     [exec] >>>               obj/test/cctest/cctest_sources/test-strings.obj:(void __cdecl v8::internal::test_strings::TestLatin1IgnoreCase(void))
     [exec] >>> referenced by .\..\..\test\cctest\test-strings.cc:1655
     [exec] >>>               obj/test/cctest/cctest_sources/test-strings.obj:(void __cdecl v8::internal::test_strings::TestLatin1IgnoreCase(void))
     [exec] [1213/1220] LINK wasm_api_tests.exe wasm_api_tests.exe.pdb
     [exec] [1214/1220] LINK unittests.exe unittests.exe.pdb
     [exec] ninja: build stopped: subcommand failed.

Jakob Kummerow

unread,
Oct 30, 2019, 10:09:15 AM10/30/19
to v8-users
If I had to guess: unibrow::ToUppercase::Convert in src/strings/unicode.h needs a V8_EXPORT_PRIVATE annotation in order to support the specific combination of building (1) cctests (2) on Windows (3) with is_component_build = true and (4) with v8_enable_i18n_support = false.

If that theory is correct, then for a quick workaround, you can change any of those four ingredients to the situation. (E.g. if all you need is a DLL to link your embedding application against, simply don't build cctests.exe.)


--
--
v8-users mailing list
v8-u...@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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/f7c1fe8f-f3a7-4f93-9764-465068250568%40googlegroups.com.

Ben Ernst

unread,
Nov 3, 2019, 6:41:54 AM11/3/19
to v8-users
Thank you Jakob for your advice.
For the record, for anyone stumbling across this thread, I changed ingredient (1), and built just targets "v8", "v8_base" and "v8_platform" by passing those arguments to Ninja.
Ben
To unsubscribe from this group and stop receiving emails from it, send an email to v8-u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages