nodejs / node-chakracore

Node.js on ChakraCore :sparkles::turtle::rocket::sparkles:
Other
1.92k stars 340 forks source link

./configure --xcode not working #297

Open tommyZZM opened 7 years ago

tommyZZM commented 7 years ago
creating ./icu_config.gypi
* Using ICU in deps/icu-small
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'asan': 0,
                 'coverage': 'false',
                 'debug_devtools': 'node',
                 'force_dynamic_crt': 0,
                 'host_arch': 'x64',
                 'icu_data_file': 'icudt59l.dat',
                 'icu_data_in': '../../deps/icu-small/source/data/in/icudt59l.dat',
                 'icu_endianness': 'l',
                 'icu_gyp_path': 'tools/icu/icu-generic.gyp',
                 'icu_locales': 'en,root',
                 'icu_path': 'deps/icu-small',
                 'icu_small': 'true',
                 'icu_ver_major': '59',
                 'llvm_version': 0,
                 'node_byteorder': 'little',
                 'node_enable_d8': 'false',
                 'node_enable_v8_vtunejit': 'false',
                 'node_engine': 'chakracore',
                 'node_install_npm': 'true',
                 'node_module_version': 56,
                 '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_openssl': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_use_bundled_v8': 'false',
                 'node_use_dtrace': 'true',
                 'node_use_etw': 'false',
                 'node_use_lttng': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_v8_platform': 'true',
                 'node_without_node_options': 'false',
                 'openssl_fips': '',
                 'openssl_no_asm': 0,
                 'shlib_suffix': '56.dylib',
                 'target_arch': 'x64',
                 'uv_parent_path': '/deps/uv/',
                 'uv_use_dtrace': 'true',
                 'v8_enable_gdbjit': 0,
                 'v8_enable_i18n_support': 1,
                 'v8_enable_inspector': 1,
                 'v8_no_strict_aliasing': 1,
                 'v8_optimized_debug': 0,
                 'v8_promise_internal_field_count': 1,
                 'v8_random_seed': 0,
                 'v8_use_snapshot': 'true',
                 'want_separate_host_toolset': 0,
                 'want_separate_host_toolset_mkpeephole': 0,
                 'xcode_version': '8.1'}}
creating ./config.gypi
creating ./config.mk
Traceback (most recent call last):
  File "./configure", line 1422, in <module>
    run_gyp(gyp_args)
  File "./tools/gyp_node.py", line 53, in run_gyp
    rc = gyp.main(args)
  File "./tools/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "./tools/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "./tools/gyp/pylib/gyp/generator/xcode.py", line 1264, in GenerateOutput
    xct.FrameworksPhase().AddFile(library)
  File "./tools/gyp/pylib/gyp/xcodeproj_file.py", line 1870, in AddFile
    self.AppendBuildFile(pbxbuildfile, path)
  File "./tools/gyp/pylib/gyp/xcodeproj_file.py", line 1851, in AppendBuildFile
    self._AddBuildFileToDicts(pbxbuildfile, path)
  File "./tools/gyp/pylib/gyp/xcodeproj_file.py", line 1841, in _AddBuildFileToDicts
    xcfilelikeelement.Name())
ValueError: Found multiple build files for -framework CoreFoundation
obastemur commented 7 years ago

This is because of ChakraCore's CMake build system. I had started for ChakraCore gyp build for node-chakracore only. However, currently this is not a high priority item. If anyone could contribute ChakraCore gyp build, that would be epic!

bnoordhuis commented 7 years ago

Before someone spends much time on that: I'm porting node's build system to cmake (tree).

obastemur commented 7 years ago

@bnoordhuis sounds great. Any estimate? remaining items I can contribute?

@digitalinfinity time to consider fixing ChakraCore cmake build for Windows ?

digitalinfinity commented 7 years ago

@obastemur perhaps 😄 - @bnoordhuis presumably the intention is to use cmake on both Windows and Linux?

bnoordhuis commented 7 years ago

@digitalinfinity @obastemur Correct, all platforms. I'm aiming for node 9, possibly with cmake and GYP side by side until node 10.

@obastemur I could use help making it work on Windows. My branch is still in flux but any feedback is welcome.

lukaskollmer commented 7 years ago

Any updates on this?

obastemur commented 7 years ago

@lukaskollmer Although this could be done by applying some switches into build scripts, I'm not sure the priority or how ugly it could be.

What I do is; create two xcode projects (ChakraCore build.sh script supports --xcode arg too!) and combine them manually under xcode.