Your message dated Tue, 17 Aug 2021 15:04:03 +0000
with message-id <e1mg0dh-0006pf...@fasolo.debian.org>
and subject line Bug#990031: fixed in glibc 2.31-14
has caused the Debian Bug report #990031,
regarding glibc FTCBFS: multiple reasons
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.)


-- 
990031: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990031
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: glibc
Version: 2.31-12
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

Hi Aurelien et al,

while we do cross build glibc stage2 during architecture bootstrap with
some hacks, I've never really attempted cross building it in a pristine
build environment. Now the need has arisen and I've figured that it
doesn't work. There are three distinct problems.

The binutils dependency is interpreted as a host architecture
dependency. Unfortunately, host binutils are neither runnable nor
coinstallable with build-essential. What you really want here is
binutils for the host architecture. This problem is known as "toolchain
dependency translation". We devised a number of possible solution and
ultimately settled on my crazy one back then in 2014 in Paris. The rough
idea is to suffix build tools with -for-build or -for-host and let those
packages magically do the right thing. Fortunately, this actually works
for binutils already.

Nextup is g++-10. The problem is equal to binutils. Unfortunately, we've
not fully implemented the devised solution here yet. We've got patches
for gcc-N and for gcc-defaults, but more review and testing is needed
before those can be uploaded to unstable. In the mean time, the linux
maintainers figured a clever workaround. Instead of $tool, they write
something slightly longer:

    $tool <!cross>,
    $tool-$gnutriplet1 [arch1] <cross>,
    $tool-$gnutriplet2 [arch2] <cross>,
    $tool-gnutriplet3 [arch3] <cross>,
    ...

Yes, this is slightly longish and a little bit ugly. The upshot is that
it works today. Can you bear this temporarily?

Nextup, malloc/Makefile says that the check for libgd does not work for
cross compilation and skips building memusageat. debhelper then
complains when it is missing. In fact, the libgd check does work just
fine during cross builds and the hack can be removed.

So here you have a patch that makes glibc cross buildable to arm64
without any fuss.

Do note that I did not touch the multilib dependency. Cross building for
e.g. amd64 requires adding the nobiarch profile. I think this is a fair
compromise for now.

Helmut
diff --minimal -Nru glibc-2.31/debian/changelog glibc-2.31/debian/changelog
--- glibc-2.31/debian/changelog 2021-05-01 22:56:06.000000000 +0200
+++ glibc-2.31/debian/changelog 2021-06-18 14:40:52.000000000 +0200
@@ -1,3 +1,13 @@
+glibc (2.31-12.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Annotate binutils dependency with -for-host.
+    + Use suffixed cross compilers until there is -for-host.
+    + cross.patch: LIBGD detection actually works.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 18 Jun 2021 14:40:52 +0200
+
 glibc (2.31-12) unstable; urgency=medium
 
   * debian/po/de.po: fix encoding declaration.  Closes: #986450.
diff --minimal -Nru glibc-2.31/debian/control glibc-2.31/debian/control
--- glibc-2.31/debian/control   2021-01-05 06:41:20.000000000 +0100
+++ glibc-2.31/debian/control   2021-06-18 14:30:58.000000000 +0200
@@ -8,10 +8,11 @@
  mig-for-host (>= 1.5-3) [hurd-i386], gnumach-dev (>= 2:1.8+git20200710-2~) 
[hurd-i386],
  hurd-dev (>= 1:0.9.git20201127-4~) [hurd-i386] | hurd-headers-dev [hurd-i386],
  kfreebsd-kernel-headers [kfreebsd-any],
- binutils (>= 2.29),
- g++-10, g++-10-multilib [amd64 i386 kfreebsd-amd64 mips mipsel mipsn32 
mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 
mips64r6el powerpc ppc64 s390x sparc sparc64 x32] <!nobiarch>,
- gcc-10 (>= 10-20200431) [arm64],
- gcc-10 (>= 10.1.0-3) [hurd-i386],
+ binutils-for-host (>= 2.29),
+ g++-10 <!cross>, g++-10-multilib [amd64 i386 kfreebsd-amd64 mips mipsel 
mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el 
mips64r6 mips64r6el powerpc ppc64 s390x sparc sparc64 x32] <!nobiarch>,
+ g++-10-x86-64-kfreebsd-gnu [kfreebsd-amd64] <cross>, g++-10-i686-kfreebsd-gnu 
[kfreebsd-i386] <cross>, g++-10-x86-64-kfreebsd-gnu [kfreebsd-amd64] <cross>, 
g++-10-i686-kfreebsd-gnu [kfreebsd-i386] <cross>, g++-10-x86-64-linux-gnu 
[amd64] <cross>, g++-10-aarch64-linux-gnu [arm64] <cross>, 
g++-10-arm-linux-gnueabi [armel] <cross>, g++-10-arm-linux-gnueabihf [armhf] 
<cross>, g++-10-hppa-linux-gnu [hppa] <cross>, g++-10-i686-linux-gnu [i386] 
<cross>, g++-10-m68k-linux-gnu [m68k] <cross>, g++-10-mips-linux-gnu [mips] 
<cross>, g++-10-mipsel-linux-gnu [mipsel] <cross>, 
g++-10-mips64-linux-gnuabin32 [mipsn32] <cross>, 
g++-10-mips64el-linux-gnuabin32 [mipsn32el] <cross>, 
g++-10-mips64-linux-gnuabi64 [mips64] <cross>, g++-10-mips64el-linux-gnuabi64 
[mips64el] <cross>, g++-10-mipsisa32r6-linux-gnu [mipsr6] <cross>, 
g++-10-mipsisa32r6el-linux-gnu [mipsr6el] <cross>, 
g++-10-mipsisa64r6-linux-gnuabin32 [mipsn32r6] <cross>, 
g++-10-mipsisa64r6el-linux-gnuabin32 [mipsn32r6el] <cross>, 
g++-10-mipsisa64r6-linux-gnuabi64 [mips64r6] <cross>, 
g++-10-mipsisa64r6el-linux-gnuabi64 [mips64r6el] <cross>, 
g++-10-nios2-linux-gnu [nios2] <cross>, g++-10-powerpc-linux-gnu [powerpc] 
<cross>, g++-10-powerpc64-linux-gnu [ppc64] <cross>, 
g++-10-powerpc64le-linux-gnu [ppc64el] <cross>, g++-10-riscv64-linux-gnu 
[riscv64] <cross>, g++-10-sparc-linux-gnu [sparc] <cross>, 
g++-10-sparc64-linux-gnu [sparc64] <cross>, g++-10-s390x-linux-gnu [s390x] 
<cross>, g++-10-sh3-linux-gnu [sh3] <cross>, g++-10-sh4-linux-gnu [sh4] 
<cross>, g++-10-x86-64-linux-gnux32 [x32] <cross>, g++-10-alpha-linux-gnu 
[alpha] <cross>, g++-10-ia64-linux-gnu [ia64] <cross>,
+ gcc-10 (>= 10-20200431) [arm64] <!cross>, gcc-10-aarch64-linux-gnu (>= 
10-20200431) [arm64] <cross>,
+ gcc-10 (>= 10.1.0-3) [hurd-i386], gcc-10-i686-gnu (>= 10.1.0-3) [hurd-i386] 
<cross>,
  python3:native,
  libidn2-0 (>= 2.0.5~) <!nocheck>,
  libc-bin (>= 2.31) <cross>,
diff --minimal -Nru glibc-2.31/debian/control.in/main 
glibc-2.31/debian/control.in/main
--- glibc-2.31/debian/control.in/main   2021-01-03 17:11:31.000000000 +0100
+++ glibc-2.31/debian/control.in/main   2021-06-18 14:25:32.000000000 +0200
@@ -8,10 +8,11 @@
  mig-for-host (>= 1.5-3) [hurd-i386], gnumach-dev (>= 2:1.8+git20200710-2~) 
[hurd-i386],
  hurd-dev (>= 1:0.9.git20201127-4~) [hurd-i386] | hurd-headers-dev [hurd-i386],
  kfreebsd-kernel-headers [kfreebsd-any],
- binutils (>= 2.29),
- g++-10, g++-10-multilib [amd64 i386 kfreebsd-amd64 mips mipsel mipsn32 
mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 
mips64r6el powerpc ppc64 s390x sparc sparc64 x32] <!nobiarch>,
- gcc-10 (>= 10-20200431) [arm64],
- gcc-10 (>= 10.1.0-3) [hurd-i386],
+ binutils-for-host (>= 2.29),
+ g++-10 <!cross>, g++-10-multilib [amd64 i386 kfreebsd-amd64 mips mipsel 
mipsn32 mipsn32el mips64 mips64el mipsr6 mipsr6el mipsn32r6 mipsn32r6el 
mips64r6 mips64r6el powerpc ppc64 s390x sparc sparc64 x32] <!nobiarch>,
+ @GPP_CROSS_DEP@
+ gcc-10 (>= 10-20200431) [arm64] <!cross>, gcc-10-aarch64-linux-gnu (>= 
10-20200431) [arm64] <cross>,
+ gcc-10 (>= 10.1.0-3) [hurd-i386], gcc-10-i686-gnu (>= 10.1.0-3) [hurd-i386] 
<cross>,
  python3:native,
  libidn2-0 (>= 2.0.5~) <!nocheck>,
  libc-bin (>= @GLIBC_VERSION@) <cross>,
diff --minimal -Nru glibc-2.31/debian/patches/cross.patch 
glibc-2.31/debian/patches/cross.patch
--- glibc-2.31/debian/patches/cross.patch       1970-01-01 01:00:00.000000000 
+0100
+++ glibc-2.31/debian/patches/cross.patch       2021-06-18 14:40:52.000000000 
+0200
@@ -0,0 +1,21 @@
+--- glibc-2.31.orig/malloc/Makefile
++++ glibc-2.31/malloc/Makefile
+@@ -139,10 +139,6 @@
+ endif
+ endif
+ 
+-# Unless we get a test for the availability of libgd which also works
+-# for cross-compiling we disable the memusagestat generation in this
+-# situation.
+-ifneq ($(cross-compiling),yes)
+ # If the gd library is available we build the `memusagestat' program.
+ ifneq ($(LIBGD),no)
+ others: $(objpfx)memusage
+@@ -158,7 +154,6 @@
+ # is to presume that the standard system headers will be ok for this file.
+ $(objpfx)memusagestat.o: sysincludes = # nothing
+ endif
+-endif
+ 
+ # Another goal which can be used to override the configure decision.
+ .PHONY: do-memusagestat
diff --minimal -Nru glibc-2.31/debian/patches/series 
glibc-2.31/debian/patches/series
--- glibc-2.31/debian/patches/series    2021-04-25 18:19:34.000000000 +0200
+++ glibc-2.31/debian/patches/series    2021-06-18 14:40:52.000000000 +0200
@@ -168,3 +168,4 @@
 any/local-test-install.diff
 any/git-surplus-tls-accounting.diff
 any/git-ld.so-cache-endianness-markup.diff
+cross.patch
diff --minimal -Nru glibc-2.31/debian/rules.d/control.mk 
glibc-2.31/debian/rules.d/control.mk
--- glibc-2.31/debian/rules.d/control.mk        2020-04-16 14:41:39.000000000 
+0200
+++ glibc-2.31/debian/rules.d/control.mk        2021-06-18 14:30:54.000000000 
+0200
@@ -15,6 +15,9 @@
            -e "s%@libc-dev-conflict@%$(foreach arch,$(filter-out 
$*,$(libc_packages)),$(arch)-dev,)%g" \
            < $< > $@
 
