I am trying to cross compile NodeJs from Ubuntu 22.04 for ARM architecture. Tried with multiple node versions like 8.17, 12.22, 10.24
Following are set in environment
CC=arm-linux-gnueabihf-gcc
CXX=arm-linux-gnueabihf-g++
LD=arm-linux-gnueabihf-ld
CXX_host="g++ -m32"
CC_host="gcc -m32"
By using command:
./configure --dest-cpu=arm --cross-compiling --dest-os=linux --without-intl --without-dtrace
the output binary file type is:
node: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=fa3bb60e9c3ecef4c39de6b7a89be3eb94f957fb, for GNU/Linux 3.2.0, with debug_info, not stripped
Which is not working. getting error while trying to run generated binary in board.
./node -v gives error node not found.
but following file type is working.
node: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=525a819b3ea8436162e9e1ac1ffb94a55f405635, stripped
Really appreciate your help.