- Package:
- gcc-arm-none-eabi
- Source:
- gcc-arm-none-eabi
- Description:
- GCC cross compiler for ARM Cortex-R/M processors
- Submitter:
- Philippe Teuwen
- Date:
- 2026-08-01 04:21:02 UTC
- Severity:
- normal
Dear Maintainer, Code containing PRIx64 macro after inclusion of <inttypes.h> does not compile anymore, the macro doesn't exist contrarily to the situation with gcc-arm-none-eabi_7-2018-q2-6. I tracked it down to the following difference between 7.3.1 and 8.3.1: /usr/lib/gcc/arm-none-eabi/7.3.1/include/stdint.h is a wrapper: #ifndef _GCC_WRAP_STDINT_H #if __STDC_HOSTED__ # if defined __cplusplus && __cplusplus >= 201103L # undef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS # undef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS # endif # include_next <stdint.h> #else # include "stdint-gcc.h" #endif #define _GCC_WRAP_STDINT_H #endif while /usr/lib/gcc/arm-none-eabi/8.3.1/include/stdint.h is the same as /usr/lib/gcc/arm-none-eabi/7.3.1/include/stdint-gcc.h So in 8.3.1 we don't have anymore the include_next <stdint.h> which includes /usr/include/newlib/stdint.h which includes /usr/include/newlib/sys/_stdint.h which defines __int64_t_defined and /usr/include/newlib/inttypes.h defines PRIx64 only if __int64_t_defined is defined.
Hello, I also ran into this issue when building firmware. FWIW, my steps can be found condensed here: ===== FROM debian:sid WORKDIR /build RUN apt-get update && apt-get -y install gcc-arm-none-eabi git \ cmake make RUN git clone https://git.morello-project.org/morello/scp-firmware.git && \ cd scp-firmware && git checkout \ 97c99fcc60b5f3d86767c66390353d1205bce4a5 RUN mkdir build-scp && cd build-scp && cmake -DCMAKE_BUILD_TYPE=Debug \ -DSCP_FIRMWARE_SOURCE_DIR:PATH=morello/scp_ramfw_soc \ ../scp-firmware RUN cmake --build build-scp ===== This then led to: ===== In file included from /build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c:18: /build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c: In function 'enable_and_start_ccix_link_up_sequence': /build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c:383:46: error: expected ')' before 'PRIx64' 383 | MOD_NAME "CXLA_PCIE_HDR_FIELDS: 0x%" PRIx64, | ^~~~~~ /build/scp-firmware/framework/include/fwk_log.h:222:46: note: in definition of macro 'FWK_LOG_INFO' 222 | # define FWK_LOG_INFO(...) fwk_log_printf(__VA_ARGS__) | ^~~~~~~~~~~ /build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c:28:18: error: spurious trailing '%' in format [-Werror=format=] 28 | #define MOD_NAME "[CMN_SKEENA] " | ^~~~~~~~~~~~~~~ /build/scp-firmware/framework/include/fwk_log.h:222:46: note: in definition of macro 'FWK_LOG_INFO' 222 | # define FWK_LOG_INFO(...) fwk_log_printf(__VA_ARGS__) | ^~~~~~~~~~~ /build/scp-firmware/module/cmn_skeena/src/cmn_skeena_ccix.c:383:9: note: in expansion of macro 'MOD_NAME' 383 | MOD_NAME "CXLA_PCIE_HDR_FIELDS: 0x%" PRIx64, | ^~~~~~~~ cc1: all warnings being treated as errors gmake[2]: *** [module/modules/cmn-skeena/CMakeFiles/module-cmn-skeena.dir/build.make:104: module/modules/cmn-skeena/CMakeFiles/module-cmn-skeena.dir/src/cmn_skeena_ccix.c.obj] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:1748: module/modules/cmn-skeena/CMakeFiles/module-cmn-skeena.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2 ===== With some stracing, it became apparent that the newlib headers were pulling in an extra stdint.h (that wasn't part of newlib). I rebuilt the gcc-arm-none-eabi package with the "provide-stdint-for-embedded.patch" removed. That then allowed me to build the SCP firmware without issue. Could the stdint patch please be tweaked? (apologies, I haven't the first clue how it can be tweaked :-( ) Cheers, -- Steve
Hi Keith, I made the same discovery when building my package pico-sdk (currently in NEW). The package builds fine if I remove provide-stdint-for-embedded.patch from gcc-arm-none-eabi. But with gcc-arm-none-eabi in unstable I have to apply the following patch to my package pico-sdk:--- a/test/pico_stdlib_test/pico_stdlib_test.c +++ b/test/pico_stdlib_test/pico_stdlib_test.c @@ -9,6 +9,7 @@ #include "pico/stdlib.h" #include "pico/bit_ops.h" #include <stdlib.h> +#define PRIu64 "lu" void test_builtin_bitops() { int32_t x = 0; --- a/test/pico_time_test/pico_time_test.c +++ b/test/pico_time_test/pico_time_test.c @@ -12,6 +12,7 @@ #include "pico/test.h" #include <inttypes.h> PICOTEST_MODULE_NAME("pico_time_test", "pico_time test harness"); +#define PRIi64 "li" #define NUM_TIMEOUTS 500 #define MAX_TIMERS_PER_POOL 250 I landed here as Raspberry PI developer Andrew Scheller found this bug with the Debian packaging of of gcc-arm-none-eabi. Thanks! cheers, josch
We believe that the bug you reported is fixed in the latest version of gcc-arm-none-eabi, 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 953844@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Keith Packard <keithp@keithp.com> (supplier of updated gcc-arm-none-eabi 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 ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Fri, 31 Jul 2026 17:46:41 -0700 Source: gcc-arm-none-eabi Architecture: source Version: 15:15.3.rel1-1 Distribution: unstable Urgency: medium Maintainer: Keith Packard <keithp@keithp.com> Changed-By: Keith Packard <keithp@keithp.com> Closes: 953844 1067692 Changes: gcc-arm-none-eabi (15:15.3.rel1-1) unstable; urgency=medium . * New upstream release. * Switched to picolibc. (Closes: #953844, #1067692) * Remove autogen dependency. (Closes #1076254) Checksums-Sha1: 506e668af3cfd93104684a4034d3c1f2ebba6ee7 2616 gcc-arm-none-eabi_15.3.rel1-1.dsc 9a665e888b18800674de5bd342a6f6560530b09f 104500411 gcc-arm-none-eabi_15.3.rel1.orig.tar.bz2 ddb800e2e0a1382d649508dfe40b42db4e7ffe52 11952 gcc-arm-none-eabi_15.3.rel1-1.debian.tar.xz 7dda71477a3409206c5624a539737a912e62f18a 9283 gcc-arm-none-eabi_15.3.rel1-1_amd64.buildinfo Checksums-Sha256: b7e1be5547239e2a614efb35c5de282dbe34ab1b2503f8d4ec5b4a8c2894961b 2616 gcc-arm-none-eabi_15.3.rel1-1.dsc d087d40f83d2215b0b9b9c1daca916732333369b3f61d592c4d27a527ab757d1 104500411 gcc-arm-none-eabi_15.3.rel1.orig.tar.bz2 ca52a4437af03e3b267f79626e1567d1ab55c3890b0bd9f10d400fcf1248d43f 11952 gcc-arm-none-eabi_15.3.rel1-1.debian.tar.xz a4454277de2ec35edbbfb729617d8cac3143008e5dac3b45c04ff6b731ade88c 9283 gcc-arm-none-eabi_15.3.rel1-1_amd64.buildinfo Files: 4a3dfb23116f87629d0726b50f519784 2616 devel optional gcc-arm-none-eabi_15.3.rel1-1.dsc 9446d826f08c4495f35e6c2244f4a0c0 104500411 devel optional gcc-arm-none-eabi_15.3.rel1.orig.tar.bz2 03448d4f8221344da1023e48e8bdb828 11952 devel optional gcc-arm-none-eabi_15.3.rel1-1.debian.tar.xz cf7281cefa1bc516e0a030a58716c8ef 9283 devel optional gcc-arm-none-eabi_15.3.rel1-1_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAmptSYMACgkQ2yIaaQAA ABHJPw/9EblFpHXNcVtMKGAQBt6PkH/Q+c0wtNl+tmKy3OEyHw1PLZMzGbjlw7xM X81cMK43K6TGiyJHBieVzBBcANKLPM/rgzuUAUxPXckfiIxp/3zL/ObCqyPQm0Le ClrzOGdWylmx0rzN1Yajp5EsPWSTou75j3gEpB/nk8UlPpJQM9y8irHZWnxhWk14 DxUDEu/hHhf4a66kSk99iEi6DiPEagdkqL0HWqr+u+u+RLPQYqrzXKZQ36g0GktV 6dR+e953SF4EvqHm68kgf8i8y0HCoBI+vZEH8HGR7m3u5VKPYMD1TgaerEw18v+U 0uKgJZ0jRO8XNbmOHWHcuV0ALC/IdaIitb9jsdO69d8A88QRkTLOH6haFsl+JWn2 /dRWO6woB36OcmCK/RBhsjjzP3KLVikNZU5rQN+a36H5aqrv3hpS5ngHdoZ12K4G 5YIg/u6mGDVqJmXrX5jfFqcCj0Ds4Gu46izSAcWphe5FPLotktKM8kfF8ZuWsQwi SVabDw2zujmOX3d//7uLM2KfEWXbSieRccFDV2PLjVq2B5ip5zNPH4cOvrkMvunW B+jYRGf85ek3kGJoGHfuXIwNTcw9vhzRoQku24NrSk7oLqUt8Z/9EzQ/ZPJvUs+p CHXv2nsWt1ir1lwaXt8Z1W+XEMVHr4rxQqEl8MCwX19HSSqE5Z8= =yp9w -----END PGP SIGNATURE-----