+COMMA=,
+GPP_CROSS_DEP = $(foreach a,$(libc0_1_archs) $(libc0_1_archs) $(libc6_archs) 
$(libc6_1_archs),g++-10-$(shell dpkg-architecture -f -a$(a) -qDEB_HOST_GNU_TYPE 
| tr _ -) [$(a)] <cross>$(COMMA))
+
 debian/control: $(stamp)control
 $(stamp)control: debian/rules.d/control.mk $(control_deps) 
debian/tests/control.in
 
@@ -43,7 +46,7 @@
        cat debian/control.in/kfreebsd-i386     >> $@T
        cat debian/control.in/x32               >> $@T
        cat debian/control.in/opt               >> $@T
-       sed -e 's%@libc@%$(libc)%g' -e 's%@GLIBC_VERSION@%$(GLIBC_VERSION)%g' < 
$@T > debian/control
+       sed -e 's%@libc@%$(libc)%g' -e 's%@GLIBC_VERSION@%$(GLIBC_VERSION)%g' 
-e 's%@GPP_CROSS_DEP@%$(GPP_CROSS_DEP)%g' < $@T > debian/control
        rm $@T
 
        # And generate the tests control file with the current GCC

--- End Message ---
--- Begin Message ---
Source: glibc
Source-Version: 2.31-14
Done: Aurelien Jarno <aure...@debian.org>

