Building from source fails because src folder doesn't exist
Closed this issue · 5 comments
The src folder exists in the repo but not in the npm package (it seems).
It's explicitly ignored in .npmignore
, why?
Environment
OSX/Linux (tried both)
Reproducible by
run npm install node_or_tools --build-from-source
Expectation
Building from source succeeds.
Logs
OSX: (full)
TOUCH Release/obj.target/action_before_build.stamp
SOLINK_MODULE(target) node_modules/node_or_tools/lib/binding/node_or_tools.node
clang: error: no such file or directory: 'Release/obj.target/node_or_tools/src/main.o'
clang: error: no such file or directory: 'Release/obj.target/node_or_tools/src/tsp.o'
clang: error: no such file or directory: 'Release/obj.target/node_or_tools/src/vrp.o'
make: *** [node_modules/node_or_tools/lib/binding/node_or_tools.node] Error 1
Linux: (full)
TOUCH Release/obj.target/action_before_build.stamp
SOLINK_MODULE(target) /usr/src/app/node_modules/node_or_tools/lib/binding/node_or_tools.node
g++: error: Release/obj.target/node_or_tools/src/main.o: No such file or directory
g++: error: Release/obj.target/node_or_tools/src/tsp.o: No such file or directory
g++: error: Release/obj.target/node_or_tools/src/vrp.o: No such file or directory
make: *** [/usr/src/app/node_modules/node_or_tools/lib/binding/node_or_tools.node] Error 1
node_or_tools.target.mk:156: recipe for target '/usr/src/app/node_modules/node_or_tools/lib/binding/node_or_tools.node' failed
Cloning this repo and then running npm i --build-from-source
does, in fact work.
But when using node_or_tools as a dependency, compilation will fail.
Probably an oversight because we use the pre-built binaries for node 4 and node 6 (lts versions). Feel free to make a pr adding the source directory to the npmignore whitelist (and the deps file in the scripts directory, too).
Just published v1.0.5 including the changes.
Sorry for the regression based on #32 (comment).
Thanks dude!