Closed johnnyman727 closed 8 years ago
The crux of it is that our binary ends up somewhere nobody expects and I don't know why.
Debug/obj.target/serialport.node
vs the right place of Debug/serialport.node
Release/obj.target/serialport.node
vs the right place of Release/serialport.node
These are the same issues @rwaldron has already been dealing with for detecting installation locations with the t2-cli
.
I mean.. we're using node-pre-gyp both here and in our usual builds, it shouldn't be different at all.
Yeah, it's pretty strange. In any case, I worked around it and uploaded the binaries to the build server.
Workaround:
vagrant ssh;
cd /work/binary-module/package
node-pre-gyp rebuild --target_platform=openwrt --target_arch=$ARCH --target=$NODE --debug
mv build/Debug/obj.target/serialport.node build/Debug/
node-pre-gyp package --target_platform=openwrt --target_arch=$ARCH --target=$NODE --debug
find build/stage -type f | xargs -i cp {} /work/binary-module/output
node-pre-gyp rebuild --target_platform=openwrt --target_arch=$ARCH --target=$NODE
mv build/Release/obj.target/serialport.node build/Release/
node-pre-gyp package --target_platform=openwrt --target_arch=$ARCH --target=$NODE
find build/stage -type f | xargs -i cp {} /work/binary-module/output
rsync -avz -e 'ssh -F ./ssh.conf' default:/work/binary-module/output/. ./out
The issue is the compile.sh is blindly creating pre-gyp configuration, which messes up any existing configuration: https://github.com/tessel/t2-compiler/blob/master/compile.sh#L32
This branch: https://github.com/tessel/t2-compiler/tree/test-pre-gypify-patch can be used to test the changes in pre-gypify
The compiler chokes when trying to compile
serialport
. Here is the output from the command: