[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: armhf builds failing for thunderbird/1:115.8.0-1~deb10u1



Hello Uktarsh,

Am 24.02.24 um 10:42 schrieb Utkarsh Gupta:
Hi Carsten,

Thanks for working through and uploading
thunderbird/1:115.8.0-1~deb10u1 to buster-security. However, I noticed
that armhf builds are failing:
https://buildd.debian.org/status/package.php?p=thunderbird&suite=buster-security

rm -f old-configure js/src/configure js/src/old-configure mozconfig.*
# needed for thunderbird-l10n
rm -rf debian/thunderbird-l10n-build
rm -rf /<<PKGBUILDDIR>>/debian/.cargo
rm -rf /<<PKGBUILDDIR>>/debian/.mozbuild
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    dh_clean
  debian/rules binary-arch
dh binary-arch
    dh_update_autotools_config -a
    debian/rules override_dh_auto_configure
make[1]: Entering directory '/<<PKGBUILDDIR>>'
debian/rules:110: *** Unfortunately cannot build on armhf. Try a
64-bits kernel.  Stop.
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:91: binary-arch] Error 2

Could you please take a look and let me know what's wrong with that?
Should I release a DLA? Should I not?

This discussion about build issues on buster for armhf comes from time to time. I kicked out support for armel and armhf long ago for the reasons explain in the commit message.

$ git show 8f89b90f1054
commit 8f89b90f1054645f7f92d985bc747410123c38c2
Author: Carsten Schoenert <c.schoenert@t-online.de>
Date:   Fri Nov 1 20:22:27 2019 +0100

    d/control: decrease build architecture list
Thunderbird is by the requirement of the availability of the packages
    nodejs and cargo on a lot of archictures not buildable anymore. Thus
    some possible RC platforms and also some platforms of the ports are
    removed for now.
Also the platforms arm{el,hf} and mipsel make building quite hard due
    the constraints of available and adressable memmory quite nearly
    impossible.
    The maintainers are currently not able to keep track of the required
    tweaks and workarounds to keep Thunderbird buildable on those platforms.
    The usability of Thunderbird is sometimes even not possible on these
    platforms too. So in the end we don't have enough energy and time to get
    Thunderbird still supported to build on the above 4 architectures.
The removement of all now non supported architectures don't need to be
    done for all times. But maintaining the removed build architectures
    requires times and mostly patches tot the source and also modifications
    to the build system.
    Some architectures are easily to get turn on again once people can
    contribute these modifications!
Closes: #921258

diff --git a/debian/control b/debian/control
index f25fe1f3e66..93cbaafbf5e 100644
--- a/debian/control
+++ b/debian/control
@@ -68,7 +68,7 @@ X-Debian-Homepage: http://wiki.debian.org/Thunderbird
 Standards-Version: 4.4.1
Package: thunderbird
-Architecture: any
+Architecture: amd64 arm64 i386 mips64el ppc64el s390x ppc64
 Depends:
  debianutils (>= 1.16),
  fontconfig,

Emilio did revert that change with commit 3d58cc1981e5ca14f469b9cbeed45ae62f6d6e54 and d9ebeedde3d9e6524ee837c7c31a1d55e1ddacc7

$ git show 3d58cc1981e5ca14f469b9cbeed45ae62f6d6e54
commit 3d58cc1981e5ca14f469b9cbeed45ae62f6d6e54
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date:   Wed Oct 21 13:22:53 2020 +0200

    d/control: reenable the armhf build on buster
Thunderbird was built on armhf on buster in the past, so there are old
    binaries there. Let's try to get it built again, which would be better
    than having old, unsupported binaries there.

diff --git a/debian/control b/debian/control
index 8f6256fe546..03f95b67fbb 100644
--- a/debian/control
+++ b/debian/control
@@ -61,7 +61,7 @@ X-Debian-Homepage: http://wiki.debian.org/Thunderbird
 Standards-Version: 4.5.0
Package: thunderbird
-Architecture: amd64 arm64 i386 mips64el ppc64el s390x ppc64
+Architecture: amd64 arm64 armhf i386 mips64el ppc64el s390x ppc64
 Depends:
  debianutils (>= 1.16),
  fontconfig,
>> commit d9ebeedde3d9e6524ee837c7c31a1d55e1ddacc7
Author: Emilio Pozuelo Monfort <pochu@debian.org>
Date:   Thu Oct 20 11:00:35 2022 +0200

    Re-enable armhf support
