• Bug#1103921: fossil FTCBFS for arm64: passes -mbranch-protection=standa

    From Helmut Grohne@21:1/5 to All on Tue Apr 22 22:30:02 2025
    XPost: linux.debian.ports.arm

    Source: fossil
    Version: 1:2.25-4
    Tags: patch
    X-Debbugs-Cc: debian-arm@lists.debian.org
    User: debian-arm@lists.debian.org
    Usertags: arm64
    User: debian-cross@lists.debian.org
    Usertags: ftcbfs

    fossil fails to cross build from source for arm64, because arm64
    includes -mbranch-protection=standard in CFLAGS and fossil passes this
    flag for building native tools. The amd64 gcc does not like that. The
    upstream makefiles seed BCCFLAGS from the detected host's CFLAGS while
    they should not. I suggest overriding BCCFLAGS in debian/rules. Please
    consider applying the attached patch.

    Helmut

    diff --minimal -Nru fossil-2.25/debian/changelog fossil-2.25/debian/changelog --- fossil-2.25/debian/changelog 2025-04-10 21:15:20.000000000 +0200
    +++ fossil-2.25/debian/changelog 2025-04-22 22:14:37.000000000 +0200
    @@ -1,3 +1,10 @@
    +fossil (1:2.25-4.1) UNRELEASED; urgency=medium
    +
    + * Non-maintainer upload.
    + * Fix FTCBFS: override BCCFLAGS. (Closes: #-1)
    +
    + -- Helmut Grohne <helmut@subdivi.de> Tue, 22 Apr 2025 22:14:37 +0200
    +
    fossil (1:2.25-4) unstable; urgency=medium

    * Patch upstream riscv64-recent-GCC-breaking (1<<31) print issue
    diff --minimal -Nru fossil-2.25/debian/rules fossil-2.25/debian/rules
    --- fossil-2.25/debian/rules 2025-04-10 21:13:35.000000000 +0200
    +++ fossil-2.25/debian/rules 2025-04-22 22:14:30.000000000 +0200
    @@ -3,6 +3,7 @@
    DEB_BUILD_MAINT_OPTIONS=hardening=+all
    export DEB_BUILD_MAINT_OPTIONS
    include /usr/share/dpkg/architecture.mk
    +include /usr/share/dpkg/buildflags.mk

    %:
    dh $@ --with bash-completion
    @@ -48,6 +49,9 @@
    --with-tcl-stubs \
    --with-tcl-private-stubs

    +override_dh_auto_build:
    + dh_auto_bui
  • From Emanuele Rocca@21:1/5 to Helmut Grohne on Wed Apr 23 10:20:01 2025
    Hello Helmut,

    On 2025-04-22 10:19, Helmut Grohne wrote:
    +override_dh_auto_build:
    + dh_auto_build -- 'BCCFLAGS=$(CPPFLAGS_FOR_BUIL) $(CFLAGS_FOR_BUILD)'

    It looks like there's a typo here, this should be CPPFLAGS_FOR_BUILD.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wookey@21:1/5 to Helmut Grohne on Wed Apr 23 15:30:02 2025
    On 2025-04-22 22:19 +0200, Helmut Grohne wrote:
    + dh_auto_build -- 'BCCFLAGS=$(CPPFLAGS_FOR_BUIL) $(CFLAGS_FOR_BUILD)'

    I've not checked this at all, but the above looks like a typo. Is the truncated name "$(CPPFLAGS_FOR_BUIL)" correct?

    Wookey
    --
    Principal hats: Debian, Wookware
    http://wookware.org/

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

    iQIzBAABCgAdFiEER4nvI8Pe/wVWh5yq+4YyUahvnkcFAmgI6MEACgkQ+4YyUahv nkdEaRAAt4dbNi+Q43HM5zS3+GfqZPxBcT65Tx/qaTC0A0PNP7Jy7KFMCUOwyxN4 ULbwoY08GmHv1BNyCmEo+J8y9UhluGW1MlWv+cxMb875oqLkaeUA3jLMLtBtUjCx 6Wo6wQfr9SDq7r77EPEg8Ldg0t9/lb1vz8ibsSZCB8SvJdeDpUx+8l64ldxDUbaT Re/4MIKlzmbGzQbE2ugUNavx3obt+U1u11rbXHthFeIqaKYUbRB9r3Bf4EqHQhNm IqdL8akJ4VCxT9xQC+mcQL38msdMEUJWOUhBiKLof2VUFaqeNEixUBoF7yWC7eZZ wKU4Sha9FQWWlURn6A8XMrADLZwMSbVXClqUA0HEmcGlVjr/JDSSmv6YzEhNJKU2 Ne/FQ/rUHx0RecHkIy6BbRXoDDq2+U88ZXnsAbRaLvk/vqIeMtmh80KBXh8VwWdq Xs/bEs3EMvirtLi6KREpYEkA+tM+gHFZN87bgAawEB8TjSnx2cZklL7j+RXgffiF OKlVC0iPpP/Q8Kjrbgd1wjti2h4xj9C2Upj/IT2HCWz9EJyt4om8+PBe/JqFycXe WsU/RFAZrgAeRiyonMZza4a8zolSUBvJ+bvyInFTJSNgyrrbH1BTDyb+n20Wsicm ZgK29O+4keyICcI9KQxk79r1ATHZyD5xoYvfR+eAZwQJpLxYQ8Y=
    =f8xZ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Grohne@21:1/5 to Emanuele Rocca on Wed Apr 23 20:50:01 2025
    Hi Ema,

    On Wed, Apr 23, 2025 at 10:09:41AM +0200, Emanuele Rocca wrote:
    On 2025-04-22 10:19, Helmut Grohne wrote:
    +override_dh_auto_build:
    + dh_auto_build -- 'BCCFLAGS=$(CPPFLAGS_FOR_BUIL) $(CFLAGS_FOR_BUILD)'

    It looks like there's a typo here, this should be CPPFLAGS_FOR_BUILD.

    Thanks for the review. I concur and attach the updated patch.

    The practical effect of that typo is removing CPPFLAGS and that might
    trip up blhc, but it still fixes cross compilation, which is why I
    didn't notice.

    Helmut

    diff --minimal -Nru fossil-2.25/debian/changelog fossil-2.25/debian/changelog --- fossil-2.25/debian/changelog 2025-04-10 21:15:20.000000000 +0200
    +++ fossil-2.25/debian/changelog 2025-04-22 22:14:37.000000000 +0200
    @@ -1,3 +1,10 @@
    +fossil (1:2.25-4.1) UNRELEASED; urgency=medium
    +
    + * Non-maintainer upload.
    + * Fix FTCBFS: override BCCFLAGS. (Closes: #-1)
    +
    + -- Helmut Grohne <helmut@subdivi.de> Tue, 22 Apr 2025 22:14:37 +0200
    +
    fossil (1:2.25-4) unstable; urgency=medium

    * Patch upstream riscv64-recent-GCC-breaking (1<<31) print issue
    diff --minimal -Nru fossil-2.25/debian/rules fossil-2.25/debian/rules
    --- fossil-2.25/debian/rules 2025-04-10 21:13:35.000000000 +0200
    +++ fossil-2.25/debian/rules 2025-04-22 22:14:30.000000000 +0200
    @@ -3,6 +3,7 @@
    DEB_BUILD_MAINT_OPTIONS=hardening=+all
    export DEB_BUILD_MAINT_OPTIONS
    include /usr/share/dpkg/architecture.mk
    +include /usr/share/dpkg/buildflags.mk

    %:
    dh $@ --with bash-completion
    @@ -48,6 +49,9 @@
    --with-tcl-stubs \
    --with-tcl-private-stubs

    +override_dh_auto_build:
    + dh_auto_bui
  • From Benjamin Riefenstahl@21:1/5 to Helmut Grohne on Fri Apr 25 16:10:01 2025
    Hi Helmut,

    Helmut Grohne writes:
    +override_dh_auto_build:
    + dh_auto_build -- 'BCCFLAGS=$(CPPFLAGS_FOR_BUIL) $(CFLAGS_FOR_BUILD)'

    "CPPFLAGS_FOR_BUIL*D*", I'm guessing?

    benny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)