[Pkg-javascript-devel] Bug#996195: Bug#996195: nodejs FTCBFS: uses build architecture build tools such as gcc or pkg-config

Jérémy Lal kapouer at melix.org
Tue Oct 12 08:31:23 BST 2021


Le mar. 12 oct. 2021 à 08:30, Helmut Grohne <helmut at subdivi.de> a écrit :

> Source: nodejs
> Version: 12.22.5~dfsg-6
> Tags: patch
> User: debian-cross at lists.debian.org
> Usertags: ftcbfs
>
> nodejs fails to cross build from source, because its configure.py
> detects build architecture build tools such as gcc or pkg-config without
> the relevant host architecture prefix. (Do note that I'm using the gnu
> terminology also used in man dpkg-architecture here and that nodejs
> seems to be using a confusing mix of terminology.) It seems that
> configure.py expects that you export standard environment variables such
> as CC or PKG_CONFIG. The attached patch implements that.
>
> Unfortunately, it does not make nodejs cross buildable. A build then
> fails running gen-regexp-special-case with an "Exec format error", which
> typically means that the binary was compiled for the host architecture
> but needed for the build architecture.
>
> I researched this a bit and noticed that other cross distributions have
> run into the same problem.
> PtxDist:
> https://lore.ptxdist.org/ptxdist/20200113101809.3260-1-b.esser@pengutronix.de/
> buildroot:
> https://github.com/buildroot/buildroot/blob/master/package/nodejs/nodejs.mk
>
>
> In essence what they do is build nodejs twice. Once for the build
> architecture. Then they steal the relevant tools from that build tree
> and patch the build system to use those other tools. Likely Debian
> should do the same (or upstream should gain a sane solution here). I
> attempted doing this, but my native build for some reason didn't emit
> gen-regexp-special-cases. At that point, I gave up on this.


> While looking into this, I also noticed that you make the build
> non-parallel when building for a 32bit architecture. Is the intention
> really to make a cross build on amd64 for armhf non-parallel and leaving
> a cross build from on say mips for riscv64 parallel? I guess that you do
> mean the build architecture here.
>

parallel builds of nodejs tend to crash on 32-bit because of limited
resources.
If the host has lots of memory available, parallel builds should be enabled.


Please consider applying the attached patch to fix the obvious. At that
> point, please close the bug regardless of the other mentioned issues.
>

Thank you. Will do.

Jérémy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20211012/af8eaf8d/attachment.htm>


More information about the Pkg-javascript-devel mailing list