JaneaSystems / nodejs-mobile

Full-fledged Node.js on Android and iOS
https://code.janeasystems.com/nodejs-mobile
Other
2.57k stars 183 forks source link

No generator function support? #196

Open arminsal1 opened 5 years ago

arminsal1 commented 5 years ago

My react native app (currently running on iOS) is using a npm library on nodejs-mobile that has a generator function using the const generator = async function * () { syntax, and this causes nodejs-mobile to crash with:

/Users/User/Library/Developer/CoreSimulator/Devices/F7B46EA3-1AE3-4DF2-B02E-81A54CDDC694/data/Containers/Bundle/Application/22D1AE3D-83D9-4EE1-B163-8339EBA98C41/APP.app/nodejs-project/node_modules/ipld/src/index.js:88
    const generator = async function * () {
                                       ^^

SyntaxError: Syntax error
   at Script (vm.js:87:7)
   at createScript (vm.js:251:3)
   at runInThisContext (vm.js:303:3)
   at Module.prototype._compile (internal/modules/cjs/loader.js:656:3)
   at Module._extensions[.js] (internal/modules/cjs/loader.js:699:3)
   at Module.prototype.load (internal/modules/cjs/loader.js:598:3)
   at tryModuleLoad (internal/modules/cjs/loader.js:537:5)
   at Module._load (internal/modules/cjs/loader.js:529:3)
   at Module.prototype.require (internal/modules/cjs/loader.js:636:3)
   at require (internal/modules/cjs/helpers.js:20:7)

Seems like this type of syntax should be supported so I'm not sure why it throws this error.

jaimecbernardo commented 5 years ago

Hi @arminsal1 ,

nodejs-mobile uses ChakraCore to run on iOS, which doesn't have an "async generator" implementation yet, at the time of this response:

That's likely why the syntax is not working on iOS.

arminsal1 commented 5 years ago

@jaimecbernardo Thanks for the response! I found a PR that seems to add the missing functionality: https://github.com/microsoft/ChakraCore/pull/5834

I want to try implementing the changes in this PR manually but I can't find the corresponding files in my nodejs-mobile-react-native folder. You know where I should look?

rhuanjl commented 5 years ago

@arminsal1 just saw your mention of my CC PR it does indeed add this functionality - though as an experimental feature.

Note I've never used node mobile but roughly I think to build it with chakra core master and my PR for this feature enabled you'll need to do something like:

  1. checkout this repository
  2. cd to the deps/chakrashim folder
  3. overwrite the contents of the folder called "core" with a checkout of the chakracore branch from my PR
  4. you'll also need to flip the flag to enable the feature you can do this either by: a) adding a compile flag of ES2018AsyncIteration when building chakracore (not sure how the node-mobile build system works or where you'd need to add the flag) OR b) edit the file ConfigFlagLists.h within chakracore to set DEFAULT_CONFIG_ES2018AsyncIteration to true instead of false
  5. build (with whatever the normal instructions for building node-mobile are)

DISCLAIMER: I'm a random open source contributor on the internet - I wrote the async iteration implementation for chakracore as a fun project over a few weekends I can't offer any guarantees on how it will work beyond that it seems correct in the tests I've done.

jaimecbernardo commented 5 years ago

Hi @arminsal1 ,

nodejs-mobile-react-native uses the already compiled framework from this repo. Here's the build instructions: https://github.com/janeasystems/nodejs-mobile/tree/2101f2096d59d2a081f64da2f10fd7385222ac8a#building-the-ios-framework-library-on-macos

Thanks for the tips, @rhuanjl . Regarding deps/chakrashim/core, the changes from the PR would have to be applied on top of it. Overwritting wouldn't work since that'd overwrite the changes needed for ChakraCore to work on iOS.

arminsal1 commented 5 years ago

@rhuanjl @jaimecbernardo Thanks to both of you for replying and helping. :) I'm in the process of translating the Chakra Core PR to Nodejs-Mobile. Do I need to apply the changes made to files like lib/Runtime/Library/InJavascript/Intl.js.nojit.bc.32b.h? Nodejs-Mobile's bytecode is very different from Chakra Core's and I have no experience with that kind of code

