Failure trying to build arm-none-eabi-gcc (for qmk)

Ask questions about Arch Linux ARM. Please search before making a new topic.

Failure trying to build arm-none-eabi-gcc (for qmk)

Postby WhyNotHugo » Tue Mar 22, 2022 8:49 pm

I'm trying to build `arm-none-eabi-gcc`, which is a dependency for `qmk`.

So far I've built `arm-none-eabi-binutils` by simply changing `arch` to `aarm64`. Because of a circular dependency, I fetched `arm-none-eabi-newlib` from upstream archlinux (since it's an `arch=(any)` package, it works fine).

However, when building `arm-none-eabi-gcc` (again, using the upstream and just changing the `arch` field I get a build error that's somewhat confusing -- it seems to indicate an error in the code about a bad `printf` formatting, but, as far as I can tell, this error should also occur on other platforms, but doesn't. It doesn't seem to be related to something architecture-specific.

Any ideas what I might be getting wrong? Here's the logs:

$this->bbcode_second_pass_code('', '
/build/arm-none-eabi-gcc/src/gcc-11.2.0/libcpp/expr.c: In function ‘unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)’:
/build/arm-none-eabi-gcc/src/gcc-11.2.0/libcpp/expr.c:811:35: error: format not a string literal and no format arguments [-Werror=format-security]
811 | cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
812 | 0, message);
| ~~~~~~~~~~~
/build/arm-none-eabi-gcc/src/gcc-11.2.0/libcpp/expr.c:814:38: error: format not a string literal and no format arguments [-Werror=format-security]
814 | cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
815 | virtual_location, 0, message);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/arm-none-eabi-gcc/src/gcc-11.2.0/libcpp/expr.c:824:33: error: format not a string literal and no format arguments [-Werror=format-security]
824 | cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
825 | virtual_location, 0, message);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[2]: *** [Makefile:226: expr.o] Error 1
make[2]: Leaving directory '/build/arm-none-eabi-gcc/src/build-gcc/build-aarch64-unknown-linux-gnu/libcpp'
make[1]: *** [Makefile:2907: all-build-libcpp] Error 2
make[1]: Leaving directory '/build/arm-none-eabi-gcc/src/build-gcc'
make: *** [Makefile:958: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /var/lib/aurbuild/aarch64/hugo/build
error: failed to build: failed to run: makechrootpkg -r /var/lib/aurbuild/aarch64 -D /var/lib/paru -d /var/cache/pacman/pkg/ -- -feA --noconfirm --noprepare --holdver:
')
WhyNotHugo
 
Posts: 1
Joined: Tue May 18, 2021 9:10 pm

Re: Failure trying to build arm-none-eabi-gcc (for qmk)

Postby solskogen » Wed Apr 20, 2022 10:44 am

You might want to look at my AUR package for powerpc: https://aur.archlinux.org/packages/powe ... -toolchain
In theory you should be able to just switch _arch from powerpc to arm
solskogen
 
Posts: 161
Joined: Mon Nov 18, 2013 10:41 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 5 guests