Re: [v8-users] How can I resolve or workaround this undefined symbol, building V8 on Windows 10, MSVC++2017?

2019-10-30 Thread Jakob Kummerow
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.)


On Wed, Oct 30, 2019 at 2:09 PM Ben Ernst  wrote:

> 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.
>
> --
> --
> 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/f7c1fe8f-f3a7-4f93-9764-465068250568%40googlegroups.com
> 
> .
>

-- 
-- 
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/CAKSzg3SsUCbXYfXdkxC%2BSnuo7mXfjrJD1pMyRm7dqUYRTDsTvg%40mail.gmail.com.


[v8-users] How can I resolve or workaround this undefined symbol, building V8 on Windows 10, MSVC++2017?

2019-10-30 Thread Ben Ernst
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.

-- 
-- 
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/f7c1fe8f-f3a7-4f93-9764-465068250568%40googlegroups.com.


Re: [v8-users] What do these unresolved external symbols mean when building against V8 7.8 "monolithic"?

2019-10-30 Thread Ben Ernst
Simon
Thank you, I will try that solution today.
Ben

On Wednesday, 30 October 2019 18:40:42 UTC+10:30, Simon Zünd wrote:
>
> Best guess, you linked the V8 monolith static library with the libstdc++ 
> thats pulled in by "gclient sync". The project itself is linked against the 
> standard library of Visual Studio.
>
> There is a GN option for this, try "use_custom_libcxx = false", which will 
> build V8 with the system C++ standard library.
>
> On Wed, Oct 30, 2019 at 8:02 AM Ben Ernst > 
> wrote:
>
>> My platform is Windows 10, Visual C++ 2017.
>>
>> I build a "monolithic" V8, and try to link against it. I am buried under 
>> linker errors.
>>
>> Just a taste below, the rest are attached. Any idea what I might be doing 
>> wrong? I don't remotely what I have supposedly done wrong.
>>
>>
>>
>> 1>ezv8_platform.obj : error LNK2019: unresolved external symbol "class 
>> std::unique_ptr> v8::Platform> > __cdecl v8::platform::NewDefaultPlatform(int,enum 
>> v8::platform::IdleTaskSupport,enum 
>> v8::platform::InProcessStackDumping,class std::unique_ptr> v8::TracingController,struct std::default_delete> v8::TracingController> >)" 
>> (?NewDefaultPlatform@platform@v8@@YA?AV?$unique_ptr@VPlatform@v8@@U?$default_delete@VPlatform@v8@@@std@@@std@@HW4IdleTaskSupport@12@W4InProcessStackDumping@12@V?$unique_ptr@VTracingController@v8@@U?$default_delete@VTracingController@v8@@@std@@@4@@Z)
>>  
>> referenced in function "public: __cdecl ezv8::Platform::Impl::Impl(void)" 
>> (??0Impl@Platform@ezv8@@QEAA@XZ)
>> 1>node_inspector_agent.obj : error LNK2019: unresolved external symbol 
>> "public: static class std::unique_ptr> v8_inspector::StringBuffer,struct std::default_delete> v8_inspector::StringBuffer> > __cdecl 
>> v8_inspector::StringBuffer::create(class v8_inspector::StringView const &)" 
>> (?create@StringBuffer@v8_inspector@@SA?AV?$unique_ptr@VStringBuffer@v8_inspector@@U?$default_delete@VStringBuffer@v8_inspector@@@std@@@std@@AEBVStringView@2@@Z)
>>  
>> referenced in function "class std::unique_ptr> v8_inspector::StringBuffer,struct std::default_delete> v8_inspector::StringBuffer> > __cdecl inspector::`anonymous 
>> namespace'::ToProtocolString(class v8::Isolate *,class v8::Local> v8::Value>)" 
>> (?ToProtocolString@?A0xd3023fdb@inspector@@YA?AV?$unique_ptr@VStringBuffer@v8_inspector@@U?$default_delete@VStringBuffer@v8_inspector@@@std@@@std@@PEAVIsolate@v8@@V?$Local@VValue@v8@@@6@@Z)
>> 1>node_inspector_io.obj : error LNK2001: unresolved external symbol 
>> "public: static class std::unique_ptr> v8_inspector::StringBuffer,struct std::default_delete> v8_inspector::StringBuffer> > __cdecl 
>> v8_inspector::StringBuffer::create(class v8_inspector::StringView const &)" 
>> (?create@StringBuffer@v8_inspector@@SA?AV?$unique_ptr@VStringBuffer@v8_inspector@@U?$default_delete@VStringBuffer@v8_inspector@@@std@@@std@@AEBVStringView@2@@Z)
>> 1>node_inspector_agent.obj : error LNK2019: unresolved external symbol 
>> "public: static class std::unique_ptr> v8_inspector::V8Inspector,struct std::default_delete> v8_inspector::V8Inspector> > __cdecl 
>> v8_inspector::V8Inspector::create(class v8::Isolate *,class 
>> v8_inspector::V8InspectorClient *)" 
>> (?create@V8Inspector@v8_inspector@@SA?AV?$unique_ptr@VV8Inspector@v8_inspector@@U?$default_delete@VV8Inspector@v8_inspector@@@std@@@std@@PEAVIsolate@v8@@PEAVV8InspectorClient@2@@Z)
>>  
>> referenced in function "public: __cdecl 
>> inspector::CBInspectorClient::CBInspectorClient(class v8::Isolate *,class 
>> v8::Platform *)" 
>> (??0CBInspectorClient@inspector@@QEAA@PEAVIsolate@v8@@PEAVPlatform@3@@Z)
>> 1>v8_monolith.lib(bytecode-array-random-iterator.obj) : error LNK2001: 
>> unresolved external symbol "protected: void __cdecl 
>> std::__1::__vector_base_common<1>::__throw_length_error(void)const " 
>> (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IEBAXXZ)
>> 1>v8_monolith.lib(liftoff-assembler.obj) : error LNK2001: unresolved 
>> external symbol "protected: void __cdecl 
>> std::__1::__vector_base_common<1>::__throw_length_error(void)const " 
>> (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IEBAXXZ)
>> 1>v8_monolith.lib(constant-array-builder.obj) : error LNK2001: unresolved 
>> external symbol "protected: void __cdecl 
>> std::__1::__vector_base_common<1>::__throw_length_error(void)const " 
>> (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IEBAXXZ)
>> 1>v8_monolith.lib(bytecode-array-writer.obj) : error LNK2001: unresolved 
>> external symbol "protected: void __cdecl 
>> std::__1::__vector_base_common<1>::__throw_length_error(void)const " 
>> (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IEBAXXZ)
>>
>>
>>
>> -- 
>> -- 
>> 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 