We used to support it in buster, and still have an old binary, so it'd
    be better to have a current one with security support. So try to make
    it build as we have done with firefox-esr.

diff --git a/debian/control b/debian/control
index a74bd40e514..0067d45be7b 100644
--- a/debian/control
+++ b/debian/control
@@ -57,7 +57,7 @@ X-Debian-Homepage: http://wiki.debian.org/Thunderbird
 Standards-Version: 4.6.1
Package: thunderbird
-Architecture: amd64 arm64 i386 mips64el ppc64el s390x ppc64
+Architecture: amd64 armhf arm64 i386 mips64el ppc64el s390x ppc64
 Depends:
  debianutils (>= 1.16),
  fontconfig,
diff --git a/debian/patches/debian-hacks/Allow-to-override-rust-LTO-flag.patch b/debian/patches/debian-hacks/Allow-to-override-rust-LTO-flag.patch
new file mode 100644
index 00000000000..c6d0f78c2a6
--- /dev/null
+++ b/debian/patches/debian-hacks/Allow-to-override-rust-LTO-flag.patch
@@ -0,0 +1,31 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Sun, 14 Aug 2022 15:05:23 +0900
+Subject: Allow to override rust LTO flag
+
+---
+ config/makefiles/rust.mk | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
+index a243ee5..5a97613 100644
+--- a/config/makefiles/rust.mk
++++ b/config/makefiles/rust.mk
+@@ -90,8 +90,9 @@ ifndef rustflags_sancov
+ # Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
+ ifndef MOZ_CODE_COVERAGE
+ ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
+-cargo_rustc_flags += -Clto
++cargo_rustc_flags += $(or $(DEBIAN_RUST_LTO),-Clto)
+ endif
++ifneq (-Clto=off,$(DEBIAN_RUST_LTO))
+ # We need -Cembed-bitcode=yes for all crates when using -Clto.
+ RUSTFLAGS += -Cembed-bitcode=yes
+ endif
+@@ -99,6 +100,7 @@ endif
+ endif
+ endif
+ endif
++endif
+ + ifdef CARGO_INCREMENTAL
+ export CARGO_INCREMENTAL
diff --git a/debian/patches/series b/debian/patches/series
index 2701723a55e..cafa394d293 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -27,3 +27,4 @@ porting-ppc64el/work-around-a-build-failure-with-clang-on-ppc64el.patch
 debian-hacks/Make-Thunderbird-build-reproducible.patch
 debian-hacks/Decrease-Cargo-minimal-version-to-1.46.0.patch
 debian-hacks/Fix-Floating-Point-Normalization-breakage-on-32bit-Linux.patch
+debian-hacks/Allow-to-override-rust-LTO-flag.patch
diff --git a/debian/rules b/debian/rules
index dd993cdc7cf..a307586904d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -43,6 +43,11 @@ ifeq ($(DEB_BUILD_ARCH),armel)
        LDFLAGS += -Wl,-z,muldefs
 endif
+# Use thinLTO on armhf, to stay in the memory budget with an armhf toolchain.
+ifeq (armhf,$(DEB_BUILD_ARCH))
+export DEBIAN_RUST_LTO=-Clto=thin
+endif
+
 # Reduce memory usage of the linker at the expense of processing time
 # This should help on lower-end architectures like arm and mips, which
 # spend an immense amount of time swapping.
@@ -96,6 +101,12 @@ override_dh_auto_clean:
        rm -rf $(MOZBUILD_STATE_PATH)
override_dh_auto_configure:
+ifeq (armhf,$(DEB_BUILD_ARCH))
+ifeq (,$(shell grep -l cpu:type:aarch64 /sys/devices/system/cpu/modalias))
+       # There is not enough memory in armhf userspace with a 32-bits kernel.
+       $(error Unfortunately cannot build on armhf. Try a 64-bits kernel)
+endif
+endif
        # run autoconf for all configure files
        if [ "Z$(DEB_AUTO_UPDATE_AUTOCONF)" != Z ] || [ ! -e $(CURDIR)/configure ]; then \
                cd $(CURDIR) && `which autoconf$(DEB_AUTO_UPDATE_AUTOCONF) || which autoconf`; fi



But for me the solving potential build issues in (E)LTS supported platforms and releases is not my business, that was basically the agreement with Emilio. So I need to say kindly no, I wont look into this. 32Bit for ARM is a dead horse for me.

--
Regards
Carsten


Reply to: