If I remove the following form gn args . ============== use_custom_libcxx = false # Use Xcode's libcxx. use_xcode_clang = true ==============
I am using following setup xcode : 12.5.1 v8: tag/8.5.188 macOS: Big Sur 11.3.1 the build starts but fails while linking d8 with the following error : ➜ v8 git:(heads/tags/8.5.188) ✗ ninja -C out/release-ios ninja: Entering directory `out/release-ios' [0/1] Regenerating ninja files [3202/3507] LINK ./d8 FAILED: d8 TOOL_VERSION=1628482238 ../../build/toolchain/apple/linker_driver.py -Wcrl,strippath,../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --deterministic ../../third_party/llvm-build/Release+Asserts/bin/clang++ -B ../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ -Wl,-fatal_warnings -target arm64-apple-ios10 -nostdlib++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk -Wl,-ObjC -Wl,-rpath,@executable_path/Frameworks -Wl,-dead_strip -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/usr/lib/swift -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -o "./d8" -Wl,-filelist,"./d8.rsp" -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation Undefined symbols for architecture arm64: "v8::internal::trap_handler::RegisterDefaultTrapHandler()", referenced from: v8::internal::trap_handler::EnableTrapHandler(bool) in handler-outside.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Traceback (most recent call last): File "../../build/toolchain/apple/linker_driver.py", line 305, in <module> Main(sys.argv) File "../../build/toolchain/apple/linker_driver.py", line 98, in Main subprocess.check_call(compiler_driver_args, env=env) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['../../third_party/llvm-build/Release+Asserts/bin/clang++', '-B', '../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/', '-Wl,-fatal_warnings', '-target', 'arm64-apple-ios10', '-nostdlib++', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk', '-Wl,-ObjC', '-Wl,-rpath,@executable_path/Frameworks', '-Wl,-dead_strip', '-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/usr/lib/swift', '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos', '-o', './d8', '-Wl,-filelist,./d8.rsp', '-framework', 'CoreFoundation', '-framework', 'CoreGraphics', '-framework', 'CoreText', '-framework', 'Foundation']' returned non-zero exit status 1 [3207/3507] CXX obj/test/unittests/unittests_sources/instruction-selector-arm64-unittest.o ninja: build stopped: subcommand failed. On Tuesday, 10 August 2021 at 10:40:04 UTC+5:30 DEVANSH M KAUSHIK wrote: > I am also facing the same issue. > Details are : > v8: tag/8.5.188 > macOS: Big Sur 11.3.1 > > the original error "../../include/cppgc/allocation.h:168:39: error: no > member named 'forward' in namespace 'std'" is resolved by switching to this > v8 version "tag/8.5.188" but I am still getting the following error in this > version : > ============================================================= > > ➜ v8 git:(heads/tags/8.5.188) ✗ ninja -C out/release-ios > > ninja: Entering directory `out/release-ios' > > [0/1] Regenerating ninja files > > [1/3397] CXX obj/cppgc_base/marking-worklists.o > > FAILED: obj/cppgc_base/marking-worklists.o > > ../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ > > -MMD -MF obj/cppgc_base/marking-worklists.o.d -DCR_XCODE_VERSION=1251 > -DCR_CLANG_REVISION=\"llvmorg-14-init-591-g7d9d926a-1\" > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 > -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 > -DNS_BLOCK_ASSERTIONS=1 -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 > -DENABLE_MINOR_MC -DENABLE_HANDLE_ZAPPING -DV8_ATOMIC_OBJECT_FIELD_WRITES > -DV8_ATOMIC_MARKING_STATE -DV8_ENABLE_LAZY_SOURCE_POSITIONS > -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO > -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SNAPSHOT_COMPRESSION > -DV8_ENABLE_WEBASSEMBLY -DV8_ALLOCATION_FOLDING > -DV8_ALLOCATION_SITE_TRACKING -DV8_ADVANCED_BIGINT_ALGORITHMS > -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS > -DCPPGC_CAGED_HEAP -DV8_TARGET_ARCH_ARM64 -DV8_HAVE_TARGET_OS > -DV8_TARGET_OS_IOS -DV8_RUNTIME_CALL_STATS > -DDISABLE_UNTRUSTED_CODE_MITIGATIONS -I../.. -Igen -I../../include > -Igen/include -fno-delete-null-pointer-checks -fno-ident > -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector > -fcolor-diagnostics -fmerge-all-constants -target arm64-apple-ios10 > -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= > -ffile-compilation-dir=. -no-canonical-prefixes -Wall -Wextra > -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi > -Wunguarded-availability -Wundeclared-selector > -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis > -Wno-unneeded-internal-declaration -fno-omit-frame-pointer -g2 -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk > > -fembed-bitcode -Wheader-hygiene -Wstring-conversion > -Wtautological-overlap-compare -Wmissing-field-initializers > -Wunreachable-code -Wshorten-64-to-32 -O3 -fvisibility=default > -Wexit-time-destructors -std=c++14 -fno-trigraphs -Wno-trigraphs > -fno-exceptions -fno-rtti -c ../../src/heap/cppgc/marking-worklists.cc -o > obj/cppgc_base/marking-worklists.o > > clang++: error: unknown argument: '-ffile-compilation-dir=.' > > [2/3397] CXX obj/cppgc_base/name-trait.o > > FAILED: obj/cppgc_base/name-trait.o > > ============================================================= > > > ************************************************* > gn args as following: > ************************************************* > enable_ios_bitcode = true > ios_deployment_target = 10 > > is_component_build = false > is_debug = false > > target_cpu = "arm64" > target_os = "ios" > > treat_warnings_as_errors = false > > use_custom_libcxx = false # Use Xcode's libcxx. > use_xcode_clang = true > > v8_target_cpu = "arm64" > v8_enable_debugging_features = false > v8_enable_i18n_support = false # Produces a smaller binary. > v8_enable_pointer_compression = false > v8_enable_v8_checks = false > v8_monolithic = true # Enable the v8_monolith target. > v8_use_external_startup_data = false # The snaphot is included in the > binary. > ios_enable_code_signing=false > > ================================================ > > > On Sunday, 8 August 2021 at 10:23:40 UTC+5:30 chao...@gmail.com wrote: > >> If I switch to tag 8.5.188, everything works fine. >> >> On Sunday, August 8, 2021 at 12:51:05 PM UTC+8 chao...@gmail.com wrote: >> >>> >>> ************************************************* >>> gn args as following: >>> ************************************************* >>> >>> enable_ios_bitcode = true >>> >>> ios_deployment_target = 10 >>> >>> is_component_build = false >>> is_debug = false >>> is_official_build = true >>> >>> symbol_level = 1 >>> >>> target_cpu = "arm64" >>> target_os = "ios" >>> >>> treat_warnings_as_errors = false >>> >>> use_custom_libcxx = false # Use Xcode's libcxx. >>> use_xcode_clang = true >>> >>> v8_target_cpu = "arm64" >>> v8_enable_debugging_features = false >>> v8_enable_i18n_support = false # Produces a smaller binary. >>> v8_enable_pointer_compression = false >>> v8_enable_v8_checks = false >>> v8_monolithic = true # Enable the v8_monolith target. >>> v8_use_external_startup_data = false # The snaphot is included in the >>> binary. >>> >>> On Sunday, August 8, 2021 at 12:47:31 PM UTC+8 chao...@gmail.com wrote: >>> >>>> Thanks for your quick response! >>>> >>>> Compiled successfully when I switched to tag 9.4.116 and added an >>>> #include <utility> in include/cppgc/allocation.h. >>>> >>>> But it shows error during the link stage: >>>> >>>> Undefined symbols for architecture arm64: >>>> >>>> >>>> "v8::internal::trap_handler::RegisterDefaultTrapHandler()", referenced >>>> from: >>>> >>>> >>>> v8::internal::trap_handler::EnableTrapHandler(bool) in >>>> libv8_monolith.a(handler-outside.o) >>>> >>>> "v8::internal::trap_handler::TryHandleSignal(int, >>>> __siginfo*, void*)", referenced from: >>>> >>>> v8::TryHandleWebAssemblyTrapPosix(int, __siginfo*, >>>> void*) in libv8_monolith.a(api.o) >>>> >>>> v8::V8::TryHandleSignal(int, void*, void*) in >>>> libv8_monolith.a(api.o) >>>> >>>> ld: symbol(s) not found for architecture arm64 >>>> >>>> clang: error: linker command failed with exit code 1 >>>> (use -v to see invocation) >>>> >>>> >>>> On Saturday, August 7, 2021 at 2:33:27 AM UTC+8 Clemens Backes wrote: >>>> >>>>> Thanks for letting us know, we indeed did not differentiate between >>>>> MacOS and iOS. I just landed a fix for this: >>>>> https://crrev.com/c/3077154 >>>>> >>>>> The error about std::forward should be fixable by adding an >>>>> #include <utility> in include/cppgc/allocation.h. Can you try that? >>>>> >>>>> On Fri, Aug 6, 2021 at 3:50 AM chao...@gmail.com <chao...@gmail.com> >>>>> wrote: >>>>> >>>>>> My OS version is macOS Big Sur 11.5. >>>>>> On Friday, August 6, 2021 at 8:06:29 AM UTC+8 chao...@gmail.com >>>>>> wrote: >>>>>> >>>>>>> >>>>>>> Oh, I forgot to mention the version. I am trying to compile V8 >>>>>>> v9.4.113. >>>>>>> On Thursday, August 5, 2021 at 11:10:14 PM UTC+8 chao...@gmail.com >>>>>>> wrote: >>>>>>> >>>>>>>> 1. >>>>>>>> ************************************************* >>>>>>>> gn args as following: >>>>>>>> ************************************************* >>>>>>>> >>>>>>>> enable_ios_bitcode = true >>>>>>>> >>>>>>>> ios_deployment_target = 10 >>>>>>>> >>>>>>>> is_component_build = false >>>>>>>> is_debug = false >>>>>>>> is_official_build = true >>>>>>>> >>>>>>>> symbol_level = 0 >>>>>>>> >>>>>>>> target_cpu = "arm64" # "x64" for a simulator build. >>>>>>>> target_os = "ios" >>>>>>>> >>>>>>>> treat_warnings_as_errors = false >>>>>>>> >>>>>>>> use_custom_libcxx = true # Use Xcode's libcxx. >>>>>>>> use_xcode_clang = false >>>>>>>> >>>>>>>> v8_target_cpu = "arm64" >>>>>>>> v8_enable_debugging_features = false >>>>>>>> v8_enable_i18n_support = false # Produces a smaller binary. >>>>>>>> v8_enable_pointer_compression = false >>>>>>>> v8_enable_v8_checks = false >>>>>>>> v8_monolithic = true # Enable the v8_monolith >>>>>>>> target. >>>>>>>> v8_use_external_startup_data = false # The snaphot is included in >>>>>>>> the binary. >>>>>>>> >>>>>>>> >>>>>>>> 2. >>>>>>>> ************************************************* >>>>>>>> error msg as following: >>>>>>>> ************************************************* >>>>>>>> >>>>>>>> ../../src/wasm/code-space-access.cc:40:3: error: >>>>>>>> 'pthread_jit_write_protect_np' is unavailable: not available on iOS >>>>>>>> pthread_jit_write_protect_np(0); >>>>>>>> ^ >>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/usr/include/pthread.h:561:6: >>>>>>>> >>>>>>>> note: 'pthread_jit_write_protect_np' has been explicitly marked >>>>>>>> unavailable >>>>>>>> here >>>>>>>> void pthread_jit_write_protect_np(int enabled); >>>>>>>> ^ >>>>>>>> ../../src/wasm/code-space-access.cc:44:3: error: >>>>>>>> 'pthread_jit_write_protect_np' is unavailable: not available on iOS >>>>>>>> pthread_jit_write_protect_np(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/b5cf66f9-95d7-4f2c-99f5-0fa655e11a56n%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/v8-users/b5cf66f9-95d7-4f2c-99f5-0fa655e11a56n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> Clemens Backes >>>>> >>>>> Software Engineer >>>>> >>>>> clem...@google.com >>>>> >>>>> Google Germany GmbH >>>>> >>>>> Erika-Mann-Straße 33 >>>>> >>>>> 80636 München >>>>> >>>>> Geschäftsführer: Paul Manicle, Halimah DeLaine Prado >>>>> >>>>> Registergericht und -nummer: Hamburg, HRB 86891 >>>>> >>>>> Sitz der Gesellschaft: Hamburg >>>>> >>>>> Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise >>>>> erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes >>>>> weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich >>>>> bitte >>>>> wissen, dass die E-Mail an die falsche Person gesendet wurde. >>>>> >>>>> >>>>> This e-mail is confidential. If you received this communication by >>>>> mistake, please don't forward it to anyone else, please erase all copies >>>>> and attachments, and please let me know that it has gone to the wrong >>>>> person. >>>>> >>>>> -- -- 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/8a5a2e52-d7ef-4824-993a-39b8829dca8dn%40googlegroups.com.