Re: [v8-users] Re: [8.7] Compile errors with Visual Studio 2019

2021-02-01 Thread Rodrigo Hernandez
Is there a reason it MUST be 8.7?

I am the current maintainer for Windows builds on VCPKG and Mingw-w64, the 
VCPKG version is probably exactly what you need, but it currently sits at 
8.6.
I am working on an update to current stable version 8.8, but if it must be 
8.7 you may have to see the port and figure it out yourself.
VCPKG: https://github.com/microsoft/vcpkg
Direct link to the port: 
https://github.com/microsoft/vcpkg/tree/master/ports/v8

On Monday, February 1, 2021 at 9:07:35 AM UTC-6 quinte...@gmail.com wrote:

> Thanks for getting back to me!
>
> I've looked into fixing the compilation issues with Visual Studio 2019, 
> but the problems range from "explicit move constructors are needed" to 
> "don't use the /Zb:inline flag" and "I don't know why this exported class 
> cannot be found by the linker".
>
> I don't think it's feasible for me to both fix and maintain compiling V8 
> with Visual Studio. It's clear that the project's use of cutting-edge C++ 
> features is incompatible with the toolchain I'm using on my project.
>
> I will instead be using Duktape (https://duktape.org/), which seems much 
> closer aligned to my project's goals. I will therefore not require any 
> further assistance with V8.
>
> -Quinten
>
> On Mon, Feb 1, 2021 at 12:24 PM Ben Ernst  wrote:
>
>> Unfortunately the DLL build under MSVC++ breaks constantly and requires 
>> smarter people than me to fix it. If you can rearchitect your app to permit 
>> static linking to V8, you'll have a much better experience.
>> Ben.
>>
>> On Wednesday, 27 January 2021 at 19:17:20 UTC+10:30 quinte...@gmail.com 
>> wrote:
>>
>>> Hey there,
>>>
>>> I am trying to build V8 version 8.7 on Windows using Visual Studio 
>>> Professional 2019, but I'm getting compile errors due to what appears to be 
>>> missing move semantics for an std::unique_ptr:
>>>
>>> 1>  ninja -t msvc -e environment.x64 -- "C:\Program Files 
>>> (x86)\Microsoft Visual 
>>> Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64/cl.exe" 
>>> /nologo /showIncludes -DUSE_AURA=1 -D_HAS_EXCEPTIONS=0 -DCOMPONENT_BUILD 
>>> -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE 
>>> -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS 
>>> -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL 
>>> -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX 
>>> -D_UNICODE -DUNICODE -DNTDDI_VERSION=NTDDI_WIN10_VB -D_WIN32_WINNT=0x0A00 
>>> -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 
>>> -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_MINOR_MC -DV8_INTL_SUPPORT 
>>> -DENABLE_HANDLE_ZAPPING -DV8_USE_EXTERNAL_STARTUP_DATA 
>>> -DV8_ATOMIC_OBJECT_FIELD_WRITES -DV8_ATOMIC_MARKING_STATE 
>>> -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_WIN64_UNWINDING_INFO 
>>> -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION 
>>> -DV8_GN_HEADER -DV8_GN_HEADER -DV8_TARGET_ARCH_X64 -DV8_HAVE_TARGET_OS 
>>> -DV8_TARGET_OS_WIN -DDISABLE_UNTRUSTED_CODE_MITIGATIONS 
>>> -DBUILDING_V8_SHARED -DV8_GN_HEADER -DV8_GN_HEADER -DUSING_V8_BASE_SHARED 
>>> -DUSING_V8_PLATFORM_SHARED -DV8_GN_HEADER -DV8_GN_HEADER 
>>> -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 
>>> -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 
>>> -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=wchar_t -I../.. -Igen 
>>> -I../.. -I../../include -Igen -Igen/include -Igen/include -I../../include 
>>> -I../../include -Igen/include -I../../third_party/icu/source/common 
>>> -I../../third_party/icu/source/i18n -I../../include 
>>> -I../../third_party/zlib /Gy /FS /bigobj /utf-8 /Zc:sizedDealloc- /wd4117 
>>> /D__DATE__= /D__TIME__= /D__TIMESTAMP__= /W4 /WX /wd4091 /wd4127 /wd4251 
>>> /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 
>>> /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 
>>> /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 /wd4201 /wd4204 /wd4221 /wd4245 
>>> /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 /wd4661 /wd4706 /wd4715 /Zi 
>>> /MD /wd4245 /wd4267 /wd4324 /wd4701 /wd4702 /wd4703 /wd4709 /wd4714 /wd4715 
>>> /wd4718 /wd4723 /wd4724 /wd4800 /wd5205 /wd4506 /O2 /Ob2 /Oy- /Zc:inline 
>>> /Gw /TP /wd4577 /GR- /c ../../src/api/api.cc 
>>> /Foobj/v8_base_without_compiler/api.obj 
>>> /Fd"obj/v8_base_without_compiler_cc.pdb"
>>> 1>  C:\Program Files (x86)\Microsoft Visual 
>>> Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\xutility(4142): 
>>> error C2280: 
>>> 'std::unique_ptr>
>>>  
>>> ::unique_ptr>::operator
>>>  
>>> =(const 
>>> std::unique_ptr>
>>>  
>>> &)': attempting to reference a deleted function
>>> 1>  C:\Program Files (x86)\Microsoft Visual 
>>> Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2552): 
>>> note: see declaration of 
>>> 'std::unique_ptr>::operator
>>>  
>>> ='
>>> 1>  C:\Program Files (x86)\Microsoft Visual 
>>> Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\memory(2552): 
>>> note: 
>>> 'std::unique_ptr>

Re: [v8-users] Enable pointer compression V8 8.6

2020-10-24 Thread Rodrigo Hernandez
Hi Ben,

You need to add - DV8_COMPRES_POINTERS to your compile flags.




On Sat, Oct 24, 2020, 7:06 PM Ben Ernst  wrote:

