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

Issues compiling ARM on Ubuntu 18.04 #4209

Closed
drashna opened this issue Oct 22, 2018 · 10 comments
Closed

Issues compiling ARM on Ubuntu 18.04 #4209

drashna opened this issue Oct 22, 2018 · 10 comments
Labels
bug discussion question stale Issues or pull requests that have become inactive without resolution.

Comments

@drashna
Copy link
Member

drashna commented Oct 22, 2018

THere are some issues with the ARM library on Ubuntu 18.04, that cause it to error out.

Namely, this:
bbcmicrobit/micropython#514 (comment)

Downloading the "deb" files from the next build fixes the issues.

https://packages.ubuntu.com/cosmic/all/libnewlib-dev/download
https://packages.ubuntu.com/cosmic/all/libnewlib-arm-none-eabi/download

And running sudo dpkg -i .... fixes the issue though.

Do we want to and this to the build script for just 18.04?

@jackhumbert @skullydazed @fredizzimo

@MxBlu
Copy link
Contributor

MxBlu commented Feb 21, 2019

Would like to point out this is still valid a few months later 😆 WSL runs on 18.04 at the moment.

@tprk77
Copy link

tprk77 commented May 22, 2019

I ran into this yesterday. For others finding this issue, I got a bunch of errors like:

Linking: .build/massdrop_ctrl_default.elf                                                           [ERRORS]
 | 
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/rdimon-crt0.o: Conflicting CPU architectures 13/1
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/rdimon-crt0.o
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: .build/massdrop_ctrl_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-atexit.o) does not
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-atexit.o)
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: .build/massdrop_ctrl_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-exit.o) does not
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-exit.o)
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: .build/massdrop_ctrl_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-fini.o) does not
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-fini.o)
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: .build/massdrop_ctrl_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-impure.o) does not
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-impure.o)
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: .build/massdrop_ctrl_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-init.o) does not
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-init.o)
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: .build/massdrop_ctrl_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-memcpy-stub.o) does not
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-memcpy-stub.o)
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: .build/massdrop_ctrl_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-memset.o) does not
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-memset.o)
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: error: .build/massdrop_ctrl_default.elf uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-rand.o) does not
 | /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/libg.a(lib_a-rand.o)

The upstream Ubuntu bug has not been fixed.

Installing the new 18.10 packages resolved the issue.

Before:

$ dpkg -l "*newlib*" | grep ^ii | head -2
ii  libnewlib-arm-none-e 2.4.0.20160527- all             ...
ii  libnewlib-dev        2.4.0.20160527- all             ...

After:

$ dpkg -l "*newlib*" | grep ^ii | head -2
ii  libnewlib-arm-none-e 3.0.0.20180802- all             ...
ii  libnewlib-dev        3.0.0.20180802- all             ...

And now everything seems to be compiling fine.

It would have been nice if the setup script somehow took care of this. But I can't really think of a nice way to do that, since it involves downloading some "random" packages without signatures, etc.

Maybe the setup script could print a warning message?

@slashfoo
Copy link

I'm facing this issue while using debian 10, it uses newlib 3.3.0.

Would there be a way to work around this (easily) using LIBRARY_PATH or other environment variables?

@oars
Copy link

oars commented Apr 20, 2021

Same issue as @slashfoo when compiling for the moonlander

$ ~/qmk_firmware ±firmware20 » dpkg -l "*newlib*" | grep ^ii | head -2
ii  libnewlib-arm-none-eabi        3.3.0-1           all          C library and math library compiled for bare metal using Cortex A/R/M
ii  libnewlib-dev                  3.3.0-1           all          C library and math library intended for use on embedded systems

@uqs
Copy link

uqs commented Aug 7, 2021

Sorry for not helping much, but I too have build problems on Debian with 3.3.0-1 installed. I'm tying to build the default preonic/rev3 keymap.

@bbfsdev
Copy link

bbfsdev commented Nov 28, 2021

Any updates on this issue? Workarounds?

@MxBlu
Copy link
Contributor

MxBlu commented Nov 28, 2021

Any updates on this issue? Workarounds?

The workaround is in the opening post - download the .deb and install it directly (at your own risk, idk how much things have diverged since then).

@bbfsdev
Copy link

bbfsdev commented Nov 30, 2021

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs.
For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

@github-actions github-actions bot added the stale Issues or pull requests that have become inactive without resolution. label Jun 16, 2022
@tzarc
Copy link
Member

tzarc commented Jun 18, 2022

Workaround already known in the opening post, closing.

@tzarc tzarc closed this as completed Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug discussion question stale Issues or pull requests that have become inactive without resolution.
Projects
None yet
Development

No branches or pull requests

8 participants