We believe that the bug you reported is fixed in the latest version of
glibc, 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 990...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aure...@debian.org> (supplier of updated glibc 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, 17 Aug 2021 16:27:59 +0200
Source: glibc
Architecture: source
Version: 2.31-14
Distribution: unstable
Urgency: medium
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Changed-By: Aurelien Jarno <aure...@debian.org>
Closes: 603914 975077 981650 982360 986951 987266 990031 990069
Changes:
 glibc (2.31-14) unstable; urgency=medium
 .
   [ Samuel Thibault ]
   * debian/testsuite-xfail-debian.mk: Update tests.
   * debian/patches/hurd-i386/tg-eintr.diff: Replace with upstream's
     more complete git-eintr.diff.
   * debian/patches/hurd-i386/proc_reauth.diff: Use the new
     __proc_reauthenticate_complete protocol.
   * control: Break hurd version that erroneously depended on an update libc0.3
     for the auth_complete_reauthentication RPC
   * debian/libc0.3.symbols.hurd-i386: Add missing gsync_wait_intr symbol.
   * debian/patches/hurd-i386/git-AT_NO_AUTOMOUNT.diff: Fix glib's fileinfo.
   * debian/patches/hurd-i386/git-ELF_MACHINE_USER_ADDRESS_MASK.diff: Fix
     ELF_MACHINE_USER_ADDRESS_MASK value.
   * debian/patches/hurd-i386/tg-bigmem.diff: Relace by git-drop-rmh.diff.
   * debian/patches/series: Reorder hurd-i386 git patches according to glibc
     release dates.
   * debian/patches/hurd-i386/sysvshm-lll.diff: Fold into tg-sysvshm.diff.
 .
   [ Aurelien Jarno ]
   * Drop debian/patches/arm/local-soname-hack.diff: not needed anymore.
   * Drop debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff: not needed
     anymore.
   * debian/sysdeps/armhf.mk: drop old armhf compat symlink, this is not
     supported anymore.
   * debian/control.in/main: remove Adam Conrad from Uploaders. RIP.  Closes:
     #986951.
   * debian/testsuite-xfail-debian.mk: drop tst-malloc-usable-tunables from
     XFAIL, the kernel bug has been fixed.
   * debian/control.in/libc, debian/rules.d/debhelper.mk: Drop the depends in
     libcrypt1 as upgrades from buster to bookworm are not supported. Demote
     the libnss-nis and libnss-nisplus recommends to suggests.  Closes:
     #975077.
   * debian/patches/hppa/git-fcntl.h-update.diff: new patch from upstream to
     update EFD_NONBLOCK, IN_NONBLOCK, SFD_NONBLOCK and TFD_NONBLOCK on HPPA.
     Closes: #981650.
   * debian/debhelper.in/locales.postinst: simplify locales-all detection.
   * debian/control.in/main: drop arch specific depends on gcc-10 now that the
     minimum version is already in bullseye.
   * debian/debhelper.in/libc.preinst: simplify the version comparison by only
     comparing the two first parts, now that kernel 2.X are not supported
     anymore.
   * debian/debhelper.in/libc.preinst: drop the check for kernel release > 255
     now that glibc and preinstall script are fixed.  Closes: #987266.
   * debian/rules.d/build.mk: stop passing --enable-obsolete-rpc.
   * debian/debhelper.in/libc-dev.install{,.hurd-i386}: do not install
     librpcsvc.a.
   * debian/debhelper.in/libc-dev-bin.manpage, debian/local/manpages/rpcgen.1:
     do not install rpcgen (1) manpage.
   * debian/rules.d/build.mk: stop deleting <rpcsvc/yppasswd.h> and
     <rpcsvc/yppasswd.x>.
   * debian/control.in/libc, debian/rules.d/debhelper.mk: make libc6-dev to
     depend on rpcsvc-proto, except for stage1 and stage2.
   * debian/patches/localedata/supported.diff: update to drop all non-UTF-8
     locales.  Closes: #603914.
   * debian/patches/localedata/sort-UTF8-first.diff: drop.
   * debian/script.in/nsscheck.sh: restart openssh-server even if it has been
     deconfigured during the upgrade.  Closes: #990069.
 .
   [ Helmut Grohne ]
   * Fix FTCBFS: (Closes: #990031)
     + debian/control.in/main: Annotate binutils dependency with -for-host.
     + debian/control.in/main, debian/rules.d/control.mk: Use suffixed cross
       compilers until there is -for-host.
     + debian/patches/any/local-cross.patch: LIBGD detection actually works.
 .
   [ Matthias Klose ]
   * debian/rules, debian/rules.d/build.mk: Run checks for every pass before
     failing the build.  Closes: #982360.
Checksums-Sha1:
 c6fe176769a0e4068e39d9416e6f96d830508cdf 9762 glibc_2.31-14.dsc
 18b265e2eea5b45e47c7ce331e0e84b9bf4ccc90 913480 glibc_2.31-14.debian.tar.xz
 822fc821fd078cfec8b122ce5b4bbff1103b3361 8618 glibc_2.31-14_source.buildinfo
Checksums-Sha256:
 270453ce3b45caf98a1edc2b933c0703477e474427ad1fb14d5653ebb201c401 9762 
glibc_2.31-14.dsc
 ad39bc1cb4c8eaa4dde7df897b3c7f7fe85743b88422a972c195a7d43a2bc862 913480 
glibc_2.31-14.debian.tar.xz
 e5b472f4f5785a4c8a5e19a117a401270f003130464138a1be24290868eb9b13 8618 
glibc_2.31-14_source.buildinfo
Files:
 75a013feac12d6637e49d73cdddb7fc1 9762 libs required glibc_2.31-14.dsc
 dd51c09b4cebb2416b7d684e8646fa73 913480 libs required 
glibc_2.31-14.debian.tar.xz
 48e98e2522e9c1534999a1ff074b9e8d 8618 libs required 
glibc_2.31-14_source.buildinfo

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

iQIzBAEBCgAdFiEEUryGlb40+QrX1Ay4E4jA+JnoM2sFAmEbyoAACgkQE4jA+Jno
M2vheA/7B7xJoWlagrNo44CNH4upRFb0HpzqtG/FtXjGAQJr5c0OWRiZf9YVv7PL
UzIfUoLjYVmu2YxeSgTCbunC/d9CgWIhpn6306Tum/CMF2+loCWD7ZdcudZnh8tR
aDKwQvW9RI5uGn54G4dFs8nL0Ir2lq+5WKzvaVLIMOZja58ck0HI+0tJ7Mjw/tCt
8QTihOVH/NY9brsnw1lbwBwUVErZH/1MDfQ6pnwxzd2rKgH0pYBDt1Ac9fwofqRB
xH+fDV/56xHzGh8ECTQWLIRkagP0ab/uP8eVpiD+Avl9eZ/jYtw8aNO2cZl3EDng
P7TEGJgnkr7VY7Cded/Tti6GQrWz3eIq/uIWGjvpkjzuFvQgWaKnSRrUuVpa0Rr6
XfjJfZKcrEWnfigxd2zk/NIWZnhTS+XtKNkFujJSxsdN1QEL3ubPZS3eV6uMggWo
QHgt7FCfBfIGCYWoQR4t+9rTU8jgIswevjUnRqb5u1vN5b2dyMUYI4eJlQvLD+JC
tAfqpaElAnVF6l4fhyeT6/2PzRBT6LFmpDphcPKHgfO1+asYiWOKsQ1IItvZwjhR
u+fcGVGrW6K1GVVXq+sVYBqeCoZdG6eU+hQN+MM6cIQAecV7M7OP9yoW3I2UdG3g
MyPsbG1YNeaQbWK44pNY+IpReKhI9hEcR93L1Ya0QWLJmI7hFpo=
=547K
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to