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

Cannot build on windows #14337

Closed
kylelamse opened this issue Jul 18, 2017 · 10 comments
Closed

Cannot build on windows #14337

kylelamse opened this issue Jul 18, 2017 · 10 comments
Labels
build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform.

Comments

@kylelamse
Copy link

  • Version: latest
  • Platform: Windows 10 x64
  • Subsystem: build

I am trying to build node on Windows. I installed the prereqs but am getting an error when running the build script:

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.0.26430.16
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Found MSVS version 15.0
C:\Python27\python.exe configure  --dest-cpu=x64 --tag=
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',
                 'node_byteorder': 'little',
                 'node_enable_d8': 'false',
                 'node_enable_v8_vtunejit': 'false',
                 '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': '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.56',
                 '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_use_snapshot': 'false',
                 'want_separate_host_toolset': 0,
                 'want_separate_host_toolset_mkpeephole': 0}}
creating config.gypi
creating config.mk
Warning: Missing input files:
deps\v8\src\..\..\include\v8-inspector-protocol.h
deps\v8\src\..\..\include\v8-inspector.h
src\tracing\trace_event.hsrc\tree.h
Project files generated.
  gtest.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\gtest.lib
  http_parser.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\http_parser.lib
  libuv.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\libuv.lib
  cares.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\cares.lib
  node_js2c
  openssl.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\openssl.lib
  v8_libbase.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\v8_libbase.lib
  v8_libplatform.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\v8_libplatform.lib
  v8_libsampler.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\v8_libsampler.lib
  zlib.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\zlib.lib
  openssl-cli.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\\openssl-cli.exe
  openssl-cli.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\openssl-cli.pdb (Full PDB)
  icuucx.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\icuucx.lib
  icutools.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\icutools.lib
  icustubdata.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\icustubdata.lib
  icui18n.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\icui18n.lib
  v8_nosnapshot.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\lib\v8_nosnapshot.lib
  icupkg.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\\icupkg.exe
  icupkg.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\icupkg.pdb (Full PDB)
  genccode.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\\genccode.exe
  genccode.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\genccode.pdb (Full PDB)
  iculslocs.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\\iculslocs.exe
  iculslocs.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\iculslocs.pdb (Full PDB)
  genrb.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\\genrb.exe
  genrb.vcxproj -> C:\Users\Kyle Lamse\Code\node\Release\genrb.pdb (Full PDB)
  icutrim
  'C:\Users\Kyle\icupkg' is not recognized as an internal or external command,
  operable program or batch file.
  Options: {'verbose': 1, 'filterfile': 'icu_small.json', 'toolpath': 'C:\\Users\\Kyle', 'deltmpdir': 1, 'outfile': 'icudt59l.dat', 'datfile': '..\\..\\deps\\icu-small\\source\\data\\in\\icudt59l.dat', 'locales': 'en,root', 'endian': 'little', 'tmpdir': 'C:\\Users\\Kyle'}
  icu_small.json: icutrim.py config: Trim down ICU to just a certain locale set, needed for node.js use.
  FAILED: C:\Users\Kyle\icupkg -tl ..\..\deps\icu-small\source\data\in\icudt59l.dat C:\Users\Kyle\icudt59l.dat
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\Users\Kyle Lamse\Code\node\tools\icu\icudata.vcxproj]

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Jul 18, 2017

I see some paths are C:\Users\Kyle[...] and some are C:\Users\Kyle Lamse[...] Is it the space in the user name and user profile dir that causes the error?

cc @nodejs/platform-windows, @nodejs/build

@vsemozhetbyt
Copy link
Contributor

Could you try to build from a folder without a space in the path?

@vsemozhetbyt
Copy link
Contributor

If the diagnosis is right and we cannot fix it, can we document it in the BUILDING.md as a known limitation?

@vsemozhetbyt vsemozhetbyt added build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform. labels Jul 18, 2017
@kylelamse
Copy link
Author

I am trying. If this is indeed the case I will submit a PR to update BUILDING.md

kylelamse pushed a commit to kylelamse/node that referenced this issue Jul 18, 2017
@kylelamse
Copy link
Author

@vsemozhetbyt I am trying to figure out how to fix the root of the issue. I have tracked it down. It only applies to Windows users that use msbuild to build it. When opening the node.sln in visual studio and running the build from there, tools/icu/icudata fails when there is a space in the path. One solution to this is changing your home directory to have no spaces, but in order to do that, you have to create a new user that has no spaces in the name because you can't just change the user home folder name in Windows unforunately.

Do you have access to a Windows PC to build the project with msbuild? If you create an account with spaces, try to tools/icu/icudata in msbuild or visual studio, it freaks out and ends the build process.

@kylelamse
Copy link
Author

Another thing to note: running msbuild in the console runs the python file icutrim.py and tries to make a temp directory in these lines (line 93/94)

if not (os.path.isdir(options.tmpdir)):
    os.mkdir(options.tmpdir)

I was trying to find a way to see where the options and path name is set, but I'm struggling to trace back where all that gets propagated.

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Jul 19, 2017

@kylelamse Yes, I was told several times that a space in the path to building directory makes the building fail and I've checked this condition. Fortunately, you can place the folder with source anywhere outside your home directory, where the path would have no spaces.

cc @nodejs/build re data mentioned in the previous two comments.

@refack
Copy link
Contributor

refack commented Jul 19, 2017

Ref: #12084

@refack
Copy link
Contributor

refack commented Jul 19, 2017

Patching icutrim.py needs to happen upstream at http://site.icu-project.org/, but I was considering pre-trimming and committing the tool's output into our tree so it won't have to run on each build, just when ICU is updated, and vendored in.
Ref: #12218

@bzoz
Copy link
Contributor

bzoz commented Jul 20, 2017

I'm gonna close this, since it is a duplicate of #12084

@bzoz bzoz marked this as a duplicate of #12084 Jul 20, 2017
@bzoz bzoz closed this as completed Jul 20, 2017
jasnell pushed a commit that referenced this issue Aug 24, 2017
PR-URL: #14354
Fixes: #14337
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax pushed a commit to addaleax/ayo that referenced this issue Aug 25, 2017
PR-URL: nodejs/node#14354
Fixes: nodejs/node#14337
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax pushed a commit to ayojs/ayo that referenced this issue Aug 28, 2017
PR-URL: nodejs/node#14354
Fixes: nodejs/node#14337
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 10, 2017
PR-URL: #14354
Fixes: #14337
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 12, 2017
PR-URL: #14354
Fixes: #14337
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 20, 2017
PR-URL: #14354
Fixes: #14337
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants