bitchan / eccrypto

JavaScript Elliptic curve cryptography library
Creative Commons Zero v1.0 Universal
302 stars 98 forks source link

Error building on ARM64 #60

Closed vdo closed 4 years ago

vdo commented 4 years ago

When building an application on a ARM64 architecture, I get the following error:

warning Error running install script for optional dependency: "/usr/src/app/node_modules/eccrypto/node_modules/secp256k1: Command failed.
Exit code: 1
Command: npm run rebuild
Arguments: 
Directory: /usr/src/app/node_modules/eccrypto/node_modules/secp256k1
Output:
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1590498076665-0.6896239708228453/node but npm is using /usr/local/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> secp256k1@2.0.4 rebuild /usr/src/app/node_modules/eccrypto/node_modules/secp256k1
> node-gyp rebuild

gyp: Undefined variable openssl_config_path 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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.6.12-1-MANJARO
gyp ERR! command \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /usr/src/app/node_modules/eccrypto/node_modules/secp256k1
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! secp256k1@2.0.4 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the secp256k1@2.0.4 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The same build (Dockerfile) works on x86_64/amd64 architecture.

JBaczuk commented 4 years ago

Failed at the secp256k1@2.0.4 looks like it's a 3rd party module causing the failure.