rhuanjl commented 5 years ago

@arminsal1 your best bet would be to try and do a full git merge of the version of chakracore in deps/chakrashim/core with the version from my PR's branch.

My PR is aimed at CC's master branch whereas nodejs-mobile uses a release of CC from a few months back - the master branch has moved a long way since the last release and there will be loads of differences, trying to do it a file at a time will be messy and likely to go wrong.

As a side note on the bytecode files they are certainly required to be updated I know the diffs on those are huge; there are certain edits that can be made in CC (e.g. whenever support is added for a new keyword or a new operator) that cause those files to need a total re-write - they're tool generated not done by hand.

arminsal1 commented 5 years ago

@jaimecbernardo @rhuanjl Just merged the CC PR into the NodeJS-Mobile deps/chakrashim/core folder. There were a lot of merge conflicts and I don't understand either set of code enough to go through each commit, so I applied the CC PR's version for all of the conflicts. Tried building the framework based on NodeJS-Mobile's repo instructions and it failed, and I unfortunately don't understand the error.

Here are the command line and CMake logs:

Command Line

```c# WARNING: --openssl-no-asm will result in binaries that do not take advantage of modern CPU cryptographic instructions and will therefore be slower. Please refer to BUILDING.md creating icu_config.gypi { 'target_defaults': { 'cflags': [], 'default_configuration': 'Release', 'defines': [], 'include_dirs': [], 'libraries': []}, 'variables': { 'OS': 'ios', 'asan': 0, 'build_v8_with_gn': 'false', 'chakra_disable_jit': 'true', 'chakracore_build_config': 'Release', 'chakracore_lto_build_flags': [], 'chakracore_parallel_build_flags': [], 'chakracore_use_lto': 'false', 'coverage': 'false', 'debug_nghttp2': 'false', 'enable_lto': 'false', 'enable_pgo_generate': 'false', 'enable_pgo_use': 'false', 'force_dynamic_crt': 0, 'host_arch': 'x64', 'icu_small': 'false', 'llvm_version': '0', 'node_byteorder': 'little', 'node_debug_lib': 'false', 'node_enable_d8': 'false', 'node_enable_v8_vtunejit': 'false', 'node_engine': 'chakracore', 'node_install_npm': 'true', 'node_module_version': 64, 'node_no_browser_globals': 'false', 'node_prefix': '/usr/local', 'node_release_urlbase': '', 'node_shared': 'false', 'node_shared_cares': 'false', 'node_shared_http_parser': 'false', 'node_shared_libuv': 'false', 'node_shared_nghttp2': 'false', 'node_shared_openssl': 'false', 'node_shared_zlib': 'false', 'node_tag': '', 'node_target_type': 'static_library', 'node_use_bundled_v8': 'false', 'node_use_dtrace': 'false', 'node_use_etw': 'false', 'node_use_openssl': 'true', 'node_use_pch': 'false', 'node_use_perfctr': 'false', 'node_use_v8_platform': 'true', 'node_with_ltcg': 'false', 'node_without_node_options': 'false', 'openssl_fips': '', 'openssl_no_asm': 1, 'shlib_suffix': '64.dylib', 'target_arch': 'arm64', 'v8_enable_gdbjit': 0, 'v8_enable_i18n_support': 0, 'v8_enable_inspector': 0, 'v8_no_strict_aliasing': 1, 'v8_optimized_debug': 0, 'v8_promise_internal_field_count': 1, 'v8_random_seed': 0, 'v8_trace_maps': 0, 'v8_typed_array_max_size_in_heap': 0, 'v8_use_snapshot': 'true', 'want_separate_host_toolset': 1}} creating config.gypi creating config.status creating config.mk running: python tools/gyp_node.py --no-parallel -f make-ios /Applications/Xcode.app/Contents/Developer/usr/bin/make -C out BUILDTYPE=Release V=1 LD_LIBRARY_PATH=/Users/Armin/Downloads/backup/nodejs-mobile/out/Release/lib.host:/Users/Armin/Downloads/backup/nodejs-mobile/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/chakrashim; mkdir -p /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/../../deps/chakrashim/core/out/Release/lib; bash core/build.sh "--without=Simdjs" --static --no-jit "--target=ios" "--arch=arm64" -v --no-icu --libs-only ln -f "../deps/chakrashim/core/lib/Common/ChakraCoreVersion.h" "../deps/chakrashim/include/ChakraCoreVersion.h" 2>/dev/null || (rm -rf "../deps/chakrashim/include/ChakraCoreVersion.h" && cp -af "../deps/chakrashim/core/lib/Common/ChakraCoreVersion.h" "../deps/chakrashim/include/ChakraCoreVersion.h") ln -f "../deps/chakrashim/core/lib/Jsrt/ChakraCore.h" "../deps/chakrashim/include/ChakraCore.h" 2>/dev/null || (rm -rf "../deps/chakrashim/include/ChakraCore.h" && cp -af "../deps/chakrashim/core/lib/Jsrt/ChakraCore.h" "../deps/chakrashim/include/ChakraCore.h") ln -f "../deps/chakrashim/core/lib/Jsrt/ChakraCommon.h" "../deps/chakrashim/include/ChakraCommon.h" 2>/dev/null || (rm -rf "../deps/chakrashim/include/ChakraCommon.h" && cp -af "../deps/chakrashim/core/lib/Jsrt/ChakraCommon.h" "../deps/chakrashim/include/ChakraCommon.h") ln -f "../deps/chakrashim/core/lib/Jsrt/ChakraCommonWindows.h" "../deps/chakrashim/include/ChakraCommonWindows.h" 2>/dev/null || (rm -rf "../deps/chakrashim/include/ChakraCommonWindows.h" && cp -af "../deps/chakrashim/core/lib/Jsrt/ChakraCommonWindows.h" "../deps/chakrashim/include/ChakraCommonWindows.h") ln -f "../deps/chakrashim/core/lib/Jsrt/ChakraDebug.h" "../deps/chakrashim/include/ChakraDebug.h" 2>/dev/null || (rm -rf "../deps/chakrashim/include/ChakraDebug.h" && cp -af "../deps/chakrashim/core/lib/Jsrt/ChakraDebug.h" "../deps/chakrashim/include/ChakraDebug.h") LD_LIBRARY_PATH=/Users/Armin/Downloads/backup/nodejs-mobile/out/Release/lib.host:/Users/Armin/Downloads/backup/nodejs-mobile/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/chakrashim; mkdir -p /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj/gen; python ./../../tools/js2c.py "--namespace=jsrt" "/Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj/gen/chakra_natives.h" lib/chakra_shim.js lib/chakra_inspector.js cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/adler32.o ../deps/zlib/adler32.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/adler32.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/compress.o ../deps/zlib/compress.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/compress.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/crc32.o ../deps/zlib/crc32.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/crc32.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/deflate.o ../deps/zlib/deflate.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/deflate.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/gzclose.o ../deps/zlib/gzclose.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/gzclose.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/gzlib.o ../deps/zlib/gzlib.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/gzlib.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/gzread.o ../deps/zlib/gzread.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/gzread.o.d.raw -c Printing command line options back to the user: _CXX= _CC= BUILD_TYPE=Release MULTICORE_BUILD= CMAKE_ICU=-DNO_ICU_SH=1 CMAKE_GEN= MAKE=make VERBOSE=1 cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/gzwrite.o ../deps/zlib/gzwrite.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/gzwrite.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/infback.o ../deps/zlib/infback.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/infback.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/inffast.o ../deps/zlib/inffast.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/inffast.o.d.raw -c ./../../tools/js2c.py:401: SyntaxWarning: name 'TEMPLATE' is used prior to global declaration global TEMPLATE Build path: /Users/Armin/Downloads/backup/nodejs-mobile/deps/chakrashim/core/out/Release cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/inflate.o ../deps/zlib/inflate.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/inflate.o.d.raw -c -- /Users/Armin/Downloads/backup/nodejs-mobile/deps/chakrashim/core/bin/ch/DbgController.js.h is created Compile Target : arm Generating Release makefiles cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/inftrees.o ../deps/zlib/inftrees.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/inftrees.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/trees.o ../deps/zlib/trees.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/trees.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/uncompr.o ../deps/zlib/uncompr.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/uncompr.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/zutil.o ../deps/zlib/zutil.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DZ_HAVE_UNISTD_H' '-DHAVE_HIDDEN' '-DUSE_FILE32API' -I../deps/zlib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/zlib/deps/zlib/zutil.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o ../deps/http_parser/http_parser.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-DHTTP_PARSER_STRICT=0' '-DNDEBUG' -I../deps/http_parser -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_android.o ../deps/cares/src/ares_android.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_android.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o ../deps/cares/src/ares_cancel.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_cancel.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares__close_sockets.o ../deps/cares/src/ares__close_sockets.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares__close_sockets.o.d.raw -c -- The C compiler identification is AppleClang 10.0.1.10010046 cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_create_query.o ../deps/cares/src/ares_create_query.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_create_query.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_data.o ../deps/cares/src/ares_data.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_data.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_destroy.o ../deps/cares/src/ares_destroy.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_destroy.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_expand_name.o ../deps/cares/src/ares_expand_name.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_expand_name.o.d.raw -c -- The CXX compiler identification is AppleClang 10.0.1.10010046 cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_expand_string.o ../deps/cares/src/ares_expand_string.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_expand_string.o.d.raw -c -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_fds.o ../deps/cares/src/ares_fds.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_fds.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_free_hostent.o ../deps/cares/src/ares_free_hostent.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_free_hostent.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_free_string.o ../deps/cares/src/ares_free_string.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_free_string.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_gethostbyaddr.o ../deps/cares/src/ares_gethostbyaddr.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_gethostbyaddr.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_gethostbyname.o ../deps/cares/src/ares_gethostbyname.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_gethostbyname.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares__get_hostent.o ../deps/cares/src/ares__get_hostent.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares__get_hostent.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_getnameinfo.o ../deps/cares/src/ares_getnameinfo.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_getnameinfo.o.d.raw -c cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_getopt.o ../deps/cares/src/ares_getopt.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_getopt.o.d.raw -c -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- broken CMake Error at /usr/local/Cellar/cmake/3.14.4/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc" is not able to compile a simple test program. It fails with the following output: Change Dir: /Users/Armin/Downloads/backup/nodejs-mobile/deps/chakrashim/core/out/Release/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/make cmTC_5ae19/fast /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_5ae19.dir/build.make CMakeFiles/cmTC_5ae19.dir/build Building C object CMakeFiles/cmTC_5ae19.dir/testCCompiler.c.o /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -o CMakeFiles/cmTC_5ae19.dir/testCCompiler.c.o -c /Users/Armin/Downloads/backup/nodejs-mobile/deps/chakrashim/core/out/Release/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_5ae19 /usr/local/Cellar/cmake/3.14.4/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5ae19.dir/link.txt --verbose=1 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_5ae19.dir/testCCompiler.c.o -o cmTC_5ae19 ld: warning: URGENT: -ios_version_min is invalid for architecture x86/x86_64, inferring -ios_simulator_version_min. This will be an error in the future. ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/lib/libSystem.tbd (4 slices) ld: dynamic main executables must link with libSystem.dylib for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [cmTC_5ae19] Error 1 make[2]: *** [cmTC_5ae19/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project) -- Configuring incomplete, errors occurred! See also "/Users/Armin/Downloads/backup/nodejs-mobile/deps/chakrashim/core/out/Release/CMakeFiles/CMakeOutput.log". See also "/Users/Armin/Downloads/backup/nodejs-mobile/deps/chakrashim/core/out/Release/CMakeFiles/CMakeError.log". cc -o /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_getsock.o ../deps/cares/src/ares_getsock.c '-DNODE_ENGINE="chakracore"' '-DNODE_ENGINE_CHAKRACORE' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DCARES_STATICLIB' '-DHAVE_CONFIG_H' -I../deps/cares/include -I../deps/cares/src -I../deps/cares/config/darwin -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Os -gdwarf-2 -miphoneos-version-min=9.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-strict-aliasing -fembed-bitcode -MMD -MF /Users/Armin/Downloads/backup/nodejs-mobile/out/Release/.deps//Users/Armin/Downloads/backup/nodejs-mobile/out/Release/obj.target/cares/deps/cares/src/ares_getsock.o.d.raw -c make[2]: *** No targets specified and no makefile found. Stop. See error details above. Exit code was 2 make[1]: *** [/Users/Armin/Downloads/backup/nodejs-mobile/out/Release/../../deps/chakrashim/core/out/Release/lib/libChakraCoreStatic.a] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [node] Error 2 ```

CMakeError.log CMakeOutput.log

rhuanjl commented 5 years ago

The actual errors you're getting imply your build system is setup wrong - it says it can't find the compiler, do you have the right version Xcode installed and have you run the config script from this repository?

Beyond that I can't really help with building an iOS version of CC as I've never done iOS development.

If you can sort out the build system then if there are any specific merge conflicts you want help with I could advise.

Perhaps you should try and get it building with just the version from the repository first to ensure you can get the build system right then bring in the changes?

arminsal1 commented 5 years ago

@rhuanjl I appreciate that you've been helping at all, thank you. :) I tried building in an unaltered clone of the nodejs-mobile repo and it built successfully, so it seems to be an issue with the merge.

jaimecbernardo commented 5 years ago

Hi @arminsal1 , From the log messages you posted, it looks like the build flags set are trying to compile x86/x86_64 binaries for iOS devices, which is not possible:

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc   -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTC_5ae19.dir/testCCompiler.c.o  -o cmTC_5ae19 
    ld: warning: URGENT: -ios_version_min is invalid for architecture x86/x86_64, inferring -ios_simulator_version_min. This will be an error in the future.
    ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/lib/libSystem.tbd (4 slices)
    ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
arminsal1 commented 5 years ago

@jaimecbernardo The merge must have overwritten the iOS compatibility changes you made. I think my manual changes should integrate cleanly if I can get the correct bytecode. Do you know how to regenerate bytecode in the files like deps/chakrashim/core/lib/Runtime/Library/InJavascript/Intl.js.nojit.bc.32b.h?