Re: [v8-users] What do these unresolved external symbols mean when building against V8 7.8 "monolithic"?

2019-10-30 Thread 'Simon Zünd' via v8-users
Best guess, you linked the V8 monolith static library with the libstdc++
thats pulled in by "gclient sync". The project itself is linked against the
standard library of Visual Studio.

There is a GN option for this, try "use_custom_libcxx = false", which will
build V8 with the system C++ standard library.

On Wed, Oct 30, 2019 at 8:02 AM Ben Ernst  wrote:

> My platform is Windows 10, Visual C++ 2017.
>
> I build a "monolithic" V8, and try to link against it. I am buried under
> linker errors.
>
> Just a taste below, the rest are attached. Any idea what I might be doing
> wrong? I don't remotely what I have supposedly done wrong.
>
>
>
> 1>ezv8_platform.obj : error LNK2019: unresolved external symbol "class
> std::unique_ptr v8::Platform> > __cdecl v8::platform::NewDefaultPlatform(int,enum
> v8::platform::IdleTaskSupport,enum
> v8::platform::InProcessStackDumping,class std::unique_ptr v8::TracingController,struct std::default_delete v8::TracingController> >)" (?NewDefaultPlatform@platform@v8@
> @YA?AV?$unique_ptr@VPlatform@v8@@U?$default_delete@VPlatform@v8@@@std@
> @@std@@HW4IdleTaskSupport@12@W4InProcessStackDumping@12
> @V?$unique_ptr@VTracingController@v8@@U?$default_delete@VTracingController
> @v8@@@std@@@4@@Z) referenced in function "public: __cdecl
> ezv8::Platform::Impl::Impl(void)" (??0Impl@Platform@ezv8@@QEAA@XZ)
> 1>node_inspector_agent.obj : error LNK2019: unresolved external symbol
> "public: static class std::unique_ptr v8_inspector::StringBuffer,struct std::default_delete v8_inspector::StringBuffer> > __cdecl
> v8_inspector::StringBuffer::create(class v8_inspector::StringView const &)"
> (?create@StringBuffer@v8_inspector@@SA?AV?$unique_ptr@VStringBuffer
> @v8_inspector@@U?$default_delete@VStringBuffer@v8_inspector@@@std@@@std@
> @AEBVStringView@2@@Z) referenced in function "class std::unique_ptr v8_inspector::StringBuffer,struct std::default_delete v8_inspector::StringBuffer> > __cdecl inspector::`anonymous
> namespace'::ToProtocolString(class v8::Isolate *,class v8::Local v8::Value>)" (?ToProtocolString@?A0xd3023fdb@inspector
> @@YA?AV?$unique_ptr@VStringBuffer@v8_inspector@
> @U?$default_delete@VStringBuffer@v8_inspector@@@std@@@std@@PEAVIsolate@v8
> @@V?$Local@VValue@v8@@@6@@Z)
> 1>node_inspector_io.obj : error LNK2001: unresolved external symbol
> "public: static class std::unique_ptr v8_inspector::StringBuffer,struct std::default_delete v8_inspector::StringBuffer> > __cdecl
> v8_inspector::StringBuffer::create(class v8_inspector::StringView const &)"
> (?create@StringBuffer@v8_inspector@@SA?AV?$unique_ptr@VStringBuffer
> @v8_inspector@@U?$default_delete@VStringBuffer@v8_inspector@@@std@@@std@
> @AEBVStringView@2@@Z)
> 1>node_inspector_agent.obj : error LNK2019: unresolved external symbol
> "public: static class std::unique_ptr v8_inspector::V8Inspector,struct std::default_delete v8_inspector::V8Inspector> > __cdecl
> v8_inspector::V8Inspector::create(class v8::Isolate *,class
> v8_inspector::V8InspectorClient *)" (?create@V8Inspector@v8_inspector@
> @SA?AV?$unique_ptr@VV8Inspector@v8_inspector@
> @U?$default_delete@VV8Inspector@v8_inspector@@@std@@@std@@PEAVIsolate@v8
> @@PEAVV8InspectorClient@2@@Z) referenced in function "public: __cdecl
> inspector::CBInspectorClient::CBInspectorClient(class v8::Isolate *,class
> v8::Platform *)" (??0CBInspectorClient@inspector@@QEAA@PEAVIsolate@v8@
> @PEAVPlatform@3@@Z)
> 1>v8_monolith.lib(bytecode-array-random-iterator.obj) : error LNK2001:
> unresolved external symbol "protected: void __cdecl
> std::__1::__vector_base_common<1>::__throw_length_error(void)const "
> (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IEBAXXZ)
> 1>v8_monolith.lib(liftoff-assembler.obj) : error LNK2001: unresolved
> external symbol "protected: void __cdecl
> std::__1::__vector_base_common<1>::__throw_length_error(void)const "
> (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IEBAXXZ)
> 1>v8_monolith.lib(constant-array-builder.obj) : error LNK2001: unresolved
> external symbol "protected: void __cdecl
> std::__1::__vector_base_common<1>::__throw_length_error(void)const "
> (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IEBAXXZ)
> 1>v8_monolith.lib(bytecode-array-writer.obj) : error LNK2001: unresolved
> external symbol "protected: void __cdecl
> std::__1::__vector_base_common<1>::__throw_length_error(void)const "
> (?__throw_length_error@?$__vector_base_common@$00@__1@std@@IEBAXXZ)
>
>
>
> --
> --
> 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/22d72edc-a80c-436f-9b7b-d5da1f715fa2%40googlegroups.com
>