Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate non-Latin-1 build file path on Windows #18560

Closed
seishun opened this issue Feb 4, 2018 · 4 comments
Closed

Investigate non-Latin-1 build file path on Windows #18560

seishun opened this issue Feb 4, 2018 · 4 comments
Labels
build Issues and PRs related to build files or the CI. gyp Issues and PRs related to the GYP tool and .gyp build files windows Issues and PRs related to the Windows platform.

Comments

@seishun
Copy link
Contributor

seishun commented Feb 4, 2018

  • Version: master
  • Platform: Windows
  • Subsystem: build

#17077 covers the case where the path to the node directory contains non-ASCII characters, but no non-Latin-1 characters. If the path contains non-Latin-1 characters, the build fails earlier:

C:\Users\Nikolai\ウィンドー\node>vcbuild
Looking for Visual Studio 2017
calling: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.5.5
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Found MSVS version 15.0
"C:\Python27\python.exe" configure  --dest-cpu=x64
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_http2': 'false',
                 'debug_nghttp2': 'false',
                 'force_dynamic_crt': 0,
                 'host_arch': 'x64',
                 'icu_data_in': '..\\..\\deps/icu-small\\source/data/in\\icudt60l.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': '60',
                 'node_byteorder': 'little',
                 'node_enable_d8': 'false',
                 'node_enable_v8_vtunejit': 'false',
                 'node_install_npm': 'true',
                 'node_module_version': 61,
                 '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': 'executable',
                 'node_use_bundled_v8': 'true',
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'true',
                 'node_use_lttng': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'true',
                 'node_use_v8_platform': 'true',
                 'node_without_node_options': 'false',
                 'openssl_fips': '',
                 'openssl_no_asm': 0,
                 'shlib_suffix': 'so.61',
                 'target_arch': 'x64',
                 '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_trace_maps': 0,
                 'v8_typed_array_max_size_in_heap': 0,
                 'v8_use_snapshot': 'true',
                 'want_separate_host_toolset': 0}}
creating config.gypi
creating config.mk
Traceback (most recent call last):
  File "configure", line 1526, 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\msvs.py", line 2066, in GenerateOutput
    version=msvs_version)
  File "tools\gyp\pylib\gyp\MSVSNew.py", line 213, in __init__
    self.Write()
  File "tools\gyp\pylib\gyp\MSVSNew.py", line 340, in Write
    f.close()
  File "tools\gyp\pylib\gyp\common.py", line 396, in close
    os.unlink(self.tmp_path)
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\Users\\Nikolai\\?????\\node\\deps\\v8\\src\\v8.sln.gyp.jiq7pg.tmp'
Failed to create vc project files.
@seishun seishun added windows Issues and PRs related to the Windows platform. build Issues and PRs related to build files or the CI. labels Feb 4, 2018
@seishun
Copy link
Contributor Author

seishun commented Feb 5, 2018

This is Yet Another Gyp Bug.

  1. vcbuild.bat calls python configure --dest-cpu=x64.
  2. configure calls run_gyp(['--no-parallel', '-f', 'msvs', '-G', 'msvs_version=auto']).
  3. tools/node_gyp.py calls gyp.main(['--no-parallel', '-f', 'msvs', '-G', 'msvs_version=auto', '.\\node.gyp', '-I', '.\\common.gypi', '-I', '.\\config.gypi', '--depth=.', '-Dcomponent=static_library', '-Dlibrary=static_library', '-Dlinux_use_bundled_binutils=0', '-Dlinux_use_bundled_gold=0', '-Dlinux_use_gold_flags=0']).
  4. GYP explodes.

(pasting the arguments to show that configure and node_gyp.py are working correctly)

Our options:

  1. Work around this GYP bug somehow. (not sure if possible)
  2. Get the GYP bug fixed. (is Google still maintaining it?)
  3. Move to a better supported build system. (ref RFC: Bazel for build system TSC#464).

cc @nodejs/collaborators

@Trott
Copy link
Member

Trott commented Aug 11, 2019

@refack Will GYP3 solve this problem?

@BridgeAR
Copy link
Member

BridgeAR commented Jan 2, 2020

@nodejs/platform-windows @nodejs/build-files @nodejs/gyp PTAL

@BridgeAR BridgeAR added the gyp Issues and PRs related to the GYP tool and .gyp build files label Jan 2, 2020
@jasnell
Copy link
Member

jasnell commented Jun 25, 2020

There's been no further activity on this. Closing, but given that it's not fully resolved, I'm putting this on the Futures project board so it does not get lost.

@jasnell jasnell closed this as completed Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. gyp Issues and PRs related to the GYP tool and .gyp build files windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

4 participants