Repository navigation
Error when building on Windows with Python install dir having space in path #4840
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
This is the first time I tried to build node from source, when I try to run vcbuild I get this log:
Looking for Visual Studio 2015
Found Visual Studio 2015
configure --dest-cpu=x86 --tag=
ctrpp not found in WinSDK path--using pre-gen files from tools/msvs/genfiles.
creating icu_config.gypi
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': []},
'variables': { 'asan': 0,
'host_arch': 'x64',
'icu_small': 'false',
'node_byteorder': 'little',
'node_enable_v8_vtunejit': 'false',
'node_install_npm': 'true',
'node_prefix': '/usr/local',
'node_release_urlbase': '',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'node_shared_openssl': 'false',
'node_shared_zlib': 'false',
'node_tag': '',
'node_use_dtrace': 'false',
'node_use_etw': 'true',
'node_use_lttng': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'true',
'openssl_fips': '',
'openssl_no_asm': 0,
'python': 'C:\\Program Files\\Python\\2.7\\python.exe',
'target_arch': 'ia32',
'v8_enable_gdbjit': 0,
'v8_enable_i18n_support': 0,
'v8_no_strict_aliasing': 1,
'v8_optimized_debug': 0,
'v8_random_seed': 0,
'v8_use_snapshot': 'true',
'want_separate_host_toolset': 1}}
creating config.gypi
creating config.mk
Project files generated.
gtest.vcxproj -> C:\Users\felix\git\opensource\node\Release\lib\gtest.lib
cares.vcxproj -> C:\Users\felix\git\opensource\node\Release\lib\cares.lib
http_parser.vcxproj -> C:\Users\felix\git\opensource\node\Release\lib\http_parser.lib
libuv.vcxproj -> C:\Users\felix\git\opensource\node\Release\lib\libuv.lib
node_js2c
Command "C:\Program" not found
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\Users\felix\git\opensource\node\node_js2c.vcxproj]
v8_base_0.vcxproj -> ..\..\..\..\build\Release\lib\v8_base_0.lib
v8_base_2.vcxproj -> ..\..\..\..\build\Release\lib\v8_base_2.lib
v8_base_1.vcxproj -> ..\..\..\..\build\Release\lib\v8_base_1.lib
v8_libplatform.vcxproj -> ..\..\..\..\build\Release\lib\v8_libplatform.lib
v8_libbase.vcxproj -> ..\..\..\..\build\Release\lib\v8_libbase.lib
zlib.vcxproj -> C:\Users\felix\git\opensource\node\Release\lib\zlib.lib
v8_base_3.vcxproj -> ..\..\..\..\build\Release\lib\v8_base_3.lib
openssl.vcxproj -> C:\Users\felix\git\opensource\node\Release\lib\openssl.lib
See the line "C:\Progam" not found, it seems like something from C:\Program Files is run but the path is not quoted. I looked at the bat I could not find what is causing this. I don't get any node.exe output. I am using Visual Studio 2015 Update 1 on Windows 10 64 bit.
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
r-52 commentedon Jan 24, 2016
cc @nodejs/platform-windows
seishun commentedon Jan 24, 2016
It seems you have Python installed in
C:\Program Files. I guess this line needs quotes.felixfbecker commentedon Jan 24, 2016
@seishun Yeah. All my programs are installed in Program Files.
felixfbecker commentedon Jan 24, 2016
But it's also in the PATH
seishun commentedon Jan 24, 2016
Could you try adding quotes in the line I linked? It should look like
'"<(python)"',.seishun commentedon Jan 24, 2016
This one:
node/node.gyp
Line 528 in 3e2a2e6
benjamingr commentedon Jan 24, 2016
@felixfbecker in your PATH, see this guide for setting up path variables.
Basically, it's looking for Python in
C:\ProgrambecauseProgram Filescontains a space. You need to quote that.This has not been a problem before since Python defaults to install in
C:\Python27.seishun commentedon Jan 24, 2016
@benjamingr you don't need quotes in PATH, and according to his build output his Python installation is found just fine.
felixfbecker commentedon Jan 24, 2016
@benjamingr I know how to setup path, thanks :)
@seishun That fixed it. Should I do a PR?
seishun commentedon Jan 24, 2016
@felixfbecker I think so. But it makes me wonder why GYP isn't doing its job properly by escaping the path on its own.
felixfbecker commentedon Jan 24, 2016
@benjamingr I dislike programs that install to
C:\. It is the equivalent of installing Linux programs in the root path. You wouldnt install python to/python-27, would you? :Dsilverwind commentedon Jan 24, 2016
This issue has come up a few times now. Can we possibly fix it by quoting that path somewhere?
felixfbecker commentedon Jan 24, 2016
@silverwind I opened #4841
[-]Error when building on Windows[/-][+]Error when building on Windows with Python install dir having space in path[/+]benjamingr commentedon Jan 24, 2016
@felixfbecker well,
Program Filesisn't much better IMO :D I was only addressing why this isn't broken for most users though, what you're asking for is legit.felixfbecker commentedon Jan 24, 2016
@benjamingr
Program Filesis where you install programs (for all users) on Windows... like/usr/localon Linux (I think).silverwind commentedon Jan 24, 2016
Closing this issue as it's a dupe of #4012.