-
Notifications
You must be signed in to change notification settings - Fork 0
Compile NodeJS for RoboRio using cross compiler
Blake Bourque edited this page Dec 16, 2018
·
5 revisions
Building NodeJS from source (10.14.2) On Linux Mint 18.1 (Ubuntu 16.04)
Step 1: Install the cross compiler tool chains from http://first.wpi.edu/FRC/roborio/toolchains/
sudo add-apt-repository ppa:wpilib/toolchain
sudo apt-get update
sudo apt install frc-toolchain
Step 2: Acquire NodeJS source code https://nodejs.org/en/download/
wget https://nodejs.org/dist/v10.14.2/node-v10.14.2.tar.gz
tar xf node-v10.14.2.tar.gz
cd node-v10.14.2
Step 3: Dependencies
sudo apt-get install gcc-multilib g++-multilib libc6-dev-i386
Step 4: Build
CC=arm-frc-linux-gnueabi-gcc CXX=arm-frc-linux-gnueabi-g++ \
CC_host="gcc -m32" CXX_host="g++ -m32" \
./configure --prefix=../install --dest-cpu=arm --cross-compiling --dest-os=linux \
--with-arm-float-abi=softfp --with-arm-fpu=vfpv3
//Based on Chris Lea's work: https://chrislea.com/2018/08/20/cross-compiling-node-js-for-arm-on-ubuntu/ Step 5: Success
admin@roboRIO-VM:~/node-v10.14.2/bin# ./node --version
v10.14.2
possibly of interest (but old) https://gist.github.com/Gioyik/7895192