• Bug#1105090: firefox: Please build with gcc and g++ on ppc64

    From John Paul Adrian Glaubitz@21:1/5 to All on Sun May 11 00:40:01 2025
    XPost: linux.debian.ports.powerpc

    This is a multi-part MIME message sent by reportbug.


    Source: firefox
    Version: 138.0.1-1
    Severity: normal
    Tags: patch
    User: debian-ppc64@lists.debian.org
    Usertags: ppc64
    X-Debbugs-Cc: debian-powerpc@lists.debian.org

    Hi,

    the firefox package fails to build on ppc64 since it tries to use lld
    which does not support PowerPC ELF v1:

    checking what kind of list files are supported by the linker...
    DEBUG: Creating `/tmp/conftest44pjfr9k.c` with content:
    DEBUG: | int main() {}
    DEBUG: Executing: `/usr/bin/clang /tmp/conftest44pjfr9k.c -c -o /tmp/conftest8a8_h03u.o`
    DEBUG: Executing: `/usr/bin/clang -fuse-ld=lld -o /tmp/conftestyqnf9t8a.out -Wl,@/tmp/conftestn8cgmdg6.list`
    DEBUG: The command returned non-zero exit status 1.
    DEBUG: Its error output was:
    DEBUG: | ld.lld: error: /lib/powerpc64-linux-gnu/Scrt1.o: ABI version 1 is not supported
    DEBUG: | clang: error: linker command failed with exit code 1 (use -v to see invocation)
    DEBUG: Executing: `/usr/bin/clang -fuse-ld=lld -o /tmp/conftestyqnf9t8a.out -Wl,@/tmp/conftestn8cgmdg6.list`
    DEBUG: The command returned non-zero exit status 1.
    DEBUG: Its error output was:
    DEBUG: | ld.lld: error: /lib/powerpc64-linux-gnu/Scrt1.o: ABI version 1 is not supported
    DEBUG: | clang: error: linker command failed with exit code 1 (use -v to see invocation)
    DEBUG: Executing: `/usr/bin/clang -fuse-ld=lld -o /tmp/conftestyqnf9t8a.out @/tmp/conftestn8cgmdg6.list`
    DEBUG: The command returned non-zero exit status 1.
    DEBUG: Its error output was:
    DEBUG: | ld.lld: error: /lib/powerpc64-linux-gnu/Scrt1.o: ABI version 1 is not supported
    DEBUG: | clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ERROR: Couldn't find one that works

    This can be fixed by overriding the default C and C++ compilers which forces firefox to
    use the bfd linker instead of lld:

    --- /home/glaubitz/rules.orig 2025-05-10 04:12:23.154624384 -0700
    +++ debian/rules 2025-05-10 14:35:20.765215119 -0700
    @@ -113,6 +113,11 @@
    CONFIGURE_FLAGS += --disable-webrtc
    endif

    +ifneq (,$(filter ppc64,$(DEB_HOST_ARCH)))
    + CC := gcc
    + CXX := g++
    +endif
    +
    ifeq (default,$(origin CC))
    ifneq (,$(filter-out bullseye bookworm,$(DIST)))
    CC := clang

    Could you apply this change for the next upload? I'm attaching the patch.

    Thanks,
    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- debian/rules.orig 2025-05-10 04:12:23.154624384 -0700
    +++ debian/rules 2025-05-10 14:35:20.765215119 -0700
    @@ -113,6 +113,11 @@
    CONFIGURE_FLAGS += --disable-webrtc
    endif

    +ifneq (,$(filter ppc64,$(DEB_HOST_ARCH)))
    + CC := gcc
    + CXX := g++
    +endif
    +
    ifeq (default,$(origin CC))
    ifneq (,$(filter-out bullseye bookworm,$(DIST)))
    CC := clang

    --- SoupGate-Win