rhuanjl commented 5 years ago

The bytecode files are generated by this script: https://github.com/microsoft/ChakraCore/blob/master/RegenAllByteCode.cmd

Unfortunately the script will only run in a Windows developer command prompt, there is currently no way to generate the bytecode on macOS or Linux.

BUT - if you've implemented all of the changes from my branch you should just bring in the bytecode files from my branch there shouldn't be anything iOS specific about them.

However I want to add more caution to the whole idea of manually bringing in the changes - the version of chakracore included in this repository is based on the release branch which is currently 1039 commits behind the master branch. My PR is targeted at master and relies on some of the other changes in master, if you've just manually brought stuff in from my PR's diff I doubt it will build.

For reference here's a diff between my async iteration branch and the release branch: https://github.com/microsoft/ChakraCore/compare/release/1.11...rhuanjl:asyncIteration?expand=1

As a side note I believe that the CC team are planning a new release that will catch the release branch up to master sometime this year but I don't know when (there are several new features and optimisations in master that aren't in release yet) - I'm a semi-regular external contributor to CC but I obviously don't have access to their internal plans like their release schedule.

EDIT; alternative advice: Maybe try doing a diff between Chakracore for iOS (as per the deps/chakrashim/core folder in this repository) and Chakracore release1.11 from the CC repository then try applying that diff as a patch against my branch - that should hopefully give you a whole let less issues to look at

export-mike commented 5 years ago

I've personally setup to use babel, compile from async await to regeneratorRuntime and output to the nodejs-assets/nodejs-project directory.