@davidsi said in cross compiling serial port failure (yes I know there are other answers):
I'm trying to cross-compile serialport. I know there are other answers, but they did not work for me, and there are binaries, but I want to learn how to do it myself for other modules.
I have my environment set up, and can build and port a regular c program. However, I can't create an npm module. When I do, I end up with the error ....
root@Omega-B116:/mnt/mmcblk0p1/development/node/source/tmp# node serial.js /mnt/mmcblk0p1/development/node/node_modules/bindings/bindings.js:121 throw e; ^ Error: Error loading shared library /mnt/mmcblk0p1/development/node/node_modules/@serialport/bindings/build/Release/bindings.node: Exec format error at Object.Module._extensions..node (module.js:681:18) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at bindings (/mnt/mmcblk0p1/development/node/node_modules/bindings/bindings.js:112:48) at Object.<anonymous> (/mnt/mmcblk0p1/development/node/node_modules/@serialport/bindings/lib/linux.js:2:36) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10)
My command line is ...
npm --arch=mipsel_24kc install serial port
and it compiles just fine. Any help would be appreciated
Awesome content