Bionic updates break upgrade (apt remove libc6-armhf-cross first)

Bug #1797557 reported by TJ
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
cross-toolchain-base (Ubuntu)
Triaged
High
Matthias Klose

Bug Description

WORK AROUND: first, uninstall libc6-armhf-cross and libc6-armel-cross, then re-install the cross compiler package.

As I reported in comments on the end of Bug #1769657 "update toolchain packages for bionic" on 5th October 2018 the updates have broken the ability to upgrade package(s). Specifically, the 'dpkg --unpack' stage breaks because, from what I can tell, some of the .dpkg-new files are being deleted before they are due to be renamed:

$ sudo dpkg --unpack /var/cache/apt/archives/libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb |& tee /tmp/dpkg-unpack.log
(Reading database ... 406492 files and directories currently installed.)
Preparing to unpack .../libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb ...
Unpacking libc6-armhf-cross (2.27-3ubuntu1cross1.1) over (2.27-3ubuntu1cross1) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabihf/lib/ld-2.27.so.dpkg-new': No such file or directory
Errors were encountered while processing:
 /var/cache/apt/archives/libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb

$ sudo dpkg --unpack /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb |& tee /tmp/dpkg-unpack.log
(Reading database ... 406492 files and directories currently installed.)
Preparing to unpack .../libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb ...
Unpacking libc6-dev-armhf-cross (2.27-3ubuntu1cross1.1) over (2.27-3ubuntu1cross1) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabihf/lib/Mcrt1.o.dpkg-new': No such file or directory
Errors were encountered while processing:
 /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb

$ apt-cache policy libc6-armhf-cross
libc6-armhf-cross:
  Installed: 2.27-3ubuntu1cross1
  Candidate: 2.27-3ubuntu1cross1.1
  Version table:
     2.27-3ubuntu1cross1.1 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
 *** 2.27-3ubuntu1cross1 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main i386 Packages
        100 /var/lib/dpkg/status

I've analysed both failures using a combination of 'dpkg --debug 77777', strace, and inotifywait, but I've not familiar enough with the dpkg logic to determine what is going wrong.

I'm attaching debug, strace and inotifywait logs for 'libc6-armhf-cross' where 'ld-2.27.so.dpkg-new' appears to be the problem.

Revision history for this message
TJ (tj) wrote :
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

I confirm this locally, the package is not upgradeable due to (I think) the switch of ./usr/arm-linux-gnueabi/libhf/ from a symlink to a directory not being managed correctly.

Matthias, this is an SRU regression since it breaks upgrades of the package. Can you please follow through?

tags: added: regression-update
Changed in cross-toolchain-base (Ubuntu):
importance: Undecided → High
status: New → Triaged
assignee: nobody → Matthias Klose (doko)
Revision history for this message
Kunaparaju Venkata Kalyan (kvkdileep) wrote :

Iam also facing the same issue, My desktop got freezed after log-in. I went to recovery mode and tried to install all the dependencies I came across the same issue after upgrade to 18.04

Revision history for this message
Matthias Klose (doko) wrote :

yes, and I'm unsure that I want to fix that. You can work around that by uninstalling libc6-armhf-corss, and re-installing the armhf cross compilers. Is this a feasible option for such a development package?

Matthias Klose (doko)
summary: - Bionic updates break upgrade/install/unpack
+ Bionic updates break upgrade (apt remove libc6-armhf-cross first)
Revision history for this message
TJ (tj) wrote :

Removing the package causes a lot of churn even on a minimal cross-build install:

$ sudo apt remove libc6-armhf-cross
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  binutils-arm-linux-gnueabihf cpp-7-arm-linux-gnueabihf cpp-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf-base
  gcc-7-arm-linux-gnueabihf-base gcc-7-cross-base gcc-8-cross-base linux-libc-dev-armhf-cross
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
  g++-7-arm-linux-gnueabihf g++-arm-linux-gnueabihf gcc-7-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libasan4-armhf-cross
  libatomic1-armhf-cross libc6-armhf-cross libc6-dev-armhf-cross libcilkrts5-armhf-cross libgcc-4.7-dev-armhf-cross
  libgcc-7-dev-armhf-cross libgcc1-armhf-cross libgomp1-armhf-cross libstdc++-7-dev-armhf-cross libstdc++6-4.7-dev-armhf-cross
  libstdc++6-armhf-cross libubsan0-armhf-cross
0 to upgrade, 0 to newly install, 17 to remove and 0 not to upgrade.
After this operation, 79.2 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

With 93 packages listed directly as reverse-depends it has the potential to make quite a mess.

Revision history for this message
Matthias Klose (doko) wrote :

"it has the potential to make quite a mess"

why? it's just a re-install.

Revision history for this message
Brian Murray (brian-murray) wrote :

I'm not sure I understand how people are supposed to deal with this situation. Are they supposed to uninstall libc6-armhf-cross before upgrading? How would they know to uninstall it?

Additionally, when you receive the following error messages its not really clear what the way forward is.

Unpacking libc6-dev-armhf-cross (2.27-3ubuntu1cross1.1) over (2.27-3ubuntu1cross1) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabihf/lib/Mcrt1.o.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Preparing to unpack .../libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb ...
Unpacking libc6-armhf-cross (2.27-3ubuntu1cross1.1) over (2.27-3ubuntu1cross1) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabihf/lib/ld-2.27.so.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Errors were encountered while processing:
 /var/cache/apt/archives/libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb
 /var/cache/apt/archives/libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Matthias Klose (doko) wrote :

> I'm not sure I understand how people are supposed to deal
> with this situation. Are they supposed to uninstall
> libc6-armhf-cross before upgrading? How would they know
> to uninstall it?

by reading the subject line of this issue? Now added as a work around in the bug description as well.

description: updated
Revision history for this message
jonathan chetwynd (peepo-com) wrote :

I would just like to remove, but have not found a way.
Please could you help?

 sudo apt remove libc6-armhf-cross
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
 libasan2-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not going to be installed
 libasan4-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not going to be installed
 libatomic1-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not going to be installed
 libc6-dev-armhf-cross : Depends: libc6-armhf-cross (= 2.23-0ubuntu3cross1) but it is not going to be installed
 libcilkrts5-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not going to be installed
 libgcc1-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not going to be installed
 libgomp1-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not going to be installed
 libstdc++6-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not going to be installed
 libubsan0-armhf-cross : Depends: libc6-armhf-cross (>= 2.27) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Revision history for this message
jonathan chetwynd (peepo-com) wrote :

to understand how annoying this has become,
when I try to install Synaptic Package Manager
error while installing package: unqble to open
'/usr/arm-linux-gnueabihf/lib/Mcrt1.odpkg-new

yet there is no obvious (to me) reason this is related in any way at all.

tx

Revision history for this message
Arglebargle (arglebargle) wrote :

How exactly do I fix this mess? My cross-build VM is basically fucked after upgrading to Bionic.

Revision history for this message
Stephen Boylan (sboylan) wrote :
Download full text (7.5 KiB)

The work around listed doesn't work and I'm completely unable to use apt in order to install packages.

I uninstalled the libc6-armhf-cross and libc6-armel-cross, then I used "sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev" to reinstall the cross compiler.

This is the output of that command...

sudo apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libncurses5-dev is already the newest version (6.1-1ubuntu1.18.04).
binutils-arm-linux-gnueabi is already the newest version (2.30-21ubuntu1~18.04).
The following packages were automatically installed and are no longer required:
  account-plugin-facebook account-plugin-flickr account-plugin-google account-plugin-identica account-plugin-twitter cgmanager
  cpp-5-arm-linux-gnueabi deja-dup-backend-gvfs dh-python dleyna-server doxygen evolution-data-server-online-accounts fonts-stix
  g++-5 gcc-5-arm-linux-gnueabi gcc-5-arm-linux-gnueabi-base gcc-5-base:i386 gcc-5-cross-base gcc-6-base gcc-6-base:i386
  geoip-database-extra gir1.2-camel-1.2 gir1.2-ebook-1.2 gir1.2-ebookcontacts-1.2 gir1.2-edataserver-1.2 gir1.2-messagingmenu-1.0
  gir1.2-networkmanager-1.0 gyp hardening-includes imagemagick-common libaccount-plugin-1.0-0 libaccount-plugin-generic-oauth
  libaccount-plugin-google libaccounts-qt5-1 libandroid-properties1 libapparmor-perl libappstream3 libasan2-armel-cross
  libautodie-perl libbabeltrace-ctf1 libbind9-140 libblas-common libboost-date-time1.58.0 libboost-filesystem1.58.0
  libboost-iostreams1.58.0 libboost-random1.58.0 libboost-system1.58.0 libboost-thread1.58.0 libcamel-1.2-54 libcap2:i386
  libcapnp-0.5.3 libcapnp-0.6.1 libcgmanager0 libclang1-3.6 libclang1-6.0 libcloog-isl4 libclutter-gst-2.0-0 libcolamd2.9.1
  libcomerr2:i386 libdata-alias-perl libdleyna-connector-dbus-1.0-1 libdleyna-core-1.0-3 libdns-export162 libdns162 libebook-1.2-16
  libedataserver-1.2-21 libedataserverui-1.2-1 libefivar0 libfcitx-gclient0 libfreerdp-cache1.1 libfreerdp-client1.1
  libfreerdp-codec1.1 libfreerdp-core1.1 libfreerdp-crypto1.1 libfreerdp-gdi1.1 libfreerdp-locale1.1 libfreerdp-primitives1.1
  libfwup0 libfwupd1 libgcc-5-dev-armel-cross libgfortran3 libgfortran4 libglew1.13 libgnome-desktop-3-12 libgom-1.0-common
  libgrilo-0.2-1 libgtkspell3-3-0 libgupnp-av-1.0-2 libgupnp-dlna-2.0-3 libgweather-3-6 libhardware2 libhud2 libhybris
  libhybris-common1 libical1a libicu55:i386 libisc-export160 libisc160 libisccc140 libisccfg140 libiscsi2 libjs-async
  libjs-inherits libjs-node-uuid libjs-openlayers libjs-underscore libkadm5clnt-mit9 liblapack3 libllvm3.6v5 libllvm5.0 libllvm6.0
  liblouis9 liblouisutdml6 liblwres141 libmedia1 libmirclient9 libmircommon7 libmircore1 libmirprotobuf3 libnma-common
  libobjc-5-dev libobjc4 liborcus-0.10-0v5 libp11-kit-gnome-keyring libpackagekit-glib2-16 libpoppler58 libprocps4
  libprotobuf-lite10 libprotobuf-lite9v5 libprotobuf9v5 libprotoc9v5 libpython3.5 libpython3.5-minimal libpython3.5-stdlib
  libqt5feedback5 libqt5organizer5 libqt5positioning5 libqt5sensors5 libqt5w...

