ubuntu 17.10 uneable update to latest release

Bug #1745143 reported by demiurg_spb
74
This bug affects 15 people
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
Won't Fix
Low
Thomas Preud'homme

Bug Description

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done

The following packages will be upgraded:
  gcc-arm-embedded
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/68.4 MB of archives.
After this operation, 19.6 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 416210 files and directories currently installed.)
Preparing to unpack .../gcc-arm-embedded_7-2017q4-1~artful2_amd64.deb ...
Unpacking gcc-arm-embedded (7-2017q4-1~artful2) over (6-2017q2-1~zesty1) ...
dpkg: error processing archive /var/cache/apt/archives/gcc-arm-embedded_7-2017q4-1~artful2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/libcc1.so.0.0.0', which is also in package gcc-avr 1:5.4.0+Atmel3.6.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/gcc-arm-embedded_7-2017q4-1~artful2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

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

Hi,

Thanks for the bug report. That's a bug in the packaging indeed. That file ought to be in host-specific path like the native compiler does (/usr/lib/gcc/x86_64-linux-gnu/5/libcc1.so) and probably in a toolchain specific path (ie. gcc-arm-embedded should appear in the path). We'll look into that but that might have to wait for next release so that we can properly validate the change.

Best regards.

Changed in gcc-arm-embedded:
assignee: nobody → Thomas Preud'homme (thomas-preudhomme)
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Nabil Elqatib (marrakchino) wrote :

Hi ,

As of today, I faced the same issue. Is there any update?

Best.

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

Hi Nabil,

We are evaluating the extent of the changes needed and the risk associated with them Vs the impact of that bug. Depending on that analysis we might decide to wait for the next major release to fix it.

Best regards.

Revision history for this message
demiurg_spb (demiurg-spb-h) wrote :

Uneable to install gcc-arm-embedded_7-2018q2 to Ubuntu 18.04.1 LTS

dpkg: error processing archive /var/cache/apt/archives/gcc-arm-embedded_7-2018q2-1~bionic1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/libcc1.so.0.0.0', which is also in package gcc-avr 1:5.4.0+Atmel3.6.0-1

Revision history for this message
Austin (austin-h) wrote :

I see the same error when trying to install `gcc-avr` on a Ubuntu-18.04 system with `gcc-arm-embedded` already installed.

Revision history for this message
Josh Savage (joshysav) wrote :

Probably not the best solution. But I managed to get around this issue by force installing gcc-avr:

sudo dpkg --force-all -i /var/cache/apt/archives/gcc-avr_1%3a5.4.0+Atmel3.6.0-1build1_amd64.deb

Revision history for this message
Austin (austin-h) wrote :

Definitely non-ideal, but a reasonable workaround in the short term. FWIW I did it in the opposite order (uninstalling gcc-arm-embedded, installing gcc-avr, installing gcc-arm-embedded with --force-all hack) -- in my case, it's more important that my ARM installation work reliably than it is my AVR one do so.

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

The problem only occurs when installing several toolchains from PPA or tarball since Ubuntu-provided toolchain have their own path. The solution would require to put the relevant files in a path specific to the toolchain being installed. Beside the work needed to do the change and test it, it makes the PPA a bit more different from our tarball release which is not a very desirable feature. You can avoid this issue by installing from tarball since this can be extracted into any directory.

Best regards,

Thomas

Revision history for this message
Austin (austin-h) wrote :

> The problem only occurs when installing several toolchains from PPA or tarball...

That's not my case. gcc-avr is not being installed from a PPA, it's being installed from the default Ubuntu 18.04 repositories.

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

My bad, yes indeed. I checked the File listing for the all packages and gcc-avr is the only one having libcc1 in /usr/lib. All other GCC native and cross-compilers have it in another path. I still think that we should have things under /usr/lib/gcc-arm-embedded instead of /usr/lib to avoid that sort of issues.

Revision history for this message
Kees Bakker (keestux) wrote :

Can this get a higher Importance? A lot of embedded developers
have to deal with multiple embedded toolchains, including AVR
and ARM. Today, the only solution is to not install gnu-arm-embedded
and to unpack a tar file instead.

It's a pity that it keeps being pushed forward.

Revision history for this message
Matthias Kubisch (kubisch-informatik) wrote :

Hello,
it would be highly appreciated if this could be fixed soon. In the meantime, is there a definite work-around without corrupting neither AVR nor ARM builds?
Is the "--force" hack producing valid builds for either platform?

Thanks for caring.
Best regards
Matthias

Revision history for this message
rew (r-e-wolff) wrote :

Hello,
It would be very useful if this could be fixed soon-ish. Whereas the gcc-arm from standard ubuntu-16.04 worked great, the one in 18.04 does not and the ARM guys recommend installing the ARM pushed version from a PPA. Sure I would like to have the one in the ubuntu repositories to work, but it does not generate working binaries for me.

Revision history for this message
alm (alm) wrote :

As a workaround to make gcc-avr from the Ubuntu repository co-exist with the latest gcc-arm-embedded, I added the following diversions to move the files installed by gcc-avr to /usr/lib/gcc/avr/5.4.0:
dpkg-divert --package gcc-arm-embedded --divert /usr/lib/gcc/avr/5.4.0/libcc1.so --rename /usr/lib/libcc1.so
dpkg-divert --package gcc-arm-embedded --divert /usr/lib/gcc/avr/5.4.0/libcc1.so.0 --rename /usr/lib/libcc1.so.0
dpkg-divert --package gcc-arm-embedded --divert /usr/lib/gcc/avr/5.4.0/libcc1.la --rename /usr/lib/libcc1.la
dpkg-divert --package gcc-arm-embedded --divert /usr/lib/gcc/avr/5.4.0/libcc1.so.0.0.0 --rename /usr/lib/libcc1.so.0.0.0

On Ubuntu 18.04, this allowed me to install gcc-arm-embedded 7-2018q2-1~bionic1 on top of the Ubuntu repository version of gcc-avr 5.4.0+Atmel3.6.0-1build1. This should be less risky than using --force, and should survive upgrades of either gcc-arm-embedded of gcc-avr (as long as they don't bump the version of gcc-avr). I have not tested the gcc-avr toolchain yet after this modification.

Revision history for this message
Rogier Lodewijks (rogier-f) wrote :

@alm

Used and tried your dpkg-divert method (new command learned today :)) and seemed to work in my n=1 test for both ARM and AVR platforms. (RIOT-OS hello_world example built successful on both platforms)

Revision history for this message
Joey Ye (jinyun-ye) wrote :

As we are dropping the support of PPA. We won't fix this PPA related issue.

Changed in gcc-arm-embedded:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.