As I posted in another thread, I tried (and failed miserably)...
I first downloaded the sources:
git clone https://git.openwrt.org/openwrt/openwrt.git && cd openwrt
Then installed all the feeds:
./scripts/feeds update -a && ./scripts/feeds install -a
As I want to start with an image similar to an official build, I downloaded the configuration for my platform:
wget https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/config.buildinfo -O .config
I tried to configure the kernel first:
make -j6 kernel_menuconfig
But this triggered the normal menuconfig
first... I selected my device, then checked that node.js
was disabled, as expected. After saving the config file, the process continued, then failed because some library was missing; I could fix this with:
export LD_LIBRARY_PATH=${PWD}/staging_dir/host/lib/
Back to kernel_menuconfig
, and I could enable FPU emulation. I tried to go back to menuconfig
and enable node.js
, but it was still disabled. So, I edited the Makefile
at feeds/packages/lang/node/
, and changed the dependencies:
- Before:
DEPENDS:=@HAS_FPU @(i386||x86_64||arm||aarch64) \
- After:
DEPENDS:=@(i386||x86_64||arm||aarch64||mipssel) \
Back to menuconfig
again, and this time I could enable the node.js
package.
Next step was to build the image:
make -j6 download world
However, this fails (precisely on node.js
) with this message:
/home/eperez/Downloads/OpenWrt/openwrt/staging_dir/host/bin/g++ -m32 -o /home/eperez/Downloads/OpenWrt/openwrt/build_dir/target-mipsel_24kc_musl/node-v20.11.0/out/Release/obj.host/simdutf/deps/simdutf/simdutf.o ../deps/simdutf/simdutf.cpp '-D_GLIBCXX_USE_CXX11_ABI=1' '-DNODE_OPENSSL_CONF_NAME=nodejs_conf' '-DICU_NO_USER_DATA_OVERRIDE' '-D__STDC_FORMAT_MACROS' -I/home/eperez/Downloads/OpenWrt/openwrt/staging_dir/target-mipsel_24kc_musl/usr/include -I../deps/simdutf -pthread -Wall -Wextra -Wno-unused-parameter -m32 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++17 -MMD -MF /home/eperez/Downloads/OpenWrt/openwrt/build_dir/target-mipsel_24kc_musl/node-v20.11.0/out/Release/.deps//home/eperez/Downloads/OpenWrt/openwrt/build_dir/target-mipsel_24kc_musl/node-v20.11.0/out/Release/obj.host/simdutf/deps/simdutf/simdutf.o.d.raw -c
In file included from /usr/include/features.h:515,
from /usr/include/c++/13/x86_64-redhat-linux/32/bits/os_defines.h:39,
from /usr/include/c++/13/x86_64-redhat-linux/32/bits/c++config.h:679,
from /usr/include/c++/13/cstring:41,
from ../deps/simdutf/simdutf.h:5,
from ../deps/simdutf/simdutf.cpp:3:
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
7 | # include <gnu/stubs-32.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
And I got stuck at this point, because I do not know whether this is related to forcing the compilation, or if the package is failing for everybody...