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

Installation for Windows not working or outdated. #778

Closed
thehenrytsai opened this issue May 21, 2019 · 5 comments
Closed

Installation for Windows not working or outdated. #778

thehenrytsai opened this issue May 21, 2019 · 5 comments
Milestone

Comments

@thehenrytsai
Copy link

thehenrytsai commented May 21, 2019

Getting what seems like a python error, tried on both Python 2.x and 3.x, also installed windows-build-tools via various commands, including npm install -g --production windows-build-tools:

C:\WINDOWS\system32>npm install --global bcoin
C:\Users\hentsai\AppData\Roaming\npm\bwallet -> C:\Users\hentsai\AppData\Roaming\npm\node_modules\bcoin\bin\bwallet
C:\Users\hentsai\AppData\Roaming\npm\bcoin -> C:\Users\hentsai\AppData\Roaming\npm\node_modules\bcoin\bin\bcoin
C:\Users\hentsai\AppData\Roaming\npm\bcoin-spvnode -> C:\Users\hentsai\AppData\Roaming\npm\node_modules\bcoin\bin\spvnode
C:\Users\hentsai\AppData\Roaming\npm\bcoin-node -> C:\Users\hentsai\AppData\Roaming\npm\node_modules\bcoin\bin\node

[email protected] install C:\Users\hentsai\AppData\Roaming\npm\node_modules\bcoin\node_modules\mrmr
node-gyp rebuild || echo 'Build failed.'

C:\Users\hentsai\AppData\Roaming\npm\node_modules\bcoin\node_modules\mrmr>if not defined npm_config_node_gyp (node "C:\Users\hentsai\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\hentsai\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
File "", line 1
'from
^
SyntaxError: EOL while scanning string literal
gyp: Call to 'python -c 'from future import print_function; import sys; print(sys.byteorder)'' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\hentsai\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\hentsai\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\hentsai\AppData\Roaming\npm\node_modules\bcoin\node_modules\mrmr
gyp ERR! node -v v10.14.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
'Build failed.'

@tynes
Copy link
Member

tynes commented May 21, 2019

bcoin should work on Windows, this seems like an issue with Python.

The error SyntaxError: EOL while scanning string literal seems to indicate that a string never terminates.

Could the problem be based on nesting a string in a string using ' for both strings? Maybe Windows is interpreting things differently than Linux/OSX.

@thehenrytsai
Copy link
Author

Dug in a little further, looks like this happens when building dependency node_modules\mrmr and it throws on the following in its binding.gyp:

  "variables": {
    "mrmr_byteorder%":
      "<!(python -c 'from __future__ import print_function; import sys; print(sys.byteorder)')",
  },

@tuxcanfly
Copy link
Member

Indeed, the issue is that the single quotes don't seem to be parsed as expected in Windows.

I have found that escaping the double quotes works in both Linux and Windows:

"<!(python -c \"from __future__ import print_function; import sys; print(sys.byteorder)\")"

I would like to find a better way or confirm if this is the best we can do before opening PRs (there are other dependencies which have the same issue).

@braydonf
Copy link
Contributor

This is linked to #803

@braydonf braydonf added this to the v2.0.0 milestone Feb 13, 2020
@braydonf
Copy link
Contributor

braydonf commented Mar 5, 2020

Closed in #946

@braydonf braydonf closed this as completed Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants