Why aren't the node and node-npm packages available on arm_cortex-a9_vfpv3-d16 in 22.03.2?

I see that there is a community package for node here. I'm unfamiliar with the process for building packages for particular targets, but it looks to me like this package is enabled for arm architectures. However, these packages are not in the packages feed. Confusingly, there are some packages that depend on the node package are in the feed, eg. node-serialport.

I'm wondering if anyone has insight into this. I suspect that those community packages are built by a buildbot automatically and if there's a compilation error it doesn't spit out a package and moves on. And perhaps the node package is failing to build for some reason. If this is true, is there public info on the build server, eg. build logs? Can anyone point me in the right direction? Where is the appropriate place to file a bug report on this? (an issue on the openwrt repo in github?)

I notice that over the past few years others have asked about this here, but I've seen no answer. I hope I can get to the bottom of this.

Package build failure logs are available:

The logs show that node & co fail to build for 22.03.



Thanks! Do you know the difference between the host-compile.txt and compile.txt? Is the host-compile not cross-compiled?

There's a couple thing I notice this those logs:

  1. host-compile.txt shows a successful build.
  2. compile.txt does show an error, though it doesn't appear to be with node code, but with the compiler. /usr/include/c++/8/bits/stl_algobase.h is including bits/c++config.h, which doesn't exist. But /usr/include/c++/8/bits/stl_algobase.h is a compiler header file. Looks to me like the build machine has an issue with the compiler installation.

Compiling for OpenWrt is pretty complex, as the compiler runs on x64 machines and mainly compiles for routers with ARM/MIPS processors. So it is about cross-compiling.

In many cases, the cross compilation needs/uses tools built for and run in the x64 buildhost, so there is a "host compile" step first, where these tools are first compiled, so that they are available for the final cross compile "compile" step.

(And in many cases you can't use the "normal" header files adjusted for x86, but you need new header files in the toolchain itself targeting the respective ARM/MIPS CPU variant. For that reason, there are 20+ different package compilation architectures.)

Feel free to familiarize yourself with the the OpenWrt build toolchain system, and fix the node packages.

node has been problematic for a long time.

@nxhack has probably been the most active person regarding node.

I just encountered the same issue.

I believe the issue is that the build machine needs g++-multilib to be installed in order to make <bits/c++config.h> available when cross-compiling from a 64-bit machine to a 32-bit machine.

At least, on my x86_64 Ubuntu machine, I can cross-compile node using the OpenWRT buildroot if I first do a sudo apt install g++-multilib.

You can see the docs in the OpenWRT node package Makefile: https://github.com/openwrt/packages/blob/742d047e01ee36190b3778d8b5d88ac9314db22c/lang/node/Makefile#L50-L54

I think the issue is that the OpenWRT buildbot doesn't have that library installed, so I've made a MR on the openwrt/buildbot gitlab, so hopefully that should fix it, see https://gitlab.com/openwrt/buildbot/-/merge_requests/11

Gitlab is pretty much unused.
You better mail it to the developer mailing list.

1 Like

Thanks for the recommendation!

Sent, see https://lists.openwrt.org/pipermail/openwrt-devel/2022-November/039857.html and https://patchwork.ozlabs.org/project/openwrt/patch/mailman.41691.1669235450.4154159.openwrt-devel@lists.openwrt.org/

@ynezz did recommend to use GitLab (or even making a GitHub mirror and using that), but that discussion seemed to have gone nowhere https://lists.openwrt.org/pipermail/openwrt-devel/2022-October/039555.html