hyperledger-archives / indy-sdk

indy-sdk
https://wiki.hyperledger.org/display/indy
Apache License 2.0
668 stars 735 forks source link

Building Nodejs wrapper fails on Ubuntu 16.04 #912

Closed phillipgibb closed 6 years ago

phillipgibb commented 6 years ago

Using https://github.com/hyperledger/indy-sdk/blob/master/doc/ubuntu-build.md as a reference with a docker file that replicates https://github.com/hyperledger/indy-sdk/blob/master/libindy/ci/ubuntu.dockerfile to setup the start of the image

libindy builds correctly and libindy.so is copied to /usr/lib

then from inside the nodejs app that uses indy-sdk the following is run:

npm install ../indy-sdk/wrappers/nodejs

indy-sdk@0.2.5 install /home/indy/src/app/node_modules/indy-sdk
> node-gyp rebuild

make: Entering directory '/home/indy/src/indy-sdk/wrappers/nodejs/build'
  CXX(target) Release/obj.target/indynodejs/src/indy.o
../src/indy.cc:4:23: fatal error: indy_core.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/indynodejs/src/indy.o] Error 1
indynodejs.target.mk:97: recipe for target 'Release/obj.target/indynodejs/src/indy.o' failed
make: Leaving directory '/home/indy/src/indy-sdk/wrappers/nodejs/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:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.9.87-linuxkit-aufs
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/indy/src/indy-sdk/wrappers/nodejs
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
vimmerru commented 6 years ago

@farskipper Could you look?

farskipper commented 6 years ago

@phillipgibb I think all you need to do is cd into indy-sdk/wrappers/nodejs and exec npm run prepare

Then try the install again