Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "standalone pacman" compile errors with gcc >9.2.1 #2223

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

NotherNgineer
Copy link
Contributor

@NotherNgineer NotherNgineer commented Aug 14, 2024

Since the introduction of standalone pacman app in PR #2145, it's been impossible to build Mayhem firmware with any compiler version above 9.2.1. (Yes I realize that 9.2.1 is the "official" build version but I prefer the warning message versus strange compiler errors below.)

This command line switch resolves the issue, and is already being used in the cmake file when building applications so there should be no adverse affects.

Thanks to @Brumi-2021 for this fix.

BTW, this is what the errors look like without this fix:
/opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libg_nano.a(lib_a-writer.o): in function _write_r':
writer.c:(.text._write_r+0x10): undefined reference to _write' /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libg_nano.a(lib_a-closer.o): in function _close_r':
closer.c:(.text._close_r+0xc): undefined reference to _close' /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libg_nano.a(lib_a-fstatr.o): in function _fstat_r':
fstatr.c:(.text._fstat_r+0xe): undefined reference to _fstat' /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libg_nano.a(lib_a-isattyr.o): in function _isatty_r':
isattyr.c:(.text._isatty_r+0xc): undefined reference to _isatty' /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libg_nano.a(lib_a-lseekr.o): in function _lseek_r':
lseekr.c:(.text._lseek_r+0x10): undefined reference to _lseek' /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: /opt/build/armbin/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libg_nano.a(lib_a-readr.o): in function _read_r':
readr.c:(.text._read_r+0x10): undefined reference to _read' collect2: error: ld returned 1 exit status make[2]: *** [firmware/standalone/pacman/CMakeFiles/pacman_app.elf.dir/build.make:114: firmware/standalone/pacman/pacman_app.elf] Error 1 make[1]: *** [CMakeFiles/Makefile2:2095: firmware/standalone/pacman/CMakeFiles/pacman_app.elf.dir/all] Error 2

@NotherNgineer
Copy link
Contributor Author

This same fix is also in PR #2224 but that PR is currently in Draft state.

@gullradriel
Copy link
Member

So what's the plan ?
Which one first ?

Copy link
Member

@gullradriel gullradriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go

@gullradriel
Copy link
Member

Hmm as the other one is a draft, we will ask @Brumi-2021 to fix his branch if a conflict arise.

@gullradriel gullradriel merged commit c992780 into portapack-mayhem:next Aug 15, 2024
3 checks passed
@Brumi-2021
Copy link
Contributor

Brumi-2021 commented Aug 15, 2024

Do not worry , as it is already merged here ,
I will remove that part from my yesterday's DRAFT PR .
And at the same time , I will also re-activate again the error when the compiled binary size is > 1MB flash .
Thanks to all checkers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants