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

npm install fails on master #77

Closed
orweinberger opened this issue Sep 28, 2016 · 3 comments
Closed

npm install fails on master #77

orweinberger opened this issue Sep 28, 2016 · 3 comments

Comments

@orweinberger
Copy link

orweinberger commented Sep 28, 2016

Fetching the current version from the master branch and running npm build on node v4.6.0 fails with 2 errors, 1 related to gyp and 1 related to leveldb (looks like you're trying to fetch a certain branch that doesn't exist anymore):

user@laptop ~/dev/btc/node_modules/bcoin $ npm install
npm ERR! git rev-list -n1 leveldb-1.19: fatal: ambiguous argument 'leveldb-1.19': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 leveldb-1.19: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 leveldb-1.19: 'git <command> [<revision>...] -- [<file>...]'
npm ERR! git rev-list -n1 leveldb-1.19: 
npm WARN optional dep failed, continuing leveldown@git://github.com/Level/leveldown.git#leveldb-1.19
/
> bcoin-native@0.0.5 install /home/user/dev/btc/node_modules/bcoin/node_modules/bcoin-native
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory `/home/user/dev/btc/node_modules/bcoin/node_modules/bcoin-native/build'
  CC(target) Release/obj.target/bcoin-native/src/poly1305-donna/poly1305-donna.o
  CC(target) Release/obj.target/bcoin-native/src/chacha20-simple/chacha20_simple.o
  CC(target) Release/obj.target/bcoin-native/src/scrypt/insecure_memzero.o
  CC(target) Release/obj.target/bcoin-native/src/scrypt/sha256.o
../src/scrypt/sha256.c:97:40: error: ‘restrict’ undeclared here (not in a function)
 SHA256_Transform(uint32_t state[static restrict 8],
                                        ^
../src/scrypt/sha256.c:97:49: error: expected ‘]’ before numeric constant
 SHA256_Transform(uint32_t state[static restrict 8],
                                                 ^
../src/scrypt/sha256.c:98:5: error: expected ‘;’, ‘,’ or ‘)’ before ‘const’
     const uint8_t block[static restrict 64],
     ^
../src/scrypt/sha256.c:162:52: error: ‘restrict’ undeclared here (not in a function)
 SHA256_Pad(SHA256_CTX * ctx, uint32_t tmp32[static restrict 72])
                                                    ^
../src/scrypt/sha256.c:162:61: error: expected ‘]’ before numeric constant
 SHA256_Pad(SHA256_CTX * ctx, uint32_t tmp32[static restrict 72])
                                                             ^
../src/scrypt/sha256.c:216:27: error: ‘restrict’ undeclared here (not in a function)
     uint32_t tmp32[static restrict 72])
                           ^
../src/scrypt/sha256.c:216:36: error: expected ‘]’ before numeric constant
     uint32_t tmp32[static restrict 72])
                                    ^
../src/scrypt/sha256.c: In function ‘libcperciva_SHA256_Update’:
../src/scrypt/sha256.c:261:2: warning: implicit declaration of function ‘_SHA256_Update’ [-Wimplicit-function-declaration]
  _SHA256_Update(ctx, in, len, tmp32);
  ^
../src/scrypt/sha256.c: At top level:
../src/scrypt/sha256.c:274:27: error: ‘restrict’ undeclared here (not in a function)
     uint32_t tmp32[static restrict 72])
                           ^
../src/scrypt/sha256.c:274:36: error: expected ‘]’ before numeric constant
     uint32_t tmp32[static restrict 72])
                                    ^
../src/scrypt/sha256.c: In function ‘libcperciva_SHA256_Final’:
../src/scrypt/sha256.c:291:2: warning: implicit declaration of function ‘_SHA256_Final’ [-Wimplicit-function-declaration]
  _SHA256_Final(digest, ctx, tmp32);
  ^
../src/scrypt/sha256.c: At top level:
../src/scrypt/sha256.c:326:27: error: ‘restrict’ undeclared here (not in a function)
     uint32_t tmp32[static restrict 72], uint8_t pad[static restrict 64],
                           ^
../src/scrypt/sha256.c:326:36: error: expected ‘]’ before numeric constant
     uint32_t tmp32[static restrict 72], uint8_t pad[static restrict 64],
                                    ^
../src/scrypt/sha256.c:326:41: error: expected ‘;’, ‘,’ or ‘)’ before ‘uint8_t’
     uint32_t tmp32[static restrict 72], uint8_t pad[static restrict 64],
                                         ^
../src/scrypt/sha256.c: In function ‘libcperciva_HMAC_SHA256_Init’:
../src/scrypt/sha256.c:365:2: warning: implicit declaration of function ‘_HMAC_SHA256_Init’ [-Wimplicit-function-declaration]
  _HMAC_SHA256_Init(ctx, _K, Klen, tmp32, pad, khash);
  ^
../src/scrypt/sha256.c: At top level:
../src/scrypt/sha256.c:379:27: error: ‘restrict’ undeclared here (not in a function)
     uint32_t tmp32[static restrict 72])
                           ^
../src/scrypt/sha256.c:379:36: error: expected ‘]’ before numeric constant
     uint32_t tmp32[static restrict 72])
                                    ^
../src/scrypt/sha256.c: In function ‘libcperciva_HMAC_SHA256_Update’:
../src/scrypt/sha256.c:393:2: warning: implicit declaration of function ‘_HMAC_SHA256_Update’ [-Wimplicit-function-declaration]
  _HMAC_SHA256_Update(ctx, in, len, tmp32);
  ^
../src/scrypt/sha256.c: At top level:
../src/scrypt/sha256.c:406:27: error: ‘restrict’ undeclared here (not in a function)
     uint32_t tmp32[static restrict 72], uint8_t ihash[static restrict 32])
                           ^
../src/scrypt/sha256.c:406:36: error: expected ‘]’ before numeric constant
     uint32_t tmp32[static restrict 72], uint8_t ihash[static restrict 32])
                                    ^
../src/scrypt/sha256.c:406:41: error: expected ‘;’, ‘,’ or ‘)’ before ‘uint8_t’
     uint32_t tmp32[static restrict 72], uint8_t ihash[static restrict 32])
                                         ^
../src/scrypt/sha256.c: In function ‘libcperciva_HMAC_SHA256_Final’:
../src/scrypt/sha256.c:427:2: warning: implicit declaration of function ‘_HMAC_SHA256_Final’ [-Wimplicit-function-declaration]
  _HMAC_SHA256_Final(digest, ctx, tmp32, ihash);
  ^
make: *** [Release/obj.target/bcoin-native/src/scrypt/sha256.o] Error 1
make: Leaving directory `/home/user/dev/btc/node_modules/bcoin/node_modules/bcoin-native/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-24-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/dev/btc/node_modules/bcoin/node_modules/bcoin-native
gyp ERR! node -v v4.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN optional dep failed, continuing bcoin-native@0.0.5
@orweinberger
Copy link
Author

orweinberger commented Sep 28, 2016

Yep, looks like the 1.19 branch was merged to leveldown's master and deleted afterwards Level/leveldown#299

@chjj
Copy link
Member

chjj commented Sep 28, 2016

Yikes. Fixing.

@chjj
Copy link
Member

chjj commented Sep 28, 2016

Pushed to master. The new version of bcoin-native should also successfully build now.

@chjj chjj closed this as completed Sep 28, 2016
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

2 participants