I'm facing the same linking issue on using v8 shared libs on CentOS 8
use_custom_libcxx_for_host = true
Argument overview:
Use libc++ instead of stdlibc++ when using the host_cpu toolchain, even if
use_custom_libcxx is false. This is useful for cross-compiles where a custom
toolchain for the target_cpu has been set as the default toolchain, but use_custom_libcxx should still be true when building for the host.
This issue is because of the libc++ mismatch during the linking process of clang. I fixed the exact same issue as yours on Linux, with this.
Nagendra, what do you mean with "using libc++ insead of stdlibc++ when using the host_cpu toolchain"? I don't get it.
That’s clear, the instruction under the link suggests to build V8 as static library, which we already know to be working. But the point was to build and use V8 as DLL. Meanwhile, I’ve found following workaround: add 2 new custom functions to the libplatform, the first one returns normal pointer extracted from return value of the NewDefaultPlatform() and second to delete v8::Platform object (this is to ensure we use both new and delete from libc++), and export these functions from DLL. This way I’ve gotten rid of dependency on the std::unique_ptr version coming from libc++. And based on this experience I’d generally suggest to V8 developers to keep all public V8 APIs w/o any STL stuff for the sake of better integration with different compilers, which with very high probability have different STL implementations than libc++.
- Ivan
--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
v8-users+u...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/v8-users/554c96a8-82e1-4a6d-86c7-2a65d51c5797%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-u...@googlegroups.com.
Yes, that’s true. But fortunately, I don’t use all that stuff that has STL classes in the interface, except libplatform, so works for me, and may work for someone else.
To unsubscribe from this group and stop receiving emails from it, send an email to
v8-users+u...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/v8-users/c64e6796-74f7-4bbd-9701-750632714cd7%40googlegroups.com.
Oh, that’s great. Thank you. I will try to apply similar patch locally to the 7.8.279.23, since I am allowed to use only “stable” versions of V8.
- Ivan
From: 'Bill Ticehurst' via v8-users
Sent: Friday, December 20, 2019 20:02
To: v8-users
Subject: [v8-users] Re: Building v8 shared library on windows
FWIW: I played around with the last night for a couple hours and got a release build working using a "component build" and MSVC. It was mostly moving some inline functions and adding some V8_EXPORT_PRIVATE statements (which effectively add the "__declspec(dllexport)" statements to expose functions across DLLs with MSVC). You can see the changes over the current V8 v8.0 branch at https://github.com/v8/v8/compare/8.0-lkgr...billti:v8.0-msvc-fixes?expand=1
--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/a0a7c08b-7ff7-40cf-9104-021a97912018%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/fa4f75c9-4ef9-4eb7-9cbf-511c9f0dc4a3%40googlegroups.com.
Still can’t get it working. Note - I am trying to compile v8 7.8.279.23
For example:
[105/1253] L:/depot_tools/bootstrap-3_8_0b1_chromium_1_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./bytecode_builtins_list_generator.exe /PDB:./bytecode_builtins_list_generator.exe.pdb @./bytecode_builtins_list_generator.exe.rsp
FAILED: bytecode_builtins_list_generator.exe bytecode_builtins_list_generator.exe.pdb
L:/depot_tools/bootstrap-3_8_0b1_chromium_1_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./bytecode_builtins_list_generator.exe /PDB:./bytecode_builtins_list_generator.exe.pdb @./bytecode_builtins_list_generator.exe.rsp
generate-bytecodes-builtins-list.obj : error LNK2019: unresolved external symbol "public: static void __cdecl v8::internal::Internals::CheckInitializedImpl(class v8::Isolate *)" (?CheckInitializedImpl@Internals@internal@v8@@SAXPEAVIsolate@3@@Z) referenced in function "public: static void __cdecl v8::internal::Internals::CheckInitialized(class v8::Isolate *)" (?CheckInitialized@Internals@internal@v8@@SAXPEAVIsolate@3@@Z)
and many more of that.
Seems like such unresolved functions are located in the source code files that were not compiled.
For example:
bytecode-operands.obj : error LNK2001: unresolved external symbol "private: static void __cdecl v8::Int32::CheckCast(class v8::Value *)" (?CheckCast@Int32@v8@@CAXPEAVValue@2@@Z)
This one is located in the v8/src/api/api.cc
But when I am checking my v8\out.gn.windows\x64.debug\.ninja.log api.obj is not mentioned there.
Is these some missing dependency in the build files?
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CY4PR10MB2023C7A740F804FB0D5648D0FF2D0%40CY4PR10MB2023.namprd10.prod.outlook.com.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/e738b2fd-3d7e-4684-8f45-9642b8e2c221%40googlegroups.com.
Following with interest.Ben
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/e738b2fd-3d7e-4684-8f45-9642b8e2c221%40googlegroups.com.