> Hey all, thank you in advance for any advice here. How does one enable
> pointer compression? I'm updating from v7.1 to v8.6, and I get this error
> message (below) at runtime. It is probably something minor I overlooked in
> the code samples.
>
>
>
> #
> # Fatal error in ../../src/api/api.cc, line 5696
> # Embedder-vs-V8 build configuration mismatch. On embedder side pointer
> compression is DISABLED while on V8 side it's ENABLED.
> #
> #
> #
> #FailureMessage Object: 0078F51FF0A0
>  C stack trace ===
>
> v8::base::debug::StackTrace::StackTrace [0x7FF77D4C776B+27]
> v8::platform::DefaultPlatform::PostJob [0x7FF77D4C4141+401]
> V8_Fatal [0x7FF77B7A5787+167]
> v8::V8::Initialize [0x7FF77B73D78D+77]
> v8::V8::Initialize [0x7FF77B545CE0+176]
> (C:\Code\Optimatics\justobjects\libs\3rdParty\include\v8.h:9655)
> ezv8::Platform::Impl::Impl [0x7FF77B54BBC3+259]
> (C:\Code\Optimatics\justobjects\src\ezv8\platform.cpp:46)
> std::_Construct_in_place
> [0x7FF77D4A9AB2+98] (C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\xmemory:231)
>
> std::_Ref_count_obj2::_Ref_count_obj2<>
> [0x7FF77D4A9637+119] (C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\memory:1428)
> std::make_shared [0x7FF77B54B9F8+120]
> (C:\Program Files (x86)\Microsoft Visual
> Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110\include\memory:2072)
> ezv8::Platform::Platform [0x7FF77D4AA585+69]
> (C:\Code\Optimatics\justobjects\src\ezv8\platform.cpp:24)
> `dynamic initializer for 'platform'' [0x7FF77B52CBB7+71]
> (C:\Code\Optimatics\justobjects\src\ezv8\platform.cpp:70)
>
> --
> --
> 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/a0e1506d-5f78-4265-b7de-0a5de957f8f6n%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/CAOxB8nagHU5qxfajoJ53GJ0yn47PozhSQHSnSP%2B%3Dt-0yyrJCqw%40mail.gmail.com.


Re: [v8-users] Recovering a FunctionTemplate (or how to ->Inherit from one you've lost the handle to?)

2020-10-23 Thread Rodrigo Hernandez
Yeah, that sounds like needlessly complicating things even more. I'll just 
stash this problem for now since its already working.

Thanks again!

On Friday, October 23, 2020 at 12:16:09 AM UTC-6 boi...@gmail.com wrote:

> I work with embedded V8, not with node, so some of that is french to me :)
> I tried storing FunctionTemplate in a Value and encountered the same error.
> If you're keeping the persistent handles in a global collection in any 
> case, you might consider taking a raw pointer to the Persistent, and 
> storing that in a v8::External. Then you can static_cast it back to 
> FunctionTemplate where you call "Inherit". It still means you're doing some 
> deliberate garbage handling however.
>
> On Friday, 23 October 2020 at 06:35:07 UTC+10:30 Rodrigo Hernandez wrote:
>
>> Hi Ben,
>>
>> Yes, however what I need to store is the v8::FunctionTemplate, 
>> v8::Local to be more specific, which does not inherit 
>> from Value and there is a static_assert that checks for that.
>>
>> So perhaps, maybe if go to the real problem a different solution may 
>> arise.
>>
>> I have a Js wrapper C++ base class from which all C++-to-Js must inherit, 
>> this is based on the code for Node.js, so when I write a new class that 
>> inherits from this wrapper, I need to allocate a FunctionTemplate on the 
>> isolate/context pair, like so:
>>
>> I removed some lines, but otherwise you can look at this code here: 
>> https://github.com/AeonGames/AeonGUI/blob/master/core/dom/EventTarget.cpp#L23
>>
>> void EventTarget::Initialize ( v8::Isolate* aIsolate )
>> {
>> v8::Local context = aIsolate->GetCurrentContext();
>> //---
>> // Store constructor on a callback data object
>>
>> v8::Local constructor_data_template = 
>> v8::ObjectTemplate::New ( aIsolate );
>> constructor_data_template->SetInternalFieldCount ( 1 );
>> v8::Local constructor_data =
>>
>> constructor_data_template->NewInstance ( context 
>> ).ToLocalChecked();
>>
>> // Prepare EventTarget constructor template
>> v8::Local constructor_template = 
>> v8::FunctionTemplate::New ( aIsolate, JsObjectWrap::New, 
>> constructor_data ); 
>> // <- THIS IS THE FunctionTemplate I NEED TO STORE
>>
>> constructor_template->SetClassName ( v8::String::NewFromUtf8 ( 
>> aIsolate, "EventTarget" ).ToLocalChecked() );
>>
>> constructor_template->InstanceTemplate()->SetInternalFieldCount ( 1 
>> );
>>
>> 
>> AddFunctionTemplate ( aIsolate, typeid ( EventTarget ), constructor_template 
>> ); 
>> // < THIS IS MY CURRENT SOLUTION
>>
>> //
>>
>>
>> v8::Local event = event_template->GetFunction ( 
>> context ).ToLocalChecked();
>> context->Global()->Set ( context, v8::String::NewFromUtf8 (
>>  aIsolate, "Event" ).ToLocalChecked(),
>>  event ).FromJust();
>>
>>
>> v8::Local constructor = 
>> constructor_template->GetFunction ( context ).ToLocalChecked();
>> constructor_data->SetInternalField ( 0, constructor );
>> context->Global()->Set ( context, v8::String::NewFromUtf8 (
>>
>>  aIsolate, "EventTarget" 
>> ).ToLocalChecked(),
>>  constructor ).FromJust();
>> }
>>
>> Then, when I want to have Node inherit from EventTarget I write a similar 
>> static function (the previous one is also static)
>> https://github.com/AeonGames/AeonGUI/blob/master/core/dom/Node.cpp#L221
>>
>> void Node::Initialize ( v8::Isolate* aIsolate )
>> {
>> if ( HasFunctionTemplate ( aIsolate, typeid ( Node ) ) )
>> {
>> throw std::runtime_error ( "Isolate already initialized." );
>> }
>>
>> v8::Local context = aIsolate->GetCurrentContext();
>>
>> // Prepare Node constructor template
>>
>> v8::Local constructor_template = 
>> v8::FunctionTemplate::New ( aIsolate );
>>
>> constructor_template->SetClassName ( v8::String::NewFromUtf8 ( 
>> aIsolate, "Node" ).ToLocalChecked() );
>> constructor_template->Inherit ( EventTarget::GetFunctionTemplate ( 
>> aIsolate, typeid (

[v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-10-22 Thread Rodrigo Hernandez
I almost forgot, I created this repo for my own sanity:

https://github.com/AeonGames/v8-builder

it has bash scripts to make generating patches for new versions easier... 
or at least for me 


On Thursday, October 22, 2020 at 2:12:47 PM UTC-6 Rodrigo Hernandez wrote:

> Latest is  8.5.210.20 , there is a PR at 
> https://github.com/microsoft/vcpkg/pull/13355 that is ready to merge but 
> I guess got neglected.
>
> you can grab the patches from there, I have not made a push upstream 
> because I really needed a break from v8 building, and because my latest 
> changes
> include a new toolchain for MinGW-w64 and are not so trivial.
>
> Let me know if there's something else I can help with.
>
> On Wednesday, October 21, 2020 at 5:34:49 PM UTC-6 boi...@gmail.com wrote:
>
>> What version of V8 did this change go into? I built 8.6 yesterday, but 
>> still get the below error at linking, I thought I might try going back to 
>> whatever version you successfully used.
>>
>> 1>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>C:\Code\Optimatics\justobjects\src\x64\Debug\ezv8.dll : fatal error 
>> LNK1120: 1 unresolved externals
>>
>>
>>
>> On Wednesday, 5 August 2020 at 07:53:41 UTC+9:30 kosit la-orngsri wrote:
>>
>>> สวัสดี
>>>
>>> ในวันที่ วันพุธที่ 5 สิงหาคม ค.ศ. 2020 เวลา 0 นาฬิกา 59 นาที 57 วินาที 
>>> UTC+7 Rodrigo Hernandez เขียนว่า:
>>>
>>>>
>>>> A PR for the vcpkg port is up at:
>>>>
>>>> https://github.com/microsoft/vcpkg/pull/12687
>>>>
>>>> Just working out the final issues with x86-windows.
>>>>
>>>>
>>>> On Thursday, July 9, 2020 at 2:06:21 PM UTC-6, Rodrigo Hernandez wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I am trying to create a VCPKG (https://github.com/microsoft/vcpkg) 
>>>>> port of v8,
>>>>> and in doing so I am syncing to tag 8.3.110.13 as suggested here: 
>>>>> https://v8.dev/docs/version-numbers
>>>>>
>>>>> Since this is package manager, I want to build against msvc's c++ lib, 
>>>>> so I am using use_custom_libcxx=false,
>>>>> however I am seeing linking errors related to undefined symbols on 
>>>>> debug builds like:
>>>>>
>>>>> [1797/2086] LINK(DLL) v8.dll v8.dll.lib v8.dll.pdb
>>>>> FAILED: v8.dll v8.dll.lib v8.dll.pdb 
>>>>> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>>>>>  
>>>>> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
>>>>> False link.exe /nologo /IMPLIB:./v8.dll.lib /DLL /OUT:./v8.dll 
>>>>> /PDB:./v8.dll.pdb @./v8.dll.rsp
>>>>> class-verifiers-tq.obj : error LNK2019: unresolved external symbol 
>>>>> "public: class v8::internal::TNode __cdecl 
>>>>> v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class 
>>>>> v8::internal::TNode,class 
>>>>> v8::internal::TNode)" 
>>>>> (?IsFastJSArray@TorqueGeneratedExportedMacrosAssembler@internal@v8@@QEAA?AV?$TNode@UBoolT@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@@Z)
>>>>>  
>>>>> referenced in function "public: class v8::internal::TNode>>>> v8::internal::JSArray> __cdecl 
>>>>> v8::internal::CodeStubAssembler::TaggedToFastJSArray(class 
>>>>> v8::internal::TNode,class 
>>>>> v8::internal::TNode,class 
>>>>> v8::internal::compiler::CodeAssemblerLabel *)" 
>>>>> (?TaggedToFastJSArray@CodeStubAssembler@internal@v8@@QEAA?AV?$TNode@VJSArray@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@PEAVCodeAssemblerLabel@compiler@23@@Z)
>>>&g

[v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-10-22 Thread Rodrigo Hernandez
Latest is  8.5.210.20 , there is a PR at 
https://github.com/microsoft/vcpkg/pull/13355 that is ready to merge but I 
guess got neglected.

you can grab the patches from there, I have not made a push upstream 
because I really needed a break from v8 building, and because my latest 
changes
include a new toolchain for MinGW-w64 and are not so trivial.

Let me know if there's something else I can help with.

On Wednesday, October 21, 2020 at 5:34:49 PM UTC-6 boi...@gmail.com wrote:

> What version of V8 did this change go into? I built 8.6 yesterday, but 
> still get the below error at linking, I thought I might try going back to 
> whatever version you successfully used.
>
> 1>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>C:\Code\Optimatics\justobjects\src\x64\Debug\ezv8.dll : fatal error 
> LNK1120: 1 unresolved externals
>
>
>
> On Wednesday, 5 August 2020 at 07:53:41 UTC+9:30 kosit la-orngsri wrote:
>
>> สวัสดี
>>
>> ในวันที่ วันพุธที่ 5 สิงหาคม ค.ศ. 2020 เวลา 0 นาฬิกา 59 นาที 57 วินาที 
>> UTC+7 Rodrigo Hernandez เขียนว่า:
>>
>>>
>>> A PR for the vcpkg port is up at:
>>>
>>> https://github.com/microsoft/vcpkg/pull/12687
>>>
>>> Just working out the final issues with x86-windows.
>>>
>>>
>>> On Thursday, July 9, 2020 at 2:06:21 PM UTC-6, Rodrigo Hernandez wrote:
>>>
>>>> Hello,
>>>>
>>>> I am trying to create a VCPKG (https://github.com/microsoft/vcpkg) 
>>>> port of v8,
>>>> and in doing so I am syncing to tag 8.3.110.13 as suggested here: 
>>>> https://v8.dev/docs/version-numbers
>>>>
>>>> Since this is package manager, I want to build against msvc's c++ lib, 
>>>> so I am using use_custom_libcxx=false,
>>>> however I am seeing linking errors related to undefined symbols on 
>>>> debug builds like:
>>>>
>>>> [1797/2086] LINK(DLL) v8.dll v8.dll.lib v8.dll.pdb
>>>> FAILED: v8.dll v8.dll.lib v8.dll.pdb 
>>>> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>>>>  
>>>> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
>>>> False link.exe /nologo /IMPLIB:./v8.dll.lib /DLL /OUT:./v8.dll 
>>>> /PDB:./v8.dll.pdb @./v8.dll.rsp
>>>> class-verifiers-tq.obj : error LNK2019: unresolved external symbol 
>>>> "public: class v8::internal::TNode __cdecl 
>>>> v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class 
>>>> v8::internal::TNode,class 
>>>> v8::internal::TNode)" 
>>>> (?IsFastJSArray@TorqueGeneratedExportedMacrosAssembler@internal@v8@@QEAA?AV?$TNode@UBoolT@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@@Z)
>>>>  
>>>> referenced in function "public: class v8::internal::TNode>>> v8::internal::JSArray> __cdecl 
>>>> v8::internal::CodeStubAssembler::TaggedToFastJSArray(class 
>>>> v8::internal::TNode,class 
>>>> v8::internal::TNode,class 
>>>> v8::internal::compiler::CodeAssemblerLabel *)" 
>>>> (?TaggedToFastJSArray@CodeStubAssembler@internal@v8@@QEAA?AV?$TNode@VJSArray@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@PEAVCodeAssemblerLabel@compiler@23@@Z)
>>>>
>>>> There's 75 symbols missing in total, all in class-verifiers-tq.obj, I 
>>>> can post the rest if needed, but hopefully this will give you an idea.
>>>>
>>>> On release builds there is only one undefined symbol: void __cdecl 
>>>> v8::internal::FixedArray::set(int,class v8::internal::Smi), which I 
>>>> believe 
>>>> should be in fixed-array-tq-csa.obj,
>>>> but it is not there. There are 2 overrides right next to its definition 
>>>> in fixed-array-inl.h that do seem to exist in the object file but 

Re: [v8-users] Recovering a FunctionTemplate (or how to ->Inherit from one you've lost the handle to?)

2020-10-22 Thread Rodrigo Hernandez
Hi Ben,

Yes, however what I need to store is the v8::FunctionTemplate, 
v8::Local to be more specific, which does not inherit 
from Value and there is a static_assert that checks for that.

So perhaps, maybe if go to the real problem a different solution may arise.

I have a Js wrapper C++ base class from which all C++-to-Js must inherit, 
this is based on the code for Node.js, so when I write a new class that 
inherits from this wrapper, I need to allocate a FunctionTemplate on the 
isolate/context pair, like so:

I removed some lines, but otherwise you can look at this code 
here: 
https://github.com/AeonGames/AeonGUI/blob/master/core/dom/EventTarget.cpp#L23

void EventTarget::Initialize ( v8::Isolate* aIsolate )
{
v8::Local context = aIsolate->GetCurrentContext();
//---
// Store constructor on a callback data object
v8::Local constructor_data_template = 
v8::ObjectTemplate::New ( aIsolate );
constructor_data_template->SetInternalFieldCount ( 1 );
v8::Local constructor_data =
constructor_data_template->NewInstance ( context ).ToLocalChecked();

// Prepare EventTarget constructor template
v8::Local constructor_template = 
v8::FunctionTemplate::New ( aIsolate, JsObjectWrap::New, 
constructor_data ); 
// <- THIS IS THE FunctionTemplate I NEED TO STORE
constructor_template->SetClassName ( v8::String::NewFromUtf8 ( 
aIsolate, "EventTarget" ).ToLocalChecked() );
constructor_template->InstanceTemplate()->SetInternalFieldCount ( 1 );


AddFunctionTemplate ( aIsolate, typeid ( EventTarget ), constructor_template ); 
// < THIS IS MY CURRENT SOLUTION

//

v8::Local event = event_template->GetFunction ( context 
).ToLocalChecked();
context->Global()->Set ( context, v8::String::NewFromUtf8 (
 aIsolate, "Event" ).ToLocalChecked(),
 event ).FromJust();

v8::Local constructor = constructor_template->GetFunction 
( context ).ToLocalChecked();
constructor_data->SetInternalField ( 0, constructor );
context->Global()->Set ( context, v8::String::NewFromUtf8 (
 aIsolate, "EventTarget" ).ToLocalChecked(),
 constructor ).FromJust();
}

Then, when I want to have Node inherit from EventTarget I write a similar 
static function (the previous one is also static)
https://github.com/AeonGames/AeonGUI/blob/master/core/dom/Node.cpp#L221

void Node::Initialize ( v8::Isolate* aIsolate )
{
if ( HasFunctionTemplate ( aIsolate, typeid ( Node ) ) )
{
throw std::runtime_error ( "Isolate already initialized." );
}

v8::Local context = aIsolate->GetCurrentContext();

// Prepare Node constructor template
v8::Local constructor_template = 
v8::FunctionTemplate::New ( aIsolate );
constructor_template->SetClassName ( v8::String::NewFromUtf8 ( 
aIsolate, "Node" ).ToLocalChecked() );
constructor_template->Inherit ( EventTarget::GetFunctionTemplate ( 
aIsolate, typeid ( EventTarget ) ) ); 
// <-- THIS IS WHAT I REALLY NEED

AddFunctionTemplate ( aIsolate, typeid ( Node ), constructor_template );

v8::Local constructor = constructor_template->GetFunction 
( context ).ToLocalChecked();
context->Global()->Set ( context, v8::String::NewFromUtf8 (
 aIsolate, "Node" ).ToLocalChecked(),
 constructor ).FromJust();
}

As I said before, this works but I feel that makes the code too verbose and 
prone to error, for example now I am now forced to have a trivial Finalize 
function on all classes:

void Node::Finalize ( v8::Isolate* aIsolate )
{
RemoveFunctionTemplate ( aIsolate, typeid ( Node ) );
}

because the FunctionTemplate objects are stored as Persistent Handles in 
this map:

static std::unordered_map, 
v8::Persistent>> FunctionTemplates{};

So I need to free them all, unlike a Local.

So, perhaps there is a way where I can either store the template in the 
constructor, or maybe there is a way to have Node inherit from EventTarget 
without requiring the FunctionTemplate, but instead require just the 
function?

Thanks for taking a look!
On Wednesday, October 21, 2020 at 5:39:59 PM UTC-6 boi...@gmail.com wrote:

> Rodrigo, you should be able to trivially cast a v8::Function or v8::Object 
> to v8::Value is that what you're trying to do? In that case you don't need 
> to put them in a v8::External. You can pass those objects to 
> data->SetInternalField safely I would think.
> Ben
>
>
> On Tuesday, 20 October

Re: [v8-users] Recovering a FunctionTemplate (or how to ->Inherit from one you've lost the handle to?)

2020-10-19 Thread Rodrigo Hernandez
So, coming back to this, is there a way to cast/convert/wrap a local 
template (function or object) into a v8::Value?
I am thinking about hiding them inside an internal field so I could do:

context->global()->GetFunction("constructor")->GetInternalField(X).

how safe would it be to cast them to a void* and wrapping them inside a 
v8::External?

On Sunday, October 11, 2020 at 11:40:27 AM UTC-6 Rodrigo Hernandez wrote:

> Thanks Ben, I see how those are less optimal, I was hoping for something 
> along the lines of context->global()->GetFunctionTemplate("constructor"), 
> or something along those lines.
> The only problem I have with my approach is that I need a Finalize 
> function on each wrapped class that pretty much just resets the permanent 
> handles.
>
> Thanks Again!
> On Sunday, October 11, 2020 at 1:49:10 AM UTC-6 Ben Noordhuis wrote:
>
>> On Sat, Oct 10, 2020 at 10:44 PM Rodrigo Hernandez
>>  wrote:
>> >
>> > Hello,
>> >
>> > So, suppose I am wrapping a C++ class around a JS constructor, I've 
>> already created and initialized the isolate, created and initialized a 
>> context, I have the FunctionTemplate for the constructor and I have 
>> instantiated the function and I can call it from Js as x() or new X(),
>> > all this is fine, the function template context is finished and the 
>> handle lost.
>> >
>> > But then I want to create another wrapped object for a class that 
>> inherits from the first one.
>> > Is there a way to retrieve the base class FunctionTemplate so in the 
>> child class I can call child->Inherit(base)?
>> >
>> > Is there another way of doing this?
>> >
>> > Right now I am keeping a C++ unordered_map of isolate to persistent 
>> handle to function templates, and that works, but is that the only option?
>> >
>> > Thanks!
>>
>> It's not the only option but it's a pretty good solution. Less optimal
>> solutions:
>>
>> - store them in the snapshot with SnapshotCreator::AddData() (but you
>> can only retrieve it once)
>> - scan the heap for them with Isolate::VisitHandlesWithClassIds().
>>
>> No doubt there are more ways to stow them away somewhere.
>>
>

-- 
-- 
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/84dfcc11-7bea-499a-a199-001ef1bda912n%40googlegroups.com.


Re: [v8-users] Re: GN failure on Windows

2020-10-16 Thread Rodrigo Hernandez
Hi Julio,
Just go to

https://chrome-infra-packages.appspot.com/

And navigate through gn until you get a list of releases matching git
hashes.

On Tue, Oct 13, 2020, 11:40 PM Julio César Rocha 
wrote:

> Hi, Rodrigo.
>
> Can you help me point where the other binaries, aside from the latest one
> can be browsed to or downloaded?
>
> I can only see a link to the latest GN binary release.
> *You can download the latest version of GN binary for Linux
> <https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+/latest>, 
> macOS
> <https://chrome-infra-packages.appspot.com/dl/gn/gn/mac-amd64/+/latest> and 
> Windows
> <https://chrome-infra-packages.appspot.com/dl/gn/gn/windows-amd64/+/latest>. *
>
>
> On Tuesday, October 13, 2020 at 8:38:26 AM UTC-7 Rodrigo Hernandez wrote:
>
>> You can just replace the binary, you can find binaries at the GN git page
>> here:
>>
>> https://gn.googlesource.com/gn/+/refs/heads/master
>>
>> On Monday, October 12, 2020 at 7:26:18 PM UTC-6 Tekman wrote:
>>
>>> What is the recommended way to downgrade gn? Should I update its version
>>> in the 2 DEPS files, commit and run gclient sync, or literally overwrite
>>> gn.exe in \v8\buildtools\win\gn.exe with a binary I grab from somewhere
>>> else?
>>>
>>> Sorry if this is a basic question, I didn't delve too deep into
>>> depot_tools / gn / cpid / etc. because builds "just worked"™ for us until
>>> now.
>>>
>>> Thanks!
>>>
>>> On Saturday, October 10, 2020 at 1:29:37 PM UTC-7 Rodrigo Hernandez
>>> wrote:
>>>
>>>>
>>>> Hi Tekman,
>>>>
>>>> I've seen that error before, apparently there was a bug which allowed
>>>> the dependency to be done, and that kind of dependency was/is made by older
>>>> versions/tags.
>>>>
>>>> If you've already run gclient sync AFTER checking out LKGR 8.5 with git
>>>> and that did not work, you can try manually replacing the gn executable
>>>> with an older one, one or two months at least.
>>>>
>>>> Hope that helps.
>>>>
>>>> On Wednesday, October 7, 2020 at 6:57:12 PM UTC-6 Tekman wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> After a recent depot_tools update, we're seeing this failure building
>>>>> LKGR 8.5:
>>>>>
>>>>> ERROR at //gni/v8.gni:179:3: Dependency not allowed.
>>>>> The item //src/inspector:inspector_string_conversions
>>>>> can not depend on //:features
>>>>> because it is not in //:features's visibility list: [
>>>>>   //.:*
>>>>> ]
>>>>>
>>>>> The command line we're using is this:
>>>>>
>>>>> gn gen D:\v8_debug --args='v8_enable_i18n_support=false
>>>>> is_component_build=false v8_monolithic=true
>>>>> v8_use_external_startup_data=false treat_warnings_as_errors=false
>>>>> use_custom_libcxx=false target_cpu=\"x64\" is_clang=false
>>>>> v8_enable_pointer_compression=true enable_iterator_debugging=true
>>>>> is_debug=true'
>>>>>
>>>>> Any tips or information about what might have changed and how we can
>>>>> fix it?
>>>>>
>>>>> Thank you!
>>>>>
>>>> --
> --
> 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/5dbc9b35-7874-4d67-822a-2defeb305a1an%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-users/5dbc9b35-7874-4d67-822a-2defeb305a1an%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
-- 
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/CAOxB8nbm9Zg2DrXw_%2BW%3DF6d1VZ4x4NgJJfFLDnwdcNdJRjL1Og%40mail.gmail.com.


[v8-users] Re: GN failure on Windows

2020-10-13 Thread Rodrigo Hernandez
You can just replace the binary, you can find binaries at the GN git page 
here:

https://gn.googlesource.com/gn/+/refs/heads/master

On Monday, October 12, 2020 at 7:26:18 PM UTC-6 Tekman wrote:

> What is the recommended way to downgrade gn? Should I update its version 
> in the 2 DEPS files, commit and run gclient sync, or literally overwrite 
> gn.exe in \v8\buildtools\win\gn.exe with a binary I grab from somewhere 
> else?
>
> Sorry if this is a basic question, I didn't delve too deep into 
> depot_tools / gn / cpid / etc. because builds "just worked"™ for us until 
> now.
>
> Thanks!
>
> On Saturday, October 10, 2020 at 1:29:37 PM UTC-7 Rodrigo Hernandez wrote:
>
>>
>> Hi Tekman,
>>
>> I've seen that error before, apparently there was a bug which allowed the 
>> dependency to be done, and that kind of dependency was/is made by older 
>> versions/tags.
>>
>> If you've already run gclient sync AFTER checking out LKGR 8.5 with git 
>> and that did not work, you can try manually replacing the gn executable 
>> with an older one, one or two months at least.
>>
>> Hope that helps.
>>
>> On Wednesday, October 7, 2020 at 6:57:12 PM UTC-6 Tekman wrote:
>>
>>> Hi,
>>>
>>> After a recent depot_tools update, we're seeing this failure building 
>>> LKGR 8.5:
>>>
>>> ERROR at //gni/v8.gni:179:3: Dependency not allowed.
>>> The item //src/inspector:inspector_string_conversions
>>> can not depend on //:features
>>> because it is not in //:features's visibility list: [
>>>   //.:*
>>> ]
>>>
>>> The command line we're using is this:
>>>
>>> gn gen D:\v8_debug --args='v8_enable_i18n_support=false 
>>> is_component_build=false v8_monolithic=true 
>>> v8_use_external_startup_data=false treat_warnings_as_errors=false 
>>> use_custom_libcxx=false target_cpu=\"x64\" is_clang=false 
>>> v8_enable_pointer_compression=true enable_iterator_debugging=true 
>>> is_debug=true'
>>>
>>> Any tips or information about what might have changed and how we can fix 
>>> it?
>>>
>>> Thank you!
>>>
>>

-- 
-- 
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/c0f99bf7-e8d5-4e50-a719-7a6ef58c2d82n%40googlegroups.com.


Re: [v8-users] Recovering a FunctionTemplate (or how to ->Inherit from one you've lost the handle to?)

2020-10-11 Thread Rodrigo Hernandez
Thanks Ben, I see how those are less optimal, I was hoping for something 
along the lines of context->global()->GetFunctionTemplate("constructor"), 
or something along those lines.
The only problem I have with my approach is that I need a Finalize function 
on each wrapped class that pretty much just resets the permanent handles.

Thanks Again!
On Sunday, October 11, 2020 at 1:49:10 AM UTC-6 Ben Noordhuis wrote:

> On Sat, Oct 10, 2020 at 10:44 PM Rodrigo Hernandez
>  wrote:
> >
> > Hello,
> >
> > So, suppose I am wrapping a C++ class around a JS constructor, I've 
> already created and initialized the isolate, created and initialized a 
> context, I have the FunctionTemplate for the constructor and I have 
> instantiated the function and I can call it from Js as x() or new X(),
> > all this is fine, the function template context is finished and the 
> handle lost.
> >
> > But then I want to create another wrapped object for a class that 
> inherits from the first one.
> > Is there a way to retrieve the base class FunctionTemplate so in the 
> child class I can call child->Inherit(base)?
> >
> > Is there another way of doing this?
> >
> > Right now I am keeping a C++ unordered_map of isolate to persistent 
> handle to function templates, and that works, but is that the only option?
> >
> > Thanks!
>
> It's not the only option but it's a pretty good solution. Less optimal
> solutions:
>
> - store them in the snapshot with SnapshotCreator::AddData() (but you
> can only retrieve it once)
> - scan the heap for them with Isolate::VisitHandlesWithClassIds().
>
> No doubt there are more ways to stow them away somewhere.
>

-- 
-- 
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/9cf27dce-1cc2-4b46-b11a-3696c7825966n%40googlegroups.com.


[v8-users] Recovering a FunctionTemplate (or how to ->Inherit from one you've lost the handle to?)

2020-10-10 Thread Rodrigo Hernandez
Hello,

So, suppose I am wrapping a C++ class around a JS constructor, I've already 
created and initialized the isolate, created and initialized a context, I 
have the FunctionTemplate for the constructor and I have instantiated the 
function and I can call it from Js as x() or new X(),
all this is fine, the function template context is finished and the handle 
lost.

But then I want to create another wrapped object for a class that inherits 
from the first one.
Is there a way to retrieve the base class FunctionTemplate so in the child 
class I can call child->Inherit(base)?

Is there another way of doing this?

Right now I am keeping a C++ unordered_map of isolate to persistent handle 
to function templates, and that works, but is that the only option?

Thanks!

-- 
-- 
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/52965bf8-2490-4954-b28f-2752689cbd4fn%40googlegroups.com.


[v8-users] Re: GN failure on Windows

2020-10-10 Thread Rodrigo Hernandez

Hi Tekman,

I've seen that error before, apparently there was a bug which allowed the 
dependency to be done, and that kind of dependency was/is made by older 
versions/tags.

If you've already run gclient sync AFTER checking out LKGR 8.5 with git and 
that did not work, you can try manually replacing the gn executable with an 
older one, one or two months at least.

Hope that helps.

On Wednesday, October 7, 2020 at 6:57:12 PM UTC-6 Tekman wrote:

> Hi,
>
> After a recent depot_tools update, we're seeing this failure building LKGR 
> 8.5:
>
> ERROR at //gni/v8.gni:179:3: Dependency not allowed.
> The item //src/inspector:inspector_string_conversions
> can not depend on //:features
> because it is not in //:features's visibility list: [
>   //.:*
> ]
>
> The command line we're using is this:
>
> gn gen D:\v8_debug --args='v8_enable_i18n_support=false 
> is_component_build=false v8_monolithic=true 
> v8_use_external_startup_data=false treat_warnings_as_errors=false 
> use_custom_libcxx=false target_cpu=\"x64\" is_clang=false 
> v8_enable_pointer_compression=true enable_iterator_debugging=true 
> is_debug=true'
>
> Any tips or information about what might have changed and how we can fix 
> it?
>
> Thank you!
>

-- 
-- 
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/820059be-f2f0-41a9-9b18-ba87c0638f5dn%40googlegroups.com.


[v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-08-04 Thread Rodrigo Hernandez

A PR for the vcpkg port is up at:

https://github.com/microsoft/vcpkg/pull/12687

Just working out the final issues with x86-windows.

On Thursday, July 9, 2020 at 2:06:21 PM UTC-6, Rodrigo Hernandez wrote:
>
> Hello,
>
> I am trying to create a VCPKG (https://github.com/microsoft/vcpkg) port 
> of v8,
> and in doing so I am syncing to tag 8.3.110.13 as suggested here: 
> https://v8.dev/docs/version-numbers
>
> Since this is package manager, I want to build against msvc's c++ lib, so 
> I am using use_custom_libcxx=false,
> however I am seeing linking errors related to undefined symbols on debug 
> builds like:
>
> [1797/2086] LINK(DLL) v8.dll v8.dll.lib v8.dll.pdb
> FAILED: v8.dll v8.dll.lib v8.dll.pdb 
> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>  
> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
> False link.exe /nologo /IMPLIB:./v8.dll.lib /DLL /OUT:./v8.dll 
> /PDB:./v8.dll.pdb @./v8.dll.rsp
> class-verifiers-tq.obj : error LNK2019: unresolved external symbol 
> "public: class v8::internal::TNode __cdecl 
> v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class 
> v8::internal::TNode,class 
> v8::internal::TNode)" 
> (?IsFastJSArray@TorqueGeneratedExportedMacrosAssembler@internal@v8@@QEAA?AV?$TNode@UBoolT@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@@Z)
>  
> referenced in function "public: class v8::internal::TNode v8::internal::JSArray> __cdecl 
> v8::internal::CodeStubAssembler::TaggedToFastJSArray(class 
> v8::internal::TNode,class 
> v8::internal::TNode,class 
> v8::internal::compiler::CodeAssemblerLabel *)" 
> (?TaggedToFastJSArray@CodeStubAssembler@internal@v8@@QEAA?AV?$TNode@VJSArray@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@PEAVCodeAssemblerLabel@compiler@23@@Z)
>
> There's 75 symbols missing in total, all in class-verifiers-tq.obj, I can 
> post the rest if needed, but hopefully this will give you an idea.
>
> On release builds there is only one undefined symbol: void __cdecl 
> v8::internal::FixedArray::set(int,class v8::internal::Smi), which I believe 
> should be in fixed-array-tq-csa.obj,
> but it is not there. There are 2 overrides right next to its definition in 
> fixed-array-inl.h that do seem to exist in the object file but this one 
> isn't.
>
> here is the error output:
>
> ninja: Entering directory `out\x64.release'
> [1/298] LINK mksnapshot.exe mksnapshot.exe.pdb
> FAILED: mksnapshot.exe mksnapshot.exe.pdb
> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>  
> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
> False link.exe /nologo /OUT:./mksnapshot.exe /PDB:./mksnapshot.exe.pdb 
> @./mksnapshot.exe.rsp
> exported-macros-assembler-tq.obj : error LNK2019: unresolved external 
> symbol "public: void __cdecl v8::internal::FixedArray::set(int,class 
> v8::internal::Smi)" (?set@FixedArray@internal@v8@@QEAAXHVSmi@23@@Z) 
> referenced in function "protected: void __cdecl 
> v8::internal::OrderedHashTable v8::internal::OrderedHashMap,2>::SetNumberOfBuckets(int)" 
> (?SetNumberOfBuckets@?$OrderedHashTable@VOrderedHashMap@internal@v8@@$01@internal@v8@@IEAAXH@Z)
>
> .\mksnapshot.exe : fatal error LNK1120: 1 unresolved externals
>
> Is there something I can patch to make this work? is this a known issue?
>
> Also, is there a way to add a debug postfix/suffix like "d" to debug 
> libraries?
>
> Thanks in advance!
>

-- 
-- 
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/946dd939-e7d4-469d-b90f-209a76475beao%40googlegroups.com.


[v8-users] Re: Compiling V8 8.4 on Windows using using_custom_libcxx=false

2020-07-28 Thread Rodrigo Hernandez
No problem, I am glad it worked out for you.

On Tuesday, July 28, 2020 at 1:29:52 AM UTC-6, Hans Maier wrote:
>
> With your patches and a patch for ICU (see attach.) I was able to build 
> the version 8.4.
>
> Thanks!
>
> Am Montag, 27. Juli 2020 17:10:50 UTC+2 schrieb Rodrigo Hernandez:
>>
>> See the patches I posted on this thread 
>> <https://groups.google.com/forum/#!topic/v8-users/TgJIIIWsy20>, you need 
>> to add "-Wno-range-loop-construct" and maybe "-Wno-invalid-offsetof" to 
>> your compilation flags if you're using clang.
>> The patches are for the 8.3 branch head, but the changes needed are about 
>> the same.
>>
>> On Monday, July 27, 2020 at 3:45:28 AM UTC-6, Hans Maier wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to compile the branch head of 8.4 under windows using msvc.
>>> Unfortunatly I get compile errors:
>>>
>>> ../../src/compiler/backend/register-allocator-verifier.cc(355,19): 
>>> error: loop variable 'pair' creates a copy from type 'const std::pair>> v8::internal::compiler::InstructionOperand, 
>>> v8::internal::compiler::Assessment *>' [-Werror,-Wrange-loop-construct]
>>>   for (const auto pair : map()) {
>>>   ^
>>> ../../src/compiler/backend/register-allocator-verifier.cc(355,8): note: 
>>> use reference type 'const std::pair>> v8::internal::compiler::InstructionOperand, 
>>> v8::internal::compiler::Assessment *> &' to prevent copying
>>>   for (const auto pair : map()) {
>>>^
>>>   &
>>> 1 error generated.
>>>
>>> For complete log see attach
>>>
>>> Any ideas where the error comes from are appreciated,
>>> thanks.
>>>
>>> >cl
>>> Microsoft (R) C/C++-Optimierungscompiler Version 19.16.27042 für x86
>>>
>>> >git log -n 1
>>> commit 483421e9549adbf4a65d54d43fbffb250a577e5c (HEAD, tag: 8.4.371.22, 
>>> origin/8.4-lkgr, branch-heads/8.4)
>>>
>>>
>>> >gn gen out/x64-win.release --args="is_debug=false target_cpu=\"x64\" 
>>> v8_target_cpu=\"x64\" use_goma=false is_clang=true v8_static_library=false 
>>> is_component_build=true use_custom_libcxx=false 
>>> v8_untrusted_code_mitigations=true"
>>>
>>> >>ninja -C out/x64-win.release
>>>
>>

-- 
-- 
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/e25bf6b1-8079-47f1-a145-ee6f60377d55o%40googlegroups.com.


[v8-users] Re: Compiling V8 8.4 on Windows using using_custom_libcxx=false

2020-07-27 Thread Rodrigo Hernandez
See the patches I posted on this thread 
, you need to 
add "-Wno-range-loop-construct" and maybe "-Wno-invalid-offsetof" to your 
compilation flags if you're using clang.
The patches are for the 8.3 branch head, but the changes needed are about 
the same.

On Monday, July 27, 2020 at 3:45:28 AM UTC-6, Hans Maier wrote:
>
> Hi,
>
> I'm trying to compile the branch head of 8.4 under windows using msvc.
> Unfortunatly I get compile errors:
>
> ../../src/compiler/backend/register-allocator-verifier.cc(355,19): error: 
> loop variable 'pair' creates a copy from type 'const std::pair v8::internal::compiler::InstructionOperand, 
> v8::internal::compiler::Assessment *>' [-Werror,-Wrange-loop-construct]
>   for (const auto pair : map()) {
>   ^
> ../../src/compiler/backend/register-allocator-verifier.cc(355,8): note: 
> use reference type 'const std::pair v8::internal::compiler::InstructionOperand, 
> v8::internal::compiler::Assessment *> &' to prevent copying
>   for (const auto pair : map()) {
>^
>   &
> 1 error generated.
>
> For complete log see attach
>
> Any ideas where the error comes from are appreciated,
> thanks.
>
> >cl
> Microsoft (R) C/C++-Optimierungscompiler Version 19.16.27042 für x86
>
> >git log -n 1
> commit 483421e9549adbf4a65d54d43fbffb250a577e5c (HEAD, tag: 8.4.371.22, 
> origin/8.4-lkgr, branch-heads/8.4)
>
>
> >gn gen out/x64-win.release --args="is_debug=false target_cpu=\"x64\" 
> v8_target_cpu=\"x64\" use_goma=false is_clang=true v8_static_library=false 
> is_component_build=true use_custom_libcxx=false 
> v8_untrusted_code_mitigations=true"
>
> >>ninja -C out/x64-win.release
>

-- 
-- 
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/527e9c81-3e9d-404f-8a4d-3fe0634b37c6o%40googlegroups.com.


[v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-22 Thread Rodrigo Hernandez
Quick Update:

I have successfully built the vcpkg package linking ICU and zlib vcpkg 
ports,
I still need to work on the final details such as cmake config file so 
cmake based projects can find the libraries and headers
as well as check that static builds fine too. Then I need to make sure it 
works on Linux which was something vcpkg bots checked for last time I 
submitted a port.
That last one is probably the one that's going to take more time.

Cheers!

On Thursday, July 9, 2020 at 2:06:21 PM UTC-6, Rodrigo Hernandez wrote:
>
> Hello,
>
> I am trying to create a VCPKG (https://github.com/microsoft/vcpkg) port 
> of v8,
> and in doing so I am syncing to tag 8.3.110.13 as suggested here: 
> https://v8.dev/docs/version-numbers
>
> Since this is package manager, I want to build against msvc's c++ lib, so 
> I am using use_custom_libcxx=false,
> however I am seeing linking errors related to undefined symbols on debug 
> builds like:
>
> [1797/2086] LINK(DLL) v8.dll v8.dll.lib v8.dll.pdb
> FAILED: v8.dll v8.dll.lib v8.dll.pdb 
> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>  
> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
> False link.exe /nologo /IMPLIB:./v8.dll.lib /DLL /OUT:./v8.dll 
> /PDB:./v8.dll.pdb @./v8.dll.rsp
> class-verifiers-tq.obj : error LNK2019: unresolved external symbol 
> "public: class v8::internal::TNode __cdecl 
> v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class 
> v8::internal::TNode,class 
> v8::internal::TNode)" 
> (?IsFastJSArray@TorqueGeneratedExportedMacrosAssembler@internal@v8@@QEAA?AV?$TNode@UBoolT@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@@Z)
>  
> referenced in function "public: class v8::internal::TNode v8::internal::JSArray> __cdecl 
> v8::internal::CodeStubAssembler::TaggedToFastJSArray(class 
> v8::internal::TNode,class 
> v8::internal::TNode,class 
> v8::internal::compiler::CodeAssemblerLabel *)" 
> (?TaggedToFastJSArray@CodeStubAssembler@internal@v8@@QEAA?AV?$TNode@VJSArray@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@PEAVCodeAssemblerLabel@compiler@23@@Z)
>
> There's 75 symbols missing in total, all in class-verifiers-tq.obj, I can 
> post the rest if needed, but hopefully this will give you an idea.
>
> On release builds there is only one undefined symbol: void __cdecl 
> v8::internal::FixedArray::set(int,class v8::internal::Smi), which I believe 
> should be in fixed-array-tq-csa.obj,
> but it is not there. There are 2 overrides right next to its definition in 
> fixed-array-inl.h that do seem to exist in the object file but this one 
> isn't.
>
> here is the error output:
>
> ninja: Entering directory `out\x64.release'
> [1/298] LINK mksnapshot.exe mksnapshot.exe.pdb
> FAILED: mksnapshot.exe mksnapshot.exe.pdb
> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>  
> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
> False link.exe /nologo /OUT:./mksnapshot.exe /PDB:./mksnapshot.exe.pdb 
> @./mksnapshot.exe.rsp
> exported-macros-assembler-tq.obj : error LNK2019: unresolved external 
> symbol "public: void __cdecl v8::internal::FixedArray::set(int,class 
> v8::internal::Smi)" (?set@FixedArray@internal@v8@@QEAAXHVSmi@23@@Z) 
> referenced in function "protected: void __cdecl 
> v8::internal::OrderedHashTable v8::internal::OrderedHashMap,2>::SetNumberOfBuckets(int)" 
> (?SetNumberOfBuckets@?$OrderedHashTable@VOrderedHashMap@internal@v8@@$01@internal@v8@@IEAAXH@Z)
>
> .\mksnapshot.exe : fatal error LNK1120: 1 unresolved externals
>
> Is there something I can patch to make this work? is this a known issue?
>
> Also, is there a way to add a debug postfix/suffix like "d" to debug 
> libraries?
>
> Thanks in advance!
>

-- 
-- 
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/2da6e226-5acd-41f3-964d-64afc64208c9o%40googlegroups.com.


[v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-17 Thread Rodrigo Hernandez

Quick Update:
I am working on linking against the zlib and icu vcpkg ports instead of the 
embedded ones, in the meantime I am attaching the patches for 8.3.110.13.

Once you have synched to 8.3.110.13, apply the v8.patch in the v8 directory 
and the build.patch in the build directory:

git apply v8.patch
git apply build.patch

Then configure with gn:

gn gen out/x64.release.msvc --args="is_debug=false is_component_build=true 
target_cpu=\"x64\" is_clang=false use_custom_libcxx=false 
v8_enable_verify_heap=false"
gn gen out/x64.debug.msvc --args="is_debug=true is_component_build=true 
target_cpu=\"x64\" is_clang=false use_custom_libcxx=false 
v8_enable_verify_heap=false"

and build with ninja:

ninja -C out/x64.release.msvc
ninja -C out/x64.debug.msvc

These changes are small, so it would be nice to have them in master 
"hint-hint", 
I may be able to create a CL later on, but if someone can help with that, 
it would be great.

Cheers!

On Thursday, July 9, 2020 at 2:06:21 PM UTC-6, Rodrigo Hernandez wrote:
>
> Hello,
>
> I am trying to create a VCPKG (https://github.com/microsoft/vcpkg) port 
> of v8,
> and in doing so I am syncing to tag 8.3.110.13 as suggested here: 
> https://v8.dev/docs/version-numbers
>
> Since this is package manager, I want to build against msvc's c++ lib, so 
> I am using use_custom_libcxx=false,
> however I am seeing linking errors related to undefined symbols on debug 
> builds like:
>
> [1797/2086] LINK(DLL) v8.dll v8.dll.lib v8.dll.pdb
> FAILED: v8.dll v8.dll.lib v8.dll.pdb 
> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>  
> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
> False link.exe /nologo /IMPLIB:./v8.dll.lib /DLL /OUT:./v8.dll 
> /PDB:./v8.dll.pdb @./v8.dll.rsp
> class-verifiers-tq.obj : error LNK2019: unresolved external symbol 
> "public: class v8::internal::TNode __cdecl 
> v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class 
> v8::internal::TNode,class 
> v8::internal::TNode)" 
> (?IsFastJSArray@TorqueGeneratedExportedMacrosAssembler@internal@v8@@QEAA?AV?$TNode@UBoolT@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@@Z)
>  
> referenced in function "public: class v8::internal::TNode v8::internal::JSArray> __cdecl 
> v8::internal::CodeStubAssembler::TaggedToFastJSArray(class 
> v8::internal::TNode,class 
> v8::internal::TNode,class 
> v8::internal::compiler::CodeAssemblerLabel *)" 
> (?TaggedToFastJSArray@CodeStubAssembler@internal@v8@@QEAA?AV?$TNode@VJSArray@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@PEAVCodeAssemblerLabel@compiler@23@@Z)
>
> There's 75 symbols missing in total, all in class-verifiers-tq.obj, I can 
> post the rest if needed, but hopefully this will give you an idea.
>
> On release builds there is only one undefined symbol: void __cdecl 
> v8::internal::FixedArray::set(int,class v8::internal::Smi), which I believe 
> should be in fixed-array-tq-csa.obj,
> but it is not there. There are 2 overrides right next to its definition in 
> fixed-array-inl.h that do seem to exist in the object file but this one 
> isn't.
>
> here is the error output:
>
> ninja: Entering directory `out\x64.release'
> [1/298] LINK mksnapshot.exe mksnapshot.exe.pdb
> FAILED: mksnapshot.exe mksnapshot.exe.pdb
> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>  
> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
> False link.exe /nologo /OUT:./mksnapshot.exe /PDB:./mksnapshot.exe.pdb 
> @./mksnapshot.exe.rsp
> exported-macros-assembler-tq.obj : error LNK2019: unresolved external 
> symbol "public: void __cdecl v8::internal::FixedArray::set(int,class 
> v8::internal::Smi)" (?set@FixedArray@internal@v8@@QEAAXHVSmi@23@@Z) 
> referenced in function "protected: void __cdecl 
> v8::internal::OrderedHashTable v8::internal::OrderedHashMap,2>::SetNumberOfBuckets(int)" 
> (?SetNumberOfBuckets@?$OrderedHashTable@VOrderedHashMap@internal@v8@@$01@internal@v8@@IEAAXH@Z)
>
> .\mksnapshot.exe : fatal error LNK1120: 1 unresolved externals
>
> Is there something I can patch to make this work? is this a known issue?
>
> Also, is there a way to add a debug postfix/suffix like "d" to debug 
> libraries?
>
> Thanks in advance!
>

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

Re: [v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-16 Thread Rodrigo Hernandez
Hi Ben,

Do you mean what am I going that merits all this trouble? 

I work on my game engine on my spare time, and I am planning on using V8 as 
the underlying JavaScript engine,
However my immediate need is to use it to power the engine UI, which is a 
separate project.

My idea is to create a small SVG Browser Agent that can be put as an OpenGL 
or Vulkan Overlay in the game engine,
using regular JS to drive animations and events in the SVG page.

I tried using Electron, but it turned out that you don't embed Electron, 
Electron embeds you,
and in the end I had to hack too many things to get it barely working on 
Windows and Linux was a no go.

So, I figured I might as well give pure v8 a new try (I used to have cmake 
scripts to build v8 back when it used scons).

I noticed there was no v8 package on MSYS2, despite there being one some 
years ago, so I started working on that,
then tried to install v8 on VCPKG and it just wasn't there despite being 
requested since long ago (https://github.com/microsoft/vcpkg/issues/372),
and now here I am .

TL;DR:  here's the links for my projects:

https://github.com/AeonGames/AeonEngine
https://github.com/AeonGames/AeonGUI



On Thursday, July 16, 2020 at 9:02:48 PM UTC-6, Ben Ernst wrote:
>
> Rodrigo, what's your project? I tried and failed to fix this build, I'd 
> happily throw a few hundred dollars in gratitude at anyone able to get it 
> working stably. I wonder if there might be other users out there in the 
> same boat.
> Ben
>
>
>
> On Fri, 17 Jul 2020 at 03:40, Rodrigo Hernandez  > wrote:
>
>>
>> Ok, found the problem, beside some missing V8_PRIVATE_EXPORTs, 
>> v8_enable_verify_heap is broken on component builds.
>>
>> v8_enable_verify_heap is enabled by is_debug, and it causes 
>> the VERIFY_HEAP define to be added to the compilation flags, 
>> gen\torque-generated\class-verifiers-tq.cc (Not sure which .tq file 
>> generates this one) has a file wide guard for this VERIFY_HEAP define, so 
>> even if compiled, if not set, produces no code.
>>
>> The problem then is that functions inside class-verifiers-tq.cc reference 
>> functions in v8_initializers, which is a dependency ONLY exposed in 
>> v8_for_testing (and v8_init, but that's not a lib).
>>
>> Since I doubt verify heap is intended for test only targets, I guess 
>> functions in class-verifiers-tq.cc should not be calling anything in 
>> v8_initializers.
>>
>> Either way adding v8_enable_verify_heap=false (even if you have 
>> is_debug=true) to the args removes those cryptic undefined symbol errors.
>>
>>
>> On Tuesday, July 14, 2020 at 11:50:03 AM UTC-6, Rodrigo Hernandez wrote:
>>>
>>>
>>> Got to the same point with branch head 8.1, did some dependency moves 
>>> like adding v8_initializers as a v8 dependency as well as wasm_api_test as 
>>> well as adding some missing V8_EXPORT macros until I got to the point where 
>>> NodeCache was undefined,
>>> moved more deps and got duplicated symbols.
>>>
>>> Somehow I don't think adding the deps is what's missing, the symbols 
>>> should be there somewhere or the clang build would fail as well, but it 
>>> doesn't, I think it has to do with either the assembly generation or 
>>> something that was left undone when wee8 was added.
>>>
>>> I have patches for building with MSYS + MinGW64, and none of these 
>>> issues showed up when writing those, so there must be something GCC/CLANG 
>>> is doing that MSVC is not doing yet.
>>>
>>> I need to drop this project until the weekend, I'll come back try to 
>>> figure out what am I missing then, in the meantime, any hints of what could 
>>> be going on are welcome.
>>>
>>> Thanks again.
>>>
>> -- 
>> -- 
>> 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/20e44a86-a777-4291-a663-ed8c52fd7d35o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/v8-users/20e44a86-a777-4291-a663-ed8c52fd7d35o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
-- 
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/1d4f3f2d-6f56-43e1-89c9-e472a390a1f7o%40googlegroups.com.


Re: [v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-16 Thread Rodrigo Hernandez

Ok, found the problem, beside some missing V8_PRIVATE_EXPORTs, 
v8_enable_verify_heap is broken on component builds.

v8_enable_verify_heap is enabled by is_debug, and it causes the VERIFY_HEAP 
define to be added to the compilation flags, 
gen\torque-generated\class-verifiers-tq.cc (Not sure which .tq file 
generates this one) has a file wide guard for this VERIFY_HEAP define, so 
even if compiled, if not set, produces no code.

The problem then is that functions inside class-verifiers-tq.cc reference 
functions in v8_initializers, which is a dependency ONLY exposed in 
v8_for_testing (and v8_init, but that's not a lib).

Since I doubt verify heap is intended for test only targets, I guess 
functions in class-verifiers-tq.cc should not be calling anything in 
v8_initializers.

Either way adding v8_enable_verify_heap=false (even if you have 
is_debug=true) to the args removes those cryptic undefined symbol errors.


On Tuesday, July 14, 2020 at 11:50:03 AM UTC-6, Rodrigo Hernandez wrote:
>
>
> Got to the same point with branch head 8.1, did some dependency moves like 
> adding v8_initializers as a v8 dependency as well as wasm_api_test as well 
> as adding some missing V8_EXPORT macros until I got to the point where 
> NodeCache was undefined,
> moved more deps and got duplicated symbols.
>
> Somehow I don't think adding the deps is what's missing, the symbols 
> should be there somewhere or the clang build would fail as well, but it 
> doesn't, I think it has to do with either the assembly generation or 
> something that was left undone when wee8 was added.
>
> I have patches for building with MSYS + MinGW64, and none of these issues 
> showed up when writing those, so there must be something GCC/CLANG is doing 
> that MSVC is not doing yet.
>
> I need to drop this project until the weekend, I'll come back try to 
> figure out what am I missing then, in the meantime, any hints of what could 
> be going on are welcome.
>
> Thanks again.
>

-- 
-- 
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/20e44a86-a777-4291-a663-ed8c52fd7d35o%40googlegroups.com.


Re: [v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-14 Thread Rodrigo Hernandez

Got to the same point with branch head 8.1, did some dependency moves like 
adding v8_initializers as a v8 dependency as well as wasm_api_test as well 
as adding some missing V8_EXPORT macros until I got to the point where 
NodeCache was undefined,
moved more deps and got duplicated symbols.

Somehow I don't think adding the deps is what's missing, the symbols should 
be there somewhere or the clang build would fail as well, but it doesn't, I 
think it has to do with either the assembly generation or something that 
was left undone when wee8 was added.

I have patches for building with MSYS + MinGW64, and none of these issues 
showed up when writing those, so there must be something GCC/CLANG is doing 
that MSVC is not doing yet.

I need to drop this project until the weekend, I'll come back try to figure 
out what am I missing then, in the meantime, any hints of what could be 
going on are welcome.

Thanks again.

-- 
-- 
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/5bb4e1a6-7df0-4fc2-9c3c-f4d543400aaco%40googlegroups.com.


Re: [v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-13 Thread Rodrigo Hernandez

Thanks Bill, I'll take a look at your fixes.

Part of why I want to have a working vcpkg port is to have more developers 
use it and contribute to it, so hopefully further breakage is at least not 
as bad.

On Monday, July 13, 2020 at 10:29:37 AM UTC-6, Bill Ticehurst wrote:
>
> If you search for my last name on this or the v8-dev forum, you'll find a 
> lot of attempts at fixing this, and ultimately giving up. (e.g. 
> https://groups.google.com/forum/#!searchin/v8-users/ticehurst|sort:date/v8-users/mmwWxpb64_I/HtL-SI9wBgAJ
>  might 
> be the most relevant). Basically MSVC is not a fully supported compiler. 
> static releases builds are tested (e.g. that's how Node.js builds), but 
> everything else is untested and breaks pretty quickly even if you get a fix 
> in.
>
> - Bill
>
> On Monday, July 13, 2020 at 7:41:39 AM UTC-7, Rodrigo Hernandez wrote:
>>
>> Thanks Ben, I will try that. 
>>
>> On Mon, Jul 13, 2020, 4:54 AM Ben Ernst  wrote:
>>
>>> Rodrigo, you might have more luck with the latest 8.1 tag (rather than 
>>> 8.3), I recall that 8.1 is building OK with MSVC. If you're writing a vcpkg 
>>> port, settling for a clang build might not be ideal, since MSVC programs 
>>> won't be able to reliably link to it.
>>> Ben
>>>
>>> On Mon, 13 Jul 2020, 2:17 am Rodrigo Hernandez,  
>>> wrote:
>>>
>>>>
>>>> Ok, findings so far:
>>>>
>>>> commenting out the flag "/Zc:inline" in build/config/compiler/BUILD.gn 
>>>> takes care of the FixedArray::set undefined symbol, but the build takes 
>>>> longer, need to see if bumping "/Ob" from "/Ob2" to "/Ob3" fixes the issue 
>>>> w/o removing the inline flag.
>>>>
>>>> After that, both builds (debug/release) get to the same place, 73 
>>>> unresolved symbols at v8.dll link stage, all seem to be part of the 
>>>> v8_initializers source set which is a dep of the v8_for_testing component 
>>>> but not for the v8 one.
>>>> I tried adding the dependency but no luck, seems the linker doesn't 
>>>> take the files into account, or I did something wrong, not sure, still I 
>>>> doubt that is the proper solution since the clang/customc++ build.is 
>>>> fine.
>>>>
>>>> I also tried the clang build with system libc++, that produces 
>>>> compiling errors that were relatively easy to solve, adding the compiler 
>>>> flags "-Wno-invalid-offsetof" and "-Wno-range-loop-construct" should do 
>>>> the 
>>>> work, however with that last one
>>>> still saw the compiler complain because of some for(auto x: map) loop 
>>>> which should really be for(auto : map), but again, that may have been 
>>>> due 
>>>> to a dirty repo.
>>>>
>>>> So while I guess I found a workaround I still would like to know whats 
>>>> with the initializer symbols missing in MSVC, can somebody comment? 
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> On Thursday, July 9, 2020 at 2:06:21 PM UTC-6, Rodrigo Hernandez wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I am trying to create a VCPKG (https://github.com/microsoft/vcpkg) 
>>>>> port of v8,
>>>>> and in doing so I am syncing to tag 8.3.110.13 as suggested here: 
>>>>> https://v8.dev/docs/version-numbers
>>>>>
>>>>> Since this is package manager, I want to build against msvc's c++ lib, 
>>>>> so I am using use_custom_libcxx=false,
>>>>> however I am seeing linking errors related to undefined symbols on 
>>>>> debug builds like:
>>>>>
>>>>> [1797/2086] LINK(DLL) v8.dll v8.dll.lib v8.dll.pdb
>>>>> FAILED: v8.dll v8.dll.lib v8.dll.pdb 
>>>>> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>>>>>  
>>>>> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
>>>>> False link.exe /nologo /IMPLIB:./v8.dll.lib /DLL /OUT:./v8.dll 
>>>>> /PDB:./v8.dll.pdb @./v8.dll.rsp
>>>>> class-verifiers-tq.obj : error LNK2019: unresolved external symbol 
>>>>> "public: class v8::internal::TNode __cdecl 
>>>>> v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class 
>>>>> v8::internal::TNode,class 
>>>>> v8::internal::TNode)"

Re: [v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-13 Thread Rodrigo Hernandez
Thanks Ben, I will try that.

On Mon, Jul 13, 2020, 4:54 AM Ben Ernst  wrote:

> Rodrigo, you might have more luck with the latest 8.1 tag (rather than
> 8.3), I recall that 8.1 is building OK with MSVC. If you're writing a vcpkg
> port, settling for a clang build might not be ideal, since MSVC programs
> won't be able to reliably link to it.
> Ben
>
> On Mon, 13 Jul 2020, 2:17 am Rodrigo Hernandez, <
> kwizatz.aeongames@gmail.com> wrote:
>
>>
>> Ok, findings so far:
>>
>> commenting out the flag "/Zc:inline" in build/config/compiler/BUILD.gn
>> takes care of the FixedArray::set undefined symbol, but the build takes
>> longer, need to see if bumping "/Ob" from "/Ob2" to "/Ob3" fixes the issue
>> w/o removing the inline flag.
>>
>> After that, both builds (debug/release) get to the same place, 73
>> unresolved symbols at v8.dll link stage, all seem to be part of the
>> v8_initializers source set which is a dep of the v8_for_testing component
>> but not for the v8 one.
>> I tried adding the dependency but no luck, seems the linker doesn't take
>> the files into account, or I did something wrong, not sure, still I doubt
>> that is the proper solution since the clang/customc++ build.is fine.
>>
>> I also tried the clang build with system libc++, that produces compiling
>> errors that were relatively easy to solve, adding the compiler flags
>> "-Wno-invalid-offsetof" and "-Wno-range-loop-construct" should do the work,
>> however with that last one
>> still saw the compiler complain because of some for(auto x: map) loop
>> which should really be for(auto : map), but again, that may have been due
>> to a dirty repo.
>>
>> So while I guess I found a workaround I still would like to know whats
>> with the initializer symbols missing in MSVC, can somebody comment?
>>
>> Thanks!
>>
>>
>> On Thursday, July 9, 2020 at 2:06:21 PM UTC-6, Rodrigo Hernandez wrote:
>>>
>>> Hello,
>>>
>>> I am trying to create a VCPKG (https://github.com/microsoft/vcpkg) port
>>> of v8,
>>> and in doing so I am syncing to tag 8.3.110.13 as suggested here:
>>> https://v8.dev/docs/version-numbers
>>>
>>> Since this is package manager, I want to build against msvc's c++ lib,
>>> so I am using use_custom_libcxx=false,
>>> however I am seeing linking errors related to undefined symbols on debug
>>> builds like:
>>>
>>> [1797/2086] LINK(DLL) v8.dll v8.dll.lib v8.dll.pdb
>>> FAILED: v8.dll v8.dll.lib v8.dll.pdb
>>> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>>> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64
>>> False link.exe /nologo /IMPLIB:./v8.dll.lib /DLL /OUT:./v8.dll
>>> /PDB:./v8.dll.pdb @./v8.dll.rsp
>>> class-verifiers-tq.obj : error LNK2019: unresolved external symbol
>>> "public: class v8::internal::TNode __cdecl
>>> v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class
>>> v8::internal::TNode,class
>>> v8::internal::TNode)"
>>> (?IsFastJSArray@TorqueGeneratedExportedMacrosAssembler@internal@v8
>>> @@QEAA?AV?$TNode@UBoolT@internal@v8@@@23@V?$TNode@VObject@internal@v8
>>> @@@23@V?$TNode@VContext@internal@v8@@@23@@Z) referenced in function
>>> "public: class v8::internal::TNode __cdecl
>>> v8::internal::CodeStubAssembler::TaggedToFastJSArray(class
>>> v8::internal::TNode,class
>>> v8::internal::TNode,class
>>> v8::internal::compiler::CodeAssemblerLabel *)"
>>> (?TaggedToFastJSArray@CodeStubAssembler@internal@v8
>>> @@QEAA?AV?$TNode@VJSArray@internal@v8@@@23@V?$TNode@VContext@internal@v8
>>> @@@23@V?$TNode@VObject@internal@v8@@@23@PEAVCodeAssemblerLabel
>>> @compiler@23@@Z)
>>>
>>> There's 75 symbols missing in total, all in class-verifiers-tq.obj, I
>>> can post the rest if needed, but hopefully this will give you an idea.
>>>
>>> On release builds there is only one undefined symbol: void __cdecl
>>> v8::internal::FixedArray::set(int,class v8::internal::Smi), which I believe
>>> should be in fixed-array-tq-csa.obj,
>>> but it is not there. There are 2 overrides right next to its definition
>>> in fixed-array-inl.h that do seem to exist in the object file but this one
>>> isn't.
>>>
>>> here is the error output:
>>>
>>> ninja: Entering directory `out\x64.release'
>>> [1/298] LINK

[v8-users] Re: Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-12 Thread Rodrigo Hernandez

Ok, findings so far:

commenting out the flag "/Zc:inline" in build/config/compiler/BUILD.gn 
takes care of the FixedArray::set undefined symbol, but the build takes 
longer, need to see if bumping "/Ob" from "/Ob2" to "/Ob3" fixes the issue 
w/o removing the inline flag.

After that, both builds (debug/release) get to the same place, 73 
unresolved symbols at v8.dll link stage, all seem to be part of the 
v8_initializers source set which is a dep of the v8_for_testing component 
but not for the v8 one.
I tried adding the dependency but no luck, seems the linker doesn't take 
the files into account, or I did something wrong, not sure, still I doubt 
that is the proper solution since the clang/customc++ build.is fine.

I also tried the clang build with system libc++, that produces compiling 
errors that were relatively easy to solve, adding the compiler flags 
"-Wno-invalid-offsetof" and "-Wno-range-loop-construct" should do the work, 
however with that last one
still saw the compiler complain because of some for(auto x: map) loop which 
should really be for(auto : map), but again, that may have been due to a 
dirty repo.

So while I guess I found a workaround I still would like to know whats with 
the initializer symbols missing in MSVC, can somebody comment? 

Thanks!


On Thursday, July 9, 2020 at 2:06:21 PM UTC-6, Rodrigo Hernandez wrote:
>
> Hello,
>
> I am trying to create a VCPKG (https://github.com/microsoft/vcpkg) port 
> of v8,
> and in doing so I am syncing to tag 8.3.110.13 as suggested here: 
> https://v8.dev/docs/version-numbers
>
> Since this is package manager, I want to build against msvc's c++ lib, so 
> I am using use_custom_libcxx=false,
> however I am seeing linking errors related to undefined symbols on debug 
> builds like:
>
> [1797/2086] LINK(DLL) v8.dll v8.dll.lib v8.dll.pdb
> FAILED: v8.dll v8.dll.lib v8.dll.pdb 
> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>  
> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
> False link.exe /nologo /IMPLIB:./v8.dll.lib /DLL /OUT:./v8.dll 
> /PDB:./v8.dll.pdb @./v8.dll.rsp
> class-verifiers-tq.obj : error LNK2019: unresolved external symbol 
> "public: class v8::internal::TNode __cdecl 
> v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class 
> v8::internal::TNode,class 
> v8::internal::TNode)" 
> (?IsFastJSArray@TorqueGeneratedExportedMacrosAssembler@internal@v8@@QEAA?AV?$TNode@UBoolT@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@@Z)
>  
> referenced in function "public: class v8::internal::TNode v8::internal::JSArray> __cdecl 
> v8::internal::CodeStubAssembler::TaggedToFastJSArray(class 
> v8::internal::TNode,class 
> v8::internal::TNode,class 
> v8::internal::compiler::CodeAssemblerLabel *)" 
> (?TaggedToFastJSArray@CodeStubAssembler@internal@v8@@QEAA?AV?$TNode@VJSArray@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@PEAVCodeAssemblerLabel@compiler@23@@Z)
>
> There's 75 symbols missing in total, all in class-verifiers-tq.obj, I can 
> post the rest if needed, but hopefully this will give you an idea.
>
> On release builds there is only one undefined symbol: void __cdecl 
> v8::internal::FixedArray::set(int,class v8::internal::Smi), which I believe 
> should be in fixed-array-tq-csa.obj,
> but it is not there. There are 2 overrides right next to its definition in 
> fixed-array-inl.h that do seem to exist in the object file but this one 
> isn't.
>
> here is the error output:
>
> ninja: Entering directory `out\x64.release'
> [1/298] LINK mksnapshot.exe mksnapshot.exe.pdb
> FAILED: mksnapshot.exe mksnapshot.exe.pdb
> C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
>  
> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
> False link.exe /nologo /OUT:./mksnapshot.exe /PDB:./mksnapshot.exe.pdb 
> @./mksnapshot.exe.rsp
> exported-macros-assembler-tq.obj : error LNK2019: unresolved external 
> symbol "public: void __cdecl v8::internal::FixedArray::set(int,class 
> v8::internal::Smi)" (?set@FixedArray@internal@v8@@QEAAXHVSmi@23@@Z) 
> referenced in function "protected: void __cdecl 
> v8::internal::OrderedHashTable v8::internal::OrderedHashMap,2>::SetNumberOfBuckets(int)" 
> (?SetNumberOfBuckets@?$OrderedHashTable@VOrderedHashMap@internal@v8@@$01@internal@v8@@IEAAXH@Z)
>
> .\mksnapshot.exe : fatal error LNK1120: 1 unresolved externals
>
> Is there something I can patch to make this work? is this a known issue?
>
> Also, is there a way to add a debug postfix/suffix like "d"

[v8-users] Errors Building v8 8.3.110.13 for Windows with is_component_build=true target_cpu="x64" is_clang=false use_custom_libcxx=false

2020-07-09 Thread Rodrigo Hernandez
Hello,

I am trying to create a VCPKG (https://github.com/microsoft/vcpkg) port of 
v8,
and in doing so I am syncing to tag 8.3.110.13 as suggested here: 
https://v8.dev/docs/version-numbers

Since this is package manager, I want to build against msvc's c++ lib, so I 
am using use_custom_libcxx=false,
however I am seeing linking errors related to undefined symbols on debug 
builds like:

[1797/2086] LINK(DLL) v8.dll v8.dll.lib v8.dll.pdb
FAILED: v8.dll v8.dll.lib v8.dll.pdb 
C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
 
../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
False link.exe /nologo /IMPLIB:./v8.dll.lib /DLL /OUT:./v8.dll 
/PDB:./v8.dll.pdb @./v8.dll.rsp
class-verifiers-tq.obj : error LNK2019: unresolved external symbol "public: 
class v8::internal::TNode __cdecl 
v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class 
v8::internal::TNode,class 
v8::internal::TNode)" 
(?IsFastJSArray@TorqueGeneratedExportedMacrosAssembler@internal@v8@@QEAA?AV?$TNode@UBoolT@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@@Z)
 
referenced in function "public: class v8::internal::TNode __cdecl 
v8::internal::CodeStubAssembler::TaggedToFastJSArray(class 
v8::internal::TNode,class 
v8::internal::TNode,class 
v8::internal::compiler::CodeAssemblerLabel *)" 
(?TaggedToFastJSArray@CodeStubAssembler@internal@v8@@QEAA?AV?$TNode@VJSArray@internal@v8@@@23@V?$TNode@VContext@internal@v8@@@23@V?$TNode@VObject@internal@v8@@@23@PEAVCodeAssemblerLabel@compiler@23@@Z)

There's 75 symbols missing in total, all in class-verifiers-tq.obj, I can 
post the rest if needed, but hopefully this will give you an idea.

On release builds there is only one undefined symbol: void __cdecl 
v8::internal::FixedArray::set(int,class v8::internal::Smi), which I believe 
should be in fixed-array-tq-csa.obj,
but it is not there. There are 2 overrides right next to its definition in 
fixed-array-inl.h that do seem to exist in the object file but this one 
isn't.

here is the error output:

ninja: Entering directory `out\x64.release'
[1/298] LINK mksnapshot.exe mksnapshot.exe.pdb
FAILED: mksnapshot.exe mksnapshot.exe.pdb
C:/Code/vcpkg/buildtrees/v8/src/epot_tools-f6c91d5fca/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe
 
../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
False link.exe /nologo /OUT:./mksnapshot.exe /PDB:./mksnapshot.exe.pdb 
@./mksnapshot.exe.rsp
exported-macros-assembler-tq.obj : error LNK2019: unresolved external 
symbol "public: void __cdecl v8::internal::FixedArray::set(int,class 
v8::internal::Smi)" (?set@FixedArray@internal@v8@@QEAAXHVSmi@23@@Z) 
referenced in function "protected: void __cdecl 
v8::internal::OrderedHashTable::SetNumberOfBuckets(int)" 
(?SetNumberOfBuckets@?$OrderedHashTable@VOrderedHashMap@internal@v8@@$01@internal@v8@@IEAAXH@Z)

.\mksnapshot.exe : fatal error LNK1120: 1 unresolved externals

Is there something I can patch to make this work? is this a known issue?

Also, is there a way to add a debug postfix/suffix like "d" to debug 
libraries?

Thanks in advance!

-- 
-- 
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/bd039d0b-45cd-4aa4-afe3-70b297de1536o%40googlegroups.com.