Read more...

Revision history for this message
Kyle (thorrr) wrote :

I had the exact same symptoms as sboylan above, and brute-force fixed this issue by running

sudo dpkg -P --force-depends libc6-armel-cross libc6-armhf-cross libc6-dev-armel-cross libc6-dev-armhf-cross libasan2-armhf-cross libatomic1-armhf-cross libgcc1-armhf-cross libgomp1-armhf-cross libstdc++-4.8-dev-armhf-cross libstdc++-5-dev-armhf-cross libstdc++6-armhf-cross libubsan0-armhf-cross

then running

sudo apt --fix-broken install

Revision history for this message
Dizaster (eastendmumbles) wrote :
Download full text (4.2 KiB)

Ive had this same problem for awhile now and I still can't get this fixed nor can i install anything because the everything is broken over this. and kyle i tried yous here in a last hope and i get

electing previously unselected package libc6-armhf-cross.
(Reading database ... 561956 files and directories currently installed.)
Preparing to unpack .../0-libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb ...
Unpacking libc6-armhf-cross (2.27-3ubuntu1cross1.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QUc6l1/0-libc6-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabihf/lib/ld-2.27.so.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Selecting previously unselected package libgcc1-armhf-cross.
Preparing to unpack .../1-libgcc1-armhf-cross_1%3a8.3.0-6ubuntu1~18.04.1cross1_all.deb ...
Unpacking libgcc1-armhf-cross (1:8.3.0-6ubuntu1~18.04.1cross1) ...
Selecting previously unselected package libstdc++6-armhf-cross.
Preparing to unpack .../2-libstdc++6-armhf-cross_8.3.0-6ubuntu1~18.04.1cross1_all.deb ...
Unpacking libstdc++6-armhf-cross (8.3.0-6ubuntu1~18.04.1cross1) ...
Selecting previously unselected package libc6-dev-armhf-cross.
Preparing to unpack .../3-libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb ...
Unpacking libc6-dev-armhf-cross (2.27-3ubuntu1cross1.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QUc6l1/3-libc6-dev-armhf-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabihf/lib/Mcrt1.o.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Selecting previously unselected package libatomic1-armhf-cross.
Preparing to unpack .../4-libatomic1-armhf-cross_8.3.0-6ubuntu1~18.04.1cross1_all.deb ...
Unpacking libatomic1-armhf-cross (8.3.0-6ubuntu1~18.04.1cross1) ...
Selecting previously unselected package libgomp1-armhf-cross.
Preparing to unpack .../5-libgomp1-armhf-cross_8.3.0-6ubuntu1~18.04.1cross1_all.deb ...
Unpacking libgomp1-armhf-cross (8.3.0-6ubuntu1~18.04.1cross1) ...
Selecting previously unselected package libubsan0-armhf-cross.
Preparing to unpack .../6-libubsan0-armhf-cross_7.4.0-1ubuntu1~18.04.1cross1_all.deb ...
Unpacking libubsan0-armhf-cross (7.4.0-1ubuntu1~18.04.1cross1) ...
Selecting previously unselected package libc6-armel-cross.
Preparing to unpack .../7-libc6-armel-cross_2.27-3ubuntu1cross1.1_all.deb ...
Unpacking libc6-armel-cross (2.27-3ubuntu1cross1.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-QUc6l1/7-libc6-armel-cross_2.27-3ubuntu1cross1.1_all.deb (--unpack):
 unable to open '/usr/arm-linux-gnueabi/lib/ld-2.27.so.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Selecting previously unselected package libc6-dev-armel-...

Read more...

Revision history for this message
Dizaster (eastendmumbles) wrote :

i'm considering backing up all my data and reinstalling ubuntu completely as this appears to be the last and only option

Revision history for this message
Shivam Gupta (xgupta) wrote :

Does the issue resolved I am getting the similar problem. And suggested solutions didn't work.
And I am on a remote server through ssh so can't back up data & reinstall everything.

If there is no solution please retire Ubuntu.

Revision history for this message
Steve Langasek (vorlon) wrote :

> Does the issue resolved I am getting the similar problem. And suggested solutions didn't work.

There is a workaround suggested in the bug description. Did you try this? If it didn't work, what was the output?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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