Your message dated Tue, 12 Oct 2021 21:37:54 +0000
with message-id <e1mapt8-000hgg...@fasolo.debian.org>
and subject line Bug#996195: fixed in nodejs 12.22.5~dfsg-7
has caused the Debian Bug report #996195,
regarding nodejs FTCBFS: uses build architecture build tools such as gcc or 
pkg-config
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
996195: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996195
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: nodejs
Version: 12.22.5~dfsg-6
Tags: patch
User: debian-cr...@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.es...@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.

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

Helmut
diff --minimal -Nru nodejs-12.22.5~dfsg/debian/changelog 
nodejs-12.22.5~dfsg/debian/changelog
--- nodejs-12.22.5~dfsg/debian/changelog        2021-10-10 10:48:05.000000000 
+0200
+++ nodejs-12.22.5~dfsg/debian/changelog        2021-10-11 10:03:16.000000000 
+0200
@@ -1,3 +1,10 @@
+nodejs (12.22.5~dfsg-6.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Improve cross building: Use host tools. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 11 Oct 2021 10:03:16 +0200
+
 nodejs (12.22.5~dfsg-6) unstable; urgency=medium
 
   * Team upload
diff --minimal -Nru nodejs-12.22.5~dfsg/debian/rules 
nodejs-12.22.5~dfsg/debian/rules
--- nodejs-12.22.5~dfsg/debian/rules    2021-10-10 10:43:51.000000000 +0200
+++ nodejs-12.22.5~dfsg/debian/rules    2021-10-11 10:03:16.000000000 +0200
@@ -1,6 +1,8 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
 include /usr/share/dpkg/pkg-info.mk
+include /usr/share/dpkg/buildtools.mk
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
 
 # source equivalent of nodejs -e 'console.log(process.versions.modules)'
@@ -199,7 +201,7 @@
        find debian/nodejs-doc/usr/share/doc/nodejs-doc -name *.json -delete || 
true
 
 override_dh_auto_configure:
-       ./configure $(DEB_CONFIGURE_EXTRA_FLAGS)
+       CC=$(CC) CXX=$(CXX) PKG_CONFIG=$(PKG_CONFIG) ./configure 
$(DEB_CONFIGURE_EXTRA_FLAGS)
 
 override_dh_auto_build-arch:
        mkdir -p $(NODE_TEST_DIR)

--- End Message ---
--- Begin Message ---
Source: nodejs
Source-Version: 12.22.5~dfsg-7
Done: Bastien Roucariès <ro...@debian.org>

We believe that the bug you reported is fixed in the latest version of
nodejs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 996...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bastien Roucariès <ro...@debian.org> (supplier of updated nodejs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 12 Oct 2021 21:11:51 +0000
Source: nodejs
Architecture: source
Version: 12.22.5~dfsg-7
Distribution: unstable
Urgency: medium
Maintainer: Debian Javascript Maintainers 
<pkg-javascript-devel@alioth-lists.debian.net>
Changed-By: Bastien Roucariès <ro...@debian.org>
Closes: 996195
Changes:
 nodejs (12.22.5~dfsg-7) unstable; urgency=medium
 .
   * Team upload
   * Bug fix: "nodejs FTCBFS: uses build architecture build tools such as
     gcc or pkg-config", thanks to Helmut Grohne (Closes: #996195).
Checksums-Sha1:
 93bee69b9df0e7bc04f7046ef24847d090c7e9d8 3494 nodejs_12.22.5~dfsg-7.dsc
 0bb4899fd96a9d219134856db4942e2208956d68 136856 
nodejs_12.22.5~dfsg-7.debian.tar.xz
 83119038266b2d0ea9d8f8f75cf77bb019f126e1 8553 
nodejs_12.22.5~dfsg-7_source.buildinfo
Checksums-Sha256:
 7096f89e99a45b7949309831fcf17e7a465d23a9c791787f6c614846b3355867 3494 
nodejs_12.22.5~dfsg-7.dsc
 52a0610e27370dfbdae81126d19785a9c0590d1c38f9df77ab1a42092b5131ba 136856 
nodejs_12.22.5~dfsg-7.debian.tar.xz
 d8b0776487152fb3e9e64cd4b4e9ad161f3b9c480c365f9dbf438b2dba2f1452 8553 
nodejs_12.22.5~dfsg-7_source.buildinfo
Files:
 e44347747a07d0627a527ca24457bc41 3494 javascript optional 
nodejs_12.22.5~dfsg-7.dsc
 e8f738cd46a9f543ab96d18eaa8d1506 136856 javascript optional 
nodejs_12.22.5~dfsg-7.debian.tar.xz
 9819c60d6d43c07f08fde0d652ec978a 8553 javascript optional 
nodejs_12.22.5~dfsg-7_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEEXQGHuUCiRbrXsPVqADoaLapBCF8FAmFl+u0RHHJvdWNhQGRl
Ymlhbi5vcmcACgkQADoaLapBCF/kJw/+KYOvyJxm8lD/zu4LG+7BzMHZUP5k5cLZ
KzBxpseVMuSAwo+KYoIBsEHzDrm+fJPLO+J0kSKZRx4WMW47b1ONxItuFnYxKsXX
/5cYuhaRQMdvipFHSHkUh1UM4PqJJgYvPbgOHgdgamHLFCaRisUvCZIdeuwft7Tr
rocSZsN5M2BZTnXkD3Uw2bRAmKzvc1xbNTcqk08jYWOVOzHSwCDstf0ikP3zPQpN
+F4cpzyunbnj01nAL5nG9CTqPgbYI7fggku64b+xhdJHIOU9wLmduLQfHaWixc7m
EEDfMXJrhdZoSEt6ffVZd+kBzZMG3ezRrGrcC/wHW0/+YANuN9i3T4Q6U5T5nHq/
thvCJAatHLVivvZ1K64tu61w8J3fmX19ktkBoQEYHrcX3pMxraqBiX+Zx85cT4E4
J68WLLbSItvPpGTKzKn82wDOplQK2NP6OWWoBJHZdTvibo7YOE37vkCnlHFduC4B
RdNXbUGx+dqUtzrhX4TcOdx0MjZwh5nKmG8BZZyuf3c1/L0Gjtl9NrncgtFLUf8g
eO8n/G/bdfJrE52sZg8waXo4aJVxTRqovKpyG4YmlpSDyPGHOufynXaqTRbG1zzx
Z0KWCgtbpk07J4ihUO377PozbIb8pkPo/TWZW5Ost2eaAVZtz4SPxAl+ECE7ZHlz
tDd+zvl0cnI=
=Cneg
-----END PGP SIGNATURE-----

--- End Message ---
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to