I would like to have both toolchains (gcc-arm-embedded and arm-non-aebi) parallely installed in my ubunut environment. First one is needed for the Paparazzi and second one for the PX4 software. What should I do?

Asked by Gabriel König

The following error messages occurs, trying to install the Paparazzi dependencies.

Preparing to unpack .../gcc-arm-embedded_7-2017q4-1~xenial2_amd64.deb ...
Unpacking gcc-arm-embedded (7-2017q4-1~xenial2) ...
dpkg: error processing archive /var/cache/apt/archives/gcc-arm-embedded_7-2017q4-1~xenial2_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/arm-none-eabi-readelf', which is also in package binutils-arm-none-eabi 2.26-4ubuntu1+8
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can I keep the arm-non-eabi or do I need to remove it?

Thanks for your help?

Question information

English Edit question
GNU Arm Embedded Toolchain Edit question
No assignee Edit question
Solved by:
Thomas Preud'homme
Last query:
Last reply:
Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :

Hi Gabriel,

TL;DR: you should only need one of those toolchain

The gcc-arm-embedded package in our PPA targets arm-none-eabi as well. I'm guessing the one you already have installed is the standard Ubuntu one which is based on the same source tarballs as the one we provide in our PPA. The one in our PPA might be one version ahead since new releases are uploaded in the PPA at the same time as we release a new version of the GNU Arm Embedded toolchain. If you wish to use the PPA toolchain (eg. if you need something more recent) you will have to remove the gcc-arm-none-eabi, binutils-arm-none-eabi, gdb-arm-none-eabi and libnewlib-arm-none-eabi packages first.

Revision history for this message
Gabriel König (flyrex03) said :

Hi Thomas

Thank you for the fast response.

The thing is that I need for the PX4 (resp. for the NuttX-based Hardware) a specified arm-non-eabi version.
See description (https://dev.px4.io/en/setup/dev_env_linux_ubuntu.html#nuttx-based-hardware).
I know that I removed already once in the past the arm embedded ppa, as the manual also demands:
sudo add-apt-repository --remove ppa:team-gcc-arm-embedded/ppa

Thus my question would be, can I install the arm-embedded-toolchain, wich has the source tarballs for the desired gcc-arm-none-eabi-7-2017-q4 version. Thus is it possible to change the arm-none-eabi version after installing the gcc-arm-embedded package?


Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :

Hi Gabriel,

I've followed your link with interest and from what I can see after a quick look the toolchain the script downloads seems to be exactly the same as the latest version in our PPA. Therefore I'm not sure why the instruction requires removing the PPA as being a too old version.

That said, assuming this is a custom toolchain with extra things in it (and if it is I'd recommend them to get in touch with us) you can install our tarball anywhere in your computer and play with PATH to select the toolchain you actually want to use. That is, you could install one toolchain in /usr/local/nuttx and another one in /usr/local/gnu-arm-embedded-official and put the right folder in your PATH to select the toolchain you want to use.

Best regards.

Revision history for this message
Best Thomas Preud'homme (thomas-preudhomme) said :

I've checked the SHA1 of the toolchain being downloaded and it is the same as the one we propose at [1].

[1] https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2?revision=375265d4-e9b5-41c8-bf23-56cbe927e156?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,7-2017-q4-major

So there's no need to remove anything and execute that script. You can use the PPA for NuttX, it isthe very same software

Revision history for this message
Gabriel König (flyrex03) said :

Thanks Thomas Preud'homme, that solved my question.