Thread View: linux.debian.ports.x86-64
1 messages
1 total messages
Started by Willow Carlson-Huber
Thu, 05 Nov 2026 21:10
Bug#1153129: altos: fails to build from source on amd64v3 due to host -march from LDFLAGS
Author: Willow Carlson-Huber
Date: Thu, 05 Nov 2026 21:10
Date: Thu, 05 Nov 2026 21:10
95 lines
5416 bytes
5416 bytes
This is a multi-part MIME message sent by reportbug. --===============8859690924807627863== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Package: altos Version: 1.9.22-3 Severity: serious Tags: patch ftbfs Justification: fails to build from source X-Debbugs-Cc: debian-amd64@lists.debian.org, willow.carlsonhuber@canonical.com User: debian-amd64@lists.debian.org Usertags: amd64 Dear Maintainer, When building the package for amd64v3 in Ubuntu, `-march=x86-64-v3` is added to LDFLAGS. This flag is incorrectly used with `arm-none-eabi-gcc`, which causes the build to fail. The attached patch prevents the host's LDFLAGS from being used with foreign compilers. -- System Information: Debian Release: forky/sid APT prefers resolute-updates APT policy: (500, 'resolute-updates'), (500, 'resolute-security'), (500, 'resolute'), (100, 'resolute-proposed'), (100, 'resolute-backports') Architecture: amd64 (x86_64) Kernel: Linux 7.0.0-42-generic (SMP w/24 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages altos depends on: pn default-jre | java2-runtime <none> pn freetts <none> ii libc6 2.43-2ubuntu2.4 ii libelf1t64 0.194-4 ii libjansson4 2.14-2build4 pn libjfreechart-java <none> ii libjson-c5 0.18+ds-3 ii libreadline8t64 8.3-4 ii libusb-1.0-0 2:1.0.29-2build1 pn nickle <none> altos recommends no packages. altos suggests no packages. --===============8859690924807627863== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-amd64v3-build.patch" Description: Don't pass host CPPFLAGS/LDFLAGS to the ARM compiler probes The cortex-m0/m3 checks override CFLAGS but inherit the host LDFLAGS and CPPFLAGS. On amd64v3 (and any build using -march in LDFLAGS for LTO) these contain -march=x86-64-v3, which arm-none-eabi-gcc rejects, so the probes fail and no firmware (*.ihx) is built, making dh_install fail. Author: OpenCode Reviewed-By: Sebastien Bacher <sebastien.bacher@canonical.com> Reviewed-By: Willow Carlson-Huber <willow.carlsonhuber@canonical.com> Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/altos/+bug/2168943 Forwarded: no --- a/configure.ac +++ b/configure.ac @@ -278,9 +278,13 @@ if test "x$HAVE_ARM_CC" = "xyes"; then save_CC="$CC" save_CFLAGS="$CFLAGS" + save_CPPFLAGS="$CPPFLAGS" + save_LDFLAGS="$LDFLAGS" save_LIBS="$LIBS" CC="$ARM_CC" CFLAGS="-mthumb -mcpu=cortex-m0" + CPPFLAGS="" + LDFLAGS="" LIBS="--specs=picolibc.specs" AC_LANG_PUSH([C]) @@ -300,6 +304,8 @@ AC_LANG_POP([C]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" CC="$save_CC" else HAVE_ARM_M3_CC=no --===============8859690924807627863==--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads