Re: [v8-users] V8 build error on the CentOS 7
w/o sysroot - gives errors, and I can't find how to get required packages, maybe GObject v2 is not on CentOS 7. Got one more idea - build clang 10.0.0 from sources on the centos7. $ gn gen out.gn.linux/x64.debug ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code. pkgresult = exec_script(pkg_config_script, args, "value") ^-- Current dir: /home/ivan/genesys/build/v8x/7.8.279.23_work/v8/out.gn.linux/x64.debug/ Command: python /home/ivan/genesys/build/v8x/7.8.279.23_work/v8/build/config/linux/pkg-config.py glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 Returned 1. stderr: Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found Package gmodule-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gmodule-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gmodule-2.0' found Package gobject-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gobject-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gobject-2.0' found Package gthread-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gthread-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gthread-2.0' found Could not run pkg-config. See //build/config/linux/BUILD.gn:89:3: whence it was called. pkg_config("glib") { ^--- See //build/config/compiler/BUILD.gn:235:18: which caused the file to be included. configs += [ "//build/config/linux:compiler" ] ^-- On Friday, December 6, 2019 at 2:50:53 PM UTC+2, Jakob Kummerow wrote: > > You can try adding: > > is_clang = false > use_sysroot = false > > to args.gn, but do note that this configuration is not officially > supported. If it works, you're in luck; if it doesn't, then CentOS 7 is > simply too old. > > (Side note: the recommended flow is to use "gn args " to edit the > args, instead of editing the file with any other editor and then invoking > "gn args" on it. But that's just a convenience thing; the end result should > be the same.) > > > On Fri, Dec 6, 2019 at 1:12 PM Ivan P. > wrote: > >> Hi, I'm trying to build on the CentOS 7 current stable version of V8 >> 7.8.279.23 (i.e. version picked from the current stable Chrome version >> 78.0.3904.108) and getting error. >> >> Here's what I've done: >> >> I've checked out sources and synchronized dependencies. >> >> I've prepared following gn config file >> >> # FILE: v8/out.gn.linux/x64.debug/gn.args >> symbol_level=2 >> is_debug=true >> is_component_build=true >> target_cpu="x64" >> v8_target_cpu="x64" >> v8_postmortem_support=true >> use_debug_fission=false >> # END OF FILE >> >> And run >> gn args out.gn.linux/x64.debug >> >> After this I'm trying to run build process itself: >> ninja -j3 -v -C out.gn.linux/x64.debug d8 >> >> and I am getting following output with error (see in the bottom in *RED* >> ): >> >> ninja: Entering directory `out.gn.linux/x64.debug' >> [1/1302] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD >> -MF obj/torque_base/class-debug-reader-generator.o.d -DUSE_UDEV >> -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 >> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE >> -D_GNU_SOURCE -DCR_CLANG_REVISION=\"369647-8288453f-2\" >> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD >> -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD >> -DCR_LIBCXX_REVISION=361348 >> -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -D_DEBUG >> -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER >> -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE >> -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS >> -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH >> -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DV8_INTL_SUPPORT >> -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT >> -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_USE_EXTERNAL_STARTUP_DATA >> -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS >> -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_EMBEDDED_BUILTINS >> -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO >> -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_ENABLE_CHECKS >> -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS >> -DV8_TARGET_ARCH_X64 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS >> -DBUILDING_V8_SHARED -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS >> -DV8_IMMINENT_DEPRECATION_WARNINGS -DUSING_V8_BASE_SHARED -I../.. -Igen >> -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 >> -fstack-protector -funwind-tables -fPIC >> -B../../third_party/binutils/Linux_x64/Release/bin -pthread >> -fcolor-diagnostics -fmerge-all-constants >> -f
Re: [v8-users] V8 build error on the CentOS 7
Doesn't work. Seems like newer clang is required due to some options in the command line. ninja: Entering directory `out.gn.linux/x64.debug' [1/1302] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_base/class-debug-reader-generator.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"369647-8288453f-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=361348 -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DV8_INTL_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_EMBEDDED_BUILTINS -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DV8_TARGET_ARCH_X64 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DBUILDING_V8_SHARED -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DUSING_V8_BASE_SHARED -I../.. -Igen -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -march=x86-64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-xor-used-as-pow -fno-omit-frame-pointer -g2 -ggnu-pubnames -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -fexceptions -frtti -c ../../src/torque/class-debug-reader-generator.cc -o obj/torque_base/class-debug-reader-generator.o FAILED: obj/torque_base/class-debug-reader-generator.o ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_base/class-debug-reader-generator.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"369647-8288453f-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=361348 -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DV8_INTL_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_EMBEDDED_BUILTINS -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DV8_TARGET_ARCH_X64 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DBUILDING_V8_SHARED -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DUSING_V8_BASE_SHARED -I../.. -Igen -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -m
[v8-users] Re: Building v8 shared library on windows
Are you building with MSVC or Clang? The "component" build of V8 has some issues with MSVC, but I believe should just work if using Clang. Note: "component" build means a DLL build. Check that "is_component_build = true" in your output folder's args.gn file, and then you should see v8*.dll files in your output folder after the build. On Sunday, December 1, 2019 at 12:46:23 PM UTC-8, Bad wrote: > > Hi > I've been trying to implement v8 in a project of mine for more than a > month and a half. > It looks like I'm missing some step, as I've been able to obtain v8 header > files, and .lib files, but I don't get how to build a DLL out of these. > If someone finds a spare minute to help me, it would be very helpfull. > > My project is a c# project, but once I'll have the .dll I think I'll > figure it out on my own, > > 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/cba34809-9bdf-481d-9217-78eecb44fac9%40googlegroups.com.
Re: [v8-users] V8 build error on the CentOS 7
> > what about following idea: I am actually upgrading from 7.0.276.32, which > I could build a year ago on the CentOS 7 using version of clang supplied at > that moment, and I have my own archive of all that stuff. So, what if I > take that older version of clang? Are there any changes in V8 that may > prevent me using it? > You can try. I would guess that it should work in this case, but it's untested and unsupported. > Regarding what you suggest, GCC 7 and GCC 8 are available on CentOS 7 via > so called "software collections", maybe one of them will fit instead of > clang. > > On Friday, December 6, 2019 at 2:50:53 PM UTC+2, Jakob Kummerow wrote: >> >> You can try adding: >> >> is_clang = false >> use_sysroot = false >> >> to args.gn, but do note that this configuration is not officially >> supported. If it works, you're in luck; if it doesn't, then CentOS 7 is >> simply too old. >> >> (Side note: the recommended flow is to use "gn args " to edit the >> args, instead of editing the file with any other editor and then invoking >> "gn args" on it. But that's just a convenience thing; the end result should >> be the same.) >> >> >> On Fri, Dec 6, 2019 at 1:12 PM Ivan P. wrote: >> >>> Hi, I'm trying to build on the CentOS 7 current stable version of V8 >>> 7.8.279.23 (i.e. version picked from the current stable Chrome version >>> 78.0.3904.108) and getting error. >>> >>> Here's what I've done: >>> >>> I've checked out sources and synchronized dependencies. >>> >>> I've prepared following gn config file >>> >>> # FILE: v8/out.gn.linux/x64.debug/gn.args >>> symbol_level=2 >>> is_debug=true >>> is_component_build=true >>> target_cpu="x64" >>> v8_target_cpu="x64" >>> v8_postmortem_support=true >>> use_debug_fission=false >>> # END OF FILE >>> >>> And run >>> gn args out.gn.linux/x64.debug >>> >>> After this I'm trying to run build process itself: >>> ninja -j3 -v -C out.gn.linux/x64.debug d8 >>> >>> and I am getting following output with error (see in the bottom in *RED* >>> ): >>> >>> ninja: Entering directory `out.gn.linux/x64.debug' >>> [1/1302] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD >>> -MF obj/torque_base/class-debug-reader-generator.o.d -DUSE_UDEV >>> -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 >>> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE >>> -D_GNU_SOURCE -DCR_CLANG_REVISION=\"369647-8288453f-2\" >>> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD >>> -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD >>> -DCR_LIBCXX_REVISION=361348 >>> -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -D_DEBUG >>> -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER >>> -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE >>> -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS >>> -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH >>> -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DV8_INTL_SUPPORT >>> -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT >>> -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_USE_EXTERNAL_STARTUP_DATA >>> -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS >>> -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_EMBEDDED_BUILTINS >>> -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO >>> -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_ENABLE_CHECKS >>> -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS >>> -DV8_TARGET_ARCH_X64 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS >>> -DBUILDING_V8_SHARED -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS >>> -DV8_IMMINENT_DEPRECATION_WARNINGS -DUSING_V8_BASE_SHARED -I../.. -Igen >>> -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 >>> -fstack-protector -funwind-tables -fPIC >>> -B../../third_party/binutils/Linux_x64/Release/bin -pthread >>> -fcolor-diagnostics -fmerge-all-constants >>> -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm >>> -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 >>> -march=x86-64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= >>> -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . >>> -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough >>> -Wthread-safety -Wextra-semi -Wno-missing-field-initializers >>> -Wno-unused-parameter -Wno-c++11-narrowing >>> -Wno-unneeded-internal-declaration -Wno-undefined-var-template >>> -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion >>> -Wno-xor-used-as-pow -fno-omit-frame-pointer -g2 -ggnu-pubnames >>> -fvisibility=hidden -Wheader-hygiene -Wstring-conversion >>> -Wtautological-overlap-compare -Wmissing-field-initializers >>> -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections >>> -ffunction-sections -Wexit-time-destructors -Wno-undefined-bool-conversion >>> -Wno-tautological-undefined-compare -std=c++14 -nostdinc++ >>> -isystem../../buildtools/third_party/libc++/trunk/include >>> -isystem../../buildtools/third_party/libc++abi/trunk/include >>> --sysroot=../../b
Re: [v8-users] V8 build error on the CentOS 7
Thank you, I will try. But what about following idea: I am actually upgrading from 7.0.276.32, which I could build a year ago on the CentOS 7 using version of clang supplied at that moment, and I have my own archive of all that stuff. So, what if I take that older version of clang? Are there any changes in V8 that may prevent me using it? Regarding what you suggest, GCC 7 and GCC 8 are available on CentOS 7 via so called "software collections", maybe one of them will fit instead of clang. On Friday, December 6, 2019 at 2:50:53 PM UTC+2, Jakob Kummerow wrote: > > You can try adding: > > is_clang = false > use_sysroot = false > > to args.gn, but do note that this configuration is not officially > supported. If it works, you're in luck; if it doesn't, then CentOS 7 is > simply too old. > > (Side note: the recommended flow is to use "gn args " to edit the > args, instead of editing the file with any other editor and then invoking > "gn args" on it. But that's just a convenience thing; the end result should > be the same.) > > > On Fri, Dec 6, 2019 at 1:12 PM Ivan P. > wrote: > >> Hi, I'm trying to build on the CentOS 7 current stable version of V8 >> 7.8.279.23 (i.e. version picked from the current stable Chrome version >> 78.0.3904.108) and getting error. >> >> Here's what I've done: >> >> I've checked out sources and synchronized dependencies. >> >> I've prepared following gn config file >> >> # FILE: v8/out.gn.linux/x64.debug/gn.args >> symbol_level=2 >> is_debug=true >> is_component_build=true >> target_cpu="x64" >> v8_target_cpu="x64" >> v8_postmortem_support=true >> use_debug_fission=false >> # END OF FILE >> >> And run >> gn args out.gn.linux/x64.debug >> >> After this I'm trying to run build process itself: >> ninja -j3 -v -C out.gn.linux/x64.debug d8 >> >> and I am getting following output with error (see in the bottom in *RED* >> ): >> >> ninja: Entering directory `out.gn.linux/x64.debug' >> [1/1302] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD >> -MF obj/torque_base/class-debug-reader-generator.o.d -DUSE_UDEV >> -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 >> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE >> -D_GNU_SOURCE -DCR_CLANG_REVISION=\"369647-8288453f-2\" >> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD >> -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD >> -DCR_LIBCXX_REVISION=361348 >> -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -D_DEBUG >> -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER >> -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE >> -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS >> -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH >> -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DV8_INTL_SUPPORT >> -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT >> -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_USE_EXTERNAL_STARTUP_DATA >> -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS >> -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_EMBEDDED_BUILTINS >> -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO >> -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_ENABLE_CHECKS >> -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS >> -DV8_TARGET_ARCH_X64 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS >> -DBUILDING_V8_SHARED -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS >> -DV8_IMMINENT_DEPRECATION_WARNINGS -DUSING_V8_BASE_SHARED -I../.. -Igen >> -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 >> -fstack-protector -funwind-tables -fPIC >> -B../../third_party/binutils/Linux_x64/Release/bin -pthread >> -fcolor-diagnostics -fmerge-all-constants >> -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm >> -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 >> -march=x86-64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= >> -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . >> -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough >> -Wthread-safety -Wextra-semi -Wno-missing-field-initializers >> -Wno-unused-parameter -Wno-c++11-narrowing >> -Wno-unneeded-internal-declaration -Wno-undefined-var-template >> -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion >> -Wno-xor-used-as-pow -fno-omit-frame-pointer -g2 -ggnu-pubnames >> -fvisibility=hidden -Wheader-hygiene -Wstring-conversion >> -Wtautological-overlap-compare -Wmissing-field-initializers >> -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections >> -ffunction-sections -Wexit-time-destructors -Wno-undefined-bool-conversion >> -Wno-tautological-undefined-compare -std=c++14 -nostdinc++ >> -isystem../../buildtools/third_party/libc++/trunk/include >> -isystem../../buildtools/third_party/libc++abi/trunk/include >> --sysroot=../../build/linux/debian_sid_amd64-sysroot >> -fvisibility-inlines-hidden -fexceptions -frtti -c >> ../../src/torque/class-debug-re
Re: [v8-users] V8 build error on the CentOS 7
You can try adding: is_clang = false use_sysroot = false to args.gn, but do note that this configuration is not officially supported. If it works, you're in luck; if it doesn't, then CentOS 7 is simply too old. (Side note: the recommended flow is to use "gn args " to edit the args, instead of editing the file with any other editor and then invoking "gn args" on it. But that's just a convenience thing; the end result should be the same.) On Fri, Dec 6, 2019 at 1:12 PM Ivan P. wrote: > Hi, I'm trying to build on the CentOS 7 current stable version of V8 > 7.8.279.23 (i.e. version picked from the current stable Chrome version > 78.0.3904.108) and getting error. > > Here's what I've done: > > I've checked out sources and synchronized dependencies. > > I've prepared following gn config file > > # FILE: v8/out.gn.linux/x64.debug/gn.args > symbol_level=2 > is_debug=true > is_component_build=true > target_cpu="x64" > v8_target_cpu="x64" > v8_postmortem_support=true > use_debug_fission=false > # END OF FILE > > And run > gn args out.gn.linux/x64.debug > > After this I'm trying to run build process itself: > ninja -j3 -v -C out.gn.linux/x64.debug d8 > > and I am getting following output with error (see in the bottom in *RED*): > > ninja: Entering directory `out.gn.linux/x64.debug' > [1/1302] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF > obj/torque_base/class-debug-reader-generator.o.d -DUSE_UDEV -DUSE_AURA=1 > -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 > -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE > -DCR_CLANG_REVISION=\"369647-8288453f-2\" -D__STDC_CONSTANT_MACROS > -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -D_LIBCPP_ABI_UNSTABLE > -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD > -DCR_LIBCXX_REVISION=361348 > -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -D_DEBUG > -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER > -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE > -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS > -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH > -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DV8_INTL_SUPPORT > -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT > -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_USE_EXTERNAL_STARTUP_DATA > -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS > -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_EMBEDDED_BUILTINS > -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO > -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_ENABLE_CHECKS > -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS > -DV8_TARGET_ARCH_X64 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS > -DBUILDING_V8_SHARED -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS > -DV8_IMMINENT_DEPRECATION_WARNINGS -DUSING_V8_BASE_SHARED -I../.. -Igen > -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 > -fstack-protector -funwind-tables -fPIC > -B../../third_party/binutils/Linux_x64/Release/bin -pthread > -fcolor-diagnostics -fmerge-all-constants > -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm > -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 > -march=x86-64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= > -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . > -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough > -Wthread-safety -Wextra-semi -Wno-missing-field-initializers > -Wno-unused-parameter -Wno-c++11-narrowing > -Wno-unneeded-internal-declaration -Wno-undefined-var-template > -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion > -Wno-xor-used-as-pow -fno-omit-frame-pointer -g2 -ggnu-pubnames > -fvisibility=hidden -Wheader-hygiene -Wstring-conversion > -Wtautological-overlap-compare -Wmissing-field-initializers > -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections > -ffunction-sections -Wexit-time-destructors -Wno-undefined-bool-conversion > -Wno-tautological-undefined-compare -std=c++14 -nostdinc++ > -isystem../../buildtools/third_party/libc++/trunk/include > -isystem../../buildtools/third_party/libc++abi/trunk/include > --sysroot=../../build/linux/debian_sid_amd64-sysroot > -fvisibility-inlines-hidden -fexceptions -frtti -c > ../../src/torque/class-debug-reader-generator.cc -o > obj/torque_base/class-debug-reader-generator.o > FAILED: obj/torque_base/class-debug-reader-generator.o > ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF > obj/torque_base/class-debug-reader-generator.o.d -DUSE_UDEV -DUSE_AURA=1 > -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 > -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE > -DCR_CLANG_REVISION=\"369647-8288453f-2\" -D__STDC_CONSTANT_MACROS > -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -D_LIBCPP_ABI_UNSTABLE > -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD > -DCR_LIBCXX_REVISION=361348 > -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -D_DEBUG > -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER >
[v8-users] V8 build error on the CentOS 7
Hi, I'm trying to build on the CentOS 7 current stable version of V8 7.8.279.23 (i.e. version picked from the current stable Chrome version 78.0.3904.108) and getting error. Here's what I've done: I've checked out sources and synchronized dependencies. I've prepared following gn config file # FILE: v8/out.gn.linux/x64.debug/gn.args symbol_level=2 is_debug=true is_component_build=true target_cpu="x64" v8_target_cpu="x64" v8_postmortem_support=true use_debug_fission=false # END OF FILE And run gn args out.gn.linux/x64.debug After this I'm trying to run build process itself: ninja -j3 -v -C out.gn.linux/x64.debug d8 and I am getting following output with error (see in the bottom in *RED*): ninja: Entering directory `out.gn.linux/x64.debug' [1/1302] ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_base/class-debug-reader-generator.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"369647-8288453f-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=361348 -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DV8_INTL_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_EMBEDDED_BUILTINS -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DV8_TARGET_ARCH_X64 -DDEBUG -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -DBUILDING_V8_SHARED -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -DUSING_V8_BASE_SHARED -I../.. -Igen -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -march=x86-64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-xor-used-as-pow -fno-omit-frame-pointer -g2 -ggnu-pubnames -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wmissing-field-initializers -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -fexceptions -frtti -c ../../src/torque/class-debug-reader-generator.cc -o obj/torque_base/class-debug-reader-generator.o FAILED: obj/torque_base/class-debug-reader-generator.o ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/torque_base/class-debug-reader-generator.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"369647-8288453f-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=361348 -DCR_SYSROOT_HASH=e7c53f04bd88d29d075bfd1f62b073aeb69cbe09 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH -DV8_ENABLE_DOUBLE_CONST_STORE_CHECK -DV8_INTL_SUPPORT -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT -DV8_SNAPSHOT_NATIVE_CODE_COUNTERS -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY -DV8_EMBEDDED_BUILTINS -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_ENABLE_CHECKS -DV8_DE
Re: [v8-users] How to properly dispose an isolate
On Thu, Dec 5, 2019 at 2:55 PM Darin Dimitrov wrote: > > Hello, > > I am embedding V8 in my C++ application and I need to create multiple > isolates from different background threads. > > Here's my workflow: > > 1. Create an isolate in the main thread -> this must be a long living isolate > (for the entire application lifetime) > 2. Spawn multiple short living background threads. > 3. Inside each background thread, create a new isolate using Isolate::New. > 4. At the end of the thread, call isolate->Dispose. > > My question is about properly disposing the short living isolates. I have > noticed that if I call the isolate->Dispose() as a final instruction inside > the background thread, chances are that subsequent calls to Isolate::New from > other threads will return a pointer to an already disposed isolate. Ss a > result of this reuse, I get heap-use-after free errors when I try to perform > some operations on this isolate. > > On the other hand, if I don't call isolate->Dispose() then each call to > Isolate::New will return a fresh new pointer, but the memory claimed by this > short living isolates will never be reclaimed and is leaking. > > So what is the proper way to dispose the isolates? Should the Dispose call be > made from the background thread in which the isolate was created, or I need > to dispose it from the main thread (in which I have entered the main > isolate). I have tried both approaches without luck. isolate->Dispose() is the right method to call. I don't believe it's necessary to call it from the same thread (but neither does it hurt) as long as the isolate isn't in use by another thread, i.e., hasn't been Enter()'ed. Use-after-free errors sound fishy. Isolate::New() heap-allocates the isolate. Are you using a custom allocator? -- -- 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/CAHQurc_tKSV22wa2a81rMDeQcSHSQY_roxoYd3f7BKNqH8R2HQ%40mail.gmail.com.