Re: [v8-users] Is "is_component_build" expected to work at all in v8 7.8?

2019-11-03 Thread Hans Maier
Hi,

the libc provided together with v8 is incompatible with the msvc-libc.
I had to provide "use_custom_libcxx=false" to be able to link it with my 
own program.


Am Sonntag, 3. November 2019 12:43:57 UTC+1 schrieb Ben Ernst:
>
> Of note, the sample utilities "d8" and "v8_hello_world" build fine, and 
> they don't get this same linker error. I can't see anything I'm doing 
> differently, however.
>
> On Sunday, 3 November 2019 22:08:27 UTC+10:30, Ben Ernst wrote:
>>
>> Thanks Jakob, is there by any chance a correpsonding buildbot for Windows 
>> and MSVC++? I get this linker error from it seems V8 7.2 onwards, although 
>> I'm focussing on 7.8. The "monolith" build seems to be working though. I 
>> wonder if it's an MSVC++ peculiarity that is tripping me up?
>> Regards,
>> Ben
>>
>> On Saturday, 2 November 2019 02:17:38 UTC+10:30, Jakob Kummerow wrote:
>>>
>>> Yes, the component build is expected to work for every version, and our 
>>> buildbot thinks it does: 
>>> https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20shared
>>>
>>> The component build is also the default in Debug mode, which most V8 
>>> developers compile/use every day.
>>>
>>>
>>> On Fri, Nov 1, 2019 at 1:00 AM Ben Ernst  wrote:
>>>
 Is the idea of a "component build", where you specify 
 "is_component_build=true" in the arguments to GN, actually supposed to 
 work 
 at all in V8 (v7.8)?

 In particular, I am getting this unresolved external symbol:

 1>ezv8_platform.obj : error LNK2019: unresolved external symbol 
 "__declspec(dllimport) class std::unique_ptr>>> std::default_delete > __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> >)" 
 (__imp_?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)

 The function "NewDefaultPlatform" seems to be exported from 
 v8_libplatform.

 V8_PLATFORM_EXPORT std::unique_ptr NewDefaultPlatform(
 int thread_pool_size = 0,
 IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled,
 InProcessStackDumping in_process_stack_dumping =
 InProcessStackDumping::kDisabled,
 std::unique_ptr tracing_controller = {});

 But the destructor of the base class, v8::Platform is not exported.

 /**
  * V8 Platform abstraction layer.
  *
  * The embedder has to provide an implementation of this interface 
 before
  * initializing the rest of V8.
  */
 class Platform {
  public:
   virtual ~Platform() = default;


 I think that's the cause of the error above, although I may have 
 misinterpreted the error message.

 Am I barking up the wrong tree by trying to use the component build at 
 all?

 Thanks in advance for any advice.





-- 
-- 
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/90d39cd7-0fc1-4730-9da9-9e0cc37bca3c%40googlegroups.com.


Re: [v8-users] Is "is_component_build" expected to work at all in v8 7.8?

2019-11-03 Thread Ben Ernst
Of note, the sample utilities "d8" and "v8_hello_world" build fine, and 
they don't get this same linker error. I can't see anything I'm doing 
differently, however.

On Sunday, 3 November 2019 22:08:27 UTC+10:30, Ben Ernst wrote:
>
> Thanks Jakob, is there by any chance a correpsonding buildbot for Windows 
> and MSVC++? I get this linker error from it seems V8 7.2 onwards, although 
> I'm focussing on 7.8. The "monolith" build seems to be working though. I 
> wonder if it's an MSVC++ peculiarity that is tripping me up?
> Regards,
> Ben
>
> On Saturday, 2 November 2019 02:17:38 UTC+10:30, Jakob Kummerow wrote:
>>
>> Yes, the component build is expected to work for every version, and our 
>> buildbot thinks it does: 
>> https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20shared
>>
>> The component build is also the default in Debug mode, which most V8 
>> developers compile/use every day.
>>
>>
>> On Fri, Nov 1, 2019 at 1:00 AM Ben Ernst  wrote:
>>
>>> Is the idea of a "component build", where you specify 
>>> "is_component_build=true" in the arguments to GN, actually supposed to work 
>>> at all in V8 (v7.8)?
>>>
>>> In particular, I am getting this unresolved external symbol:
>>>
>>> 1>ezv8_platform.obj : error LNK2019: unresolved external symbol 
>>> "__declspec(dllimport) class std::unique_ptr>> std::default_delete > __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> >)" 
>>> (__imp_?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)
>>>
>>> The function "NewDefaultPlatform" seems to be exported from 
>>> v8_libplatform.
>>>
>>> V8_PLATFORM_EXPORT std::unique_ptr NewDefaultPlatform(
>>> int thread_pool_size = 0,
>>> IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled,
>>> InProcessStackDumping in_process_stack_dumping =
>>> InProcessStackDumping::kDisabled,
>>> std::unique_ptr tracing_controller = {});
>>>
>>> But the destructor of the base class, v8::Platform is not exported.
>>>
>>> /**
>>>  * V8 Platform abstraction layer.
>>>  *
>>>  * The embedder has to provide an implementation of this interface before
>>>  * initializing the rest of V8.
>>>  */
>>> class Platform {
>>>  public:
>>>   virtual ~Platform() = default;
>>>
>>>
>>> I think that's the cause of the error above, although I may have 
>>> misinterpreted the error message.
>>>
>>> Am I barking up the wrong tree by trying to use the component build at 
>>> all?
>>>
>>> Thanks in advance for any advice.
>>>
>>>
>>>
>>>

-- 
-- 
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/e78c6991-e961-41ba-bfc8-db9882f2ddc6%40googlegroups.com.


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

2019-11-03 Thread Ben Ernst
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


On Thursday, 31 October 2019 00:39:15 UTC+10:30, Jakob Kummerow wrote:
>
> 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-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-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
>>  
>> 
>> .
>>
>

-- 
-- 
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