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

[Windows] Build Node.js from sources #1457

Closed
ghost opened this issue Aug 26, 2018 · 5 comments
Closed

[Windows] Build Node.js from sources #1457

ghost opened this issue Aug 26, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Aug 26, 2018

  • Node.js Version: git master
  • OS: windows
  • Scope: build
C:\node> call vcbuild.bat

Looking for Python 2.x
Looking for NASM
Looking for Visual Studio 2017
Found MSVS version 15.0
Could Not Find C:\node\.tmp_gyp_configure_stamp
Could Not Find C:\node\.gyp_configure_stamp
configure  --with-pch --dest-cpu=x64
  File "configure", line 1578
    os.chmod('config.status', 0775)
                                 ^
SyntaxError: invalid token

Why does this error occur? Is it a problem with MSVS 15.0?

@addaleax
Copy link
Member

Your default python executable on Windows seems to be Python 3, but at this point Node.js only supports building with Python 2. Usually, there should be a more helpful error message that points this out, but since nodejs/node@074e7f8 (my bad), the 0775 token leads to an early syntax error in Python 3.

addaleax added a commit to addaleax/node that referenced this issue Aug 26, 2018
This un-‘breaks’ the error message we print when using
Python 3 to run `configure`.

Refs: nodejs/help#1457
@refack
Copy link

refack commented Aug 26, 2018

This is a bit strange, since vcbuild.bat tried to validate it's using python2.
@djmangoo could you run the following and post the results:

set DEBUG_HELPER=1
call vcbuild.bat nobuild

@ghost
Copy link
Author

ghost commented Aug 26, 2018

Thanks.

@refack Actually, the problem was that I had messed up my own python binaries. After fixing them, the compiling process was successfull.

I see that Release folder was created after building and no errors occurred. However, now when I launch Release/node.exe it exits immediately. I can't start repl. I also tried Release/node.exe some_file.js but the file is not executed.

addaleax added a commit to nodejs/node that referenced this issue Aug 31, 2018
This un-‘breaks’ the error message we print when using
Python 3 to run `configure`.

Refs: nodejs/help#1457

PR-URL: #22536
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit to nodejs/node that referenced this issue Aug 31, 2018
This un-‘breaks’ the error message we print when using
Python 3 to run `configure`.

Refs: nodejs/help#1457

PR-URL: #22536
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit to nodejs/node that referenced this issue Sep 3, 2018
This un-‘breaks’ the error message we print when using
Python 3 to run `configure`.

Refs: nodejs/help#1457

PR-URL: #22536
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit to nodejs/node that referenced this issue Sep 6, 2018
This un-‘breaks’ the error message we print when using
Python 3 to run `configure`.

Refs: nodejs/help#1457

PR-URL: #22536
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@gireeshpunathil
Copy link
Member

@ghost - is this still outstanding?

@gireeshpunathil
Copy link
Member

inactive, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants