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 &x: 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<struct v8::internal::BoolT> __cdecl 
> v8::internal::TorqueGeneratedExportedMacrosAssembler::IsFastJSArray(class 
> v8::internal::TNode<class v8::internal::Object>,class 
> v8::internal::TNode<class v8::internal::Context>)" 
> (?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<class 
> v8::internal::JSArray> __cdecl 
> v8::internal::CodeStubAssembler::TaggedToFastJSArray(class 
> v8::internal::TNode<class v8::internal::Context>,class 
> v8::internal::TNode<class v8::internal::Object>,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<class 
> 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/b214e6f1-722b-4c8d-b466-9b6900b437c7o%40googlegroups.com.

Reply via email to