Closed ghost closed 7 years ago
That worked for me ealier on Ubuntu 16.04 (node 4.2.6 though, npm 3.5.2).
The one thing that happens after the ACTION Building CSDK iotivity-installed
line is that the system does a git clone
... could it be that you are missing the git
tool on the system?
I have had very misleading error messages in the past when I was missing IoTivity build dependencies on my machine so you may want to double-check that you have all of them installed: https://wiki.iotivity.org/build_iotivity_with_ubuntu_build_machine
All dependencies to build iotivity are installed on the system.
I have run a one-off CI build against Node.js 7.5.0 on both Precise (12.04) and Trusty (14.04) and they both build and test fine. I think I might be able to use docker manually to run against Xenial (16.04) but that'll take some doing.
I have downloaded the Xenial 32-bit virtualbox image and in it, I ran:
1 wget https://raw.githubusercontent.com/creationix/nvm/v0.31.7/install.sh
2 bash ./install.sh
3 . ~/.nvm/nvm.sh
4 nvm install 7.5.0
5 node --version
6 sudo apt-get install git scons unzip make gcc uuid-dev libglib2.0-dev
7 git clone https://github.com/otcshare/iotivity-node.git
8 cd iotivity-node/
9 git branch
10 git show
11 npm install
This worked without a hitch.
I built this repo with one modification (added the arm architecture) in a Debian Jessie-like docker on Raspberry Pi. Node v7.4.0, npm v4.0.5
Tried on Ubuntu 16.04 LTS with node v7.5.0 and it worked.
However, the build-script assumes the build of iotivity-native succeeds at the first time. If directory iotivity-native exists but the build fails, node-gyp rebuild
will not try building the iotivity-native.
ulf@gateway-new:~/lab/iotivity-node$ npm install npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
make: Entering directory '/home/ulf/lab/iotivity-node/build' ACTION Building CSDK iotivity-installed fs.js:871 return binding.readdir(pathModule._makeLong(path), options.encoding); ^
Error: ENOENT: no such file or directory, scandir '/home/ulf/lab/iotivity-node/iotivity-native/out' at Object.fs.readdirSync (fs.js:871:18) at findBins (/home/ulf/lab/iotivity-node/build-scripts/build-csdk.js:41:16) at Object. (/home/ulf/lab/iotivity-node/build-scripts/build-csdk.js:118:18)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:418:7)
csdk.target.mk:13: recipe for target 'iotivity-installed' failed
make: *** [iotivity-installed] Error 1
make: Leaving directory '/home/ulf/lab/iotivity-node/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:106:13) gyp ERR! stack at ChildProcess.emit (events.js:192:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 4.4.0-31-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/ulf/lab/iotivity-node gyp ERR! node -v v7.5.0 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not oknpm ERR! Linux 4.4.0-31-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v7.5.0 npm ERR! npm v4.1.2 npm ERR! code ELIFECYCLE npm ERR! iotivity-node@1.2.0-2 install:
node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the iotivity-node@1.2.0-2 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the iotivity-node package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs iotivity-node npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls iotivity-node npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! /home/ulf/lab/iotivity-node/npm-debug.log ulf@gateway-new:~/lab/iotivity-node$
ulf@gateway-new:~/lab/iotivity-node$ node-gyp rebuild module.js:472 throw err; ^
Error: Cannot find module 'graceful-fs' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/usr/share/node-gyp/lib/node-gyp.js:12:10)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
ulf@gateway-new:~/lab/iotivity-node$