Source: nodejs Version: 12.22.7~dfsg-1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs Control: block -1 by 996415
Thank you for applying my last patch and to Bastien for improving upon it. That route seemed broken to me when I submitted my patch, but diving deeper into it, it actually looks correct to me. Terminology seems to be: gyp | debian -------+------- target | host host | build Though you cannot use CC_target as most of the code only checks CC. In any case, I see two major issues. One is mixing up CFLAGS between the different compilers. Examples: build | host | issue ------+-------+------- amd64 | arm64 | aarch64-linux-gnu-gcc -m64 amd64 | s390x | x86_64-linux-gnu-gcc -march=z196 The flags for the different compilers are simply merged and that doesn't work. I've looked into how to unmess this and given up. No ideas, sorry. As a notable data point, amd64 -> mips64el is different. Their compiler flags happen to be compatible and we see a different failure. The amd64 linker fails finding a ton of libraries. That's actually a good sign. A number of libraries are needed for both architectures but only requested for one in Build-Depends. The solution is to duplicate them with a :native annotation. I'm attaching a patch for this. Do note that this patch will make nodejs cross-bd-uninstallable, because libnghttp2-dev is needed for both architectures, but not marked Multi-Arch: same. That's a separate problem reported as #996415. The patch will not make nodejs natively bd-uninstallable, so it is safe to apply it now. Helmut
diff --minimal -Nru nodejs-12.22.7~dfsg/debian/changelog nodejs-12.22.7~dfsg/debian/changelog --- nodejs-12.22.7~dfsg/debian/changelog 2021-10-13 00:43:20.000000000 +0200 +++ nodejs-12.22.7~dfsg/debian/changelog 2021-10-13 18:24:43.000000000 +0200 @@ -1,3 +1,10 @@ +nodejs (12.22.7~dfsg-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Add native build dependencies for cross compiling. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Wed, 13 Oct 2021 18:24:43 +0200 + nodejs (12.22.7~dfsg-1) unstable; urgency=medium * New upstream version 12.22.7~dfsg diff --minimal -Nru nodejs-12.22.7~dfsg/debian/control nodejs-12.22.7~dfsg/debian/control --- nodejs-12.22.7~dfsg/debian/control 2021-10-12 23:44:40.000000000 +0200 +++ nodejs-12.22.7~dfsg/debian/control 2021-10-13 18:24:43.000000000 +0200 @@ -14,13 +14,19 @@ gyp (>= 0.1~svn1773), jq, libbrotli-dev, + libbrotli-dev:native, libc-ares-dev (>= 1.14~), + libc-ares-dev:native, libhttp-parser-dev (>= 2.9.2~), libicu-dev (>= 64.0~), + libicu-dev:native, libkvm-dev [kfreebsd-any], libnghttp2-dev (>= 1.41.0~), + libnghttp2-dev:native, libssl-dev (>= 1.1.1~), + libssl-dev:native, libuv1-dev (>= 1.33.0~), + libuv1-dev:native, node-acorn (>= 6.2.1~), openssl (>= 1.1.1~), pkg-config, @@ -29,6 +35,7 @@ python3-distutils, procps, zlib1g-dev, + zlib1g-dev:native, Build-Depends-Indep: node-js-yaml, node-marked Standards-Version: 4.5.1