nneves / openwrt_mips_ar9331_nodejs Goto Github PK
View Code? Open in Web Editor NEWLinux bash script to cross-compile Node.js for OpenWrt MIPS Atheros AR9331 Chipset
Linux bash script to cross-compile Node.js for OpenWrt MIPS Atheros AR9331 Chipset
Hi,
I'm trying to use the npm script to cross compile node_pcap for MIPS, but I just get the output below. Not really sure what's going on, but the directory /home/system/openwrt_mips_ar9331_nodejs/node_modules/pcap/ doesn't seem to exist after running the script.
It appears that it is being deleted at some point in the process. I have tried copying the pcap directory into mode_modules dir and rerunning the script, but I get the same error, then after the directory no longer exists.
Any assistance you might be able to provide would be greatly appreciated
Cheers
Paul
Cross-compile NPM package for OpenWrt MIPS AR9331 SoC: npm install pcap
npm http GET https://registry.npmjs.org/pcap
npm http 304 https://registry.npmjs.org/pcap
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
[email protected] install /home/system/openwrt_mips_ar9331_nodejs/node_modules/pcap/node_modules/socketwatcher
node-gyp rebuild
make: Entering directory /home/system/openwrt_mips_ar9331_nodejs/node_modules/pcap/node_modules/socketwatcher/build' CXX(target) Release/obj.target/socketwatcher/socket_watcher.o SOLINK_MODULE(target) Release/obj.target/socketwatcher.node COPY Release/socketwatcher.node make: Leaving directory
/home/system/openwrt_mips_ar9331_nodejs/node_modules/pcap/node_modules/socketwatcher/build'
[email protected] install /home/system/openwrt_mips_ar9331_nodejs/node_modules/pcap
node-gyp rebuild
make: Entering directory /home/system/openwrt_mips_ar9331_nodejs/node_modules/pcap/build' CXX(target) Release/obj.target/pcap_binding/pcap_binding.o ../pcap_binding.cc:2:23: fatal error: pcap/pcap.h: No such file or directory compilation terminated. make: *** [Release/obj.target/pcap_binding/pcap_binding.o] Error 1 make: Leaving directory
/home/system/openwrt_mips_ar9331_nodejs/node_modules/pcap/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:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.2.0-29-generic-pae
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/system/openwrt_mips_ar9331_nodejs/node_modules/pcap
gyp ERR! node -v v0.10.17
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
I've built v3 and node successfully using your script.. but I don't end up with a npm build.
Are you using a custom npm build for the npm_mips_ar9331.sh script? or just a standard x86 build?
HI,
thanks for all your efforts on this I've just run the node script and it's completed and compiled node for me. It took a few hours, but that's a small price to pay. So I wanted to compile a module and looked to use your npm script, however I can't seem to get it to work. I think it's probably something I'm doing wrong possibly. If I try running it I just get the error:
"./npm_mips_ar9331.sh: line 23: npm: command not found"
I had a look at the script and it doesn't look like it's referencing the path to npm anywhere. So I tried putting a path in front of npm in the script:
"node-v0.10-5-mips/deps/npm/bin/npm"
Which seems to be now running npm ok, but I'm now getting this error:
"node-v0.10-5-mips/deps/npm/bin/npm: 12: node-v0.10-5-mips/deps/npm/bin/npm: node: not found"
Are you able to shed any light on where I'm going wrong please?
Cheers
Paul
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.