Repository navigation
Cannot build on windows #14337
Copy link
Copy link
Closed
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
- 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]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Activity
vsemozhetbyt commentedon Jul 18, 2017
I see some paths are
C:\Users\Kyle[...]and some areC:\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 commentedon Jul 18, 2017
Could you try to build from a folder without a space in the path?
vsemozhetbyt commentedon Jul 18, 2017
If the diagnosis is right and we cannot fix it, can we document it in the
BUILDING.mdas a known limitation?kylelamse commentedon Jul 18, 2017
I am trying. If this is indeed the case I will submit a PR to update BUILDING.md
doc: add note for Windows build path
kylelamse commentedon Jul 19, 2017
@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
msbuildto build it. When opening thenode.slnin visual studio and running the build from there,tools/icu/icudatafails 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/icudatain msbuild or visual studio, it freaks out and ends the build process.kylelamse commentedon Jul 19, 2017
Another thing to note: running msbuild in the console runs the python file
icutrim.pyand tries to make a temp directory in these lines (line 93/94)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 commentedon 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 commentedon Jul 19, 2017
Ref: #12084
refack commentedon Jul 19, 2017
Patching
icutrim.pyneeds 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 commentedon Jul 20, 2017
I'm gonna close this, since it is a duplicate of #12084
doc: add note for Windows build path
doc: add note for Windows build path
doc: add note for Windows build path
doc: add note for Windows build path
doc: add note for Windows build path
doc: add note for Windows build path