Installing libsoup2.4-dev:armhf removes native libsoup2.4-dev and vice versa

Asked by Evgeni Shishlannikov on 2020-01-10

Hello,

My configuration is:

Ubuntu 19.10
x86_64 GNU/Linux

I am cross-compiling for armhf architecture.
When I install libsoup2.4-dev:armhf (sudo apt-get install libsoup2.4-dev:armhf), it removes the native libsoup2.4-dev. Then I can compile for the target device.
In order to compile for the host, I need to install the native libsoup2.4-dev (sudo apt-get install libsoup2.4-dev).

So, each time I switch between compilations to the target or the host, I need to install the appropriate libsoup2.4-dev.

This does not happen for libglib-2.0, libsqlite3, libarchive and several other libraries that I use to compile my application for the native and the armhf architectures(I have them installed for two architectures).

For the armhf I have the following repos in my /etc/apt/source.list file:

deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ eoan main universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ eoan-updates main universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ eoan-backports main universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ eoan-security main universe

Wha tshoudl I do in order to eliminate the need to reinstall libsoup each time I switch the architecture?

Thanks in advance,
Eugene.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu libsoup2.4 Edit question
Assignee:
No assignee Edit question
Last query:
2020-01-11
Last reply:
2020-01-19
Manfred Hampl (m-hampl) said : #1

Which message do you receive for the command

sudo apt-get install libsoup2.4-dev:armhf libsoup2.4-dev

Hello Manfred,

I ran the command you asked me to run, but before that, I have uninstalled my current libsoup2.4-dev (which was armhf).
So, running the command you asked me to run, I narrowed the issue down to the actual library that causes the incompatibility.

This library is libbrotli-dev.

Here is the whole sequence of the command I have ran:

eugene@eugene-ThinkPad-T440s:~$ sudo apt-get remove libsoup2.4-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-soup-2.4:armhf glib-networking:armhf icu-devtools libbrotli-dev
  libbrotli1:armhf libgmp10:armhf libgnutls30:armhf libgssapi-krb5-2:armhf
  libhogweed4:armhf libicu-dev libicu-dev:armhf libk5crypto3:armhf
  libkeyutils1:armhf libkrb5-3:armhf libkrb5support0:armhf libp11-kit0:armhf
  libproxy1v5:armhf libpsl-dev libpsl-dev:armhf libpsl5:armhf
  libsoup-gnome2.4-1:armhf libsoup2.4-1:armhf libsqlite3-dev:armhf
  libssl1.1:armhf libtasn1-6:armhf libxml2-dev libxml2-dev:armhf
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libsoup2.4-dev
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
After this operation, 1,732 kB disk space will be freed.
Do you want to continue? [Y/n] y

eugene@eugene-ThinkPad-T440s:~$ sudo apt-get install libsoup2.4-dev:armhf libsoup2.4-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 libsoup2.4-dev : Depends: libbrotli-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

eugene@eugene-ThinkPad-T440s:~$ sudo apt-get install libbrotli-dev:armhf libbrotli-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libbrotli-dev is already the newest version (1.0.7-2).
libbrotli-dev set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 libbrotli-dev : Conflicts: libbrotli-dev:armhf but 1.0.7-2 is to be installed
 libbrotli-dev:armhf : Conflicts: libbrotli-dev but 1.0.7-2 is to be installed
E: Unable to correct problems, you have held broken packages.

eugene@eugene-ThinkPad-T440s:~$ sudo apt-get remove libbrotli-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-soup-2.4:armhf glib-networking:armhf icu-devtools libbrotli1:armhf libgmp10:armhf libgnutls30:armhf libgssapi-krb5-2:armhf
  libhogweed4:armhf libicu-dev libicu-dev:armhf libk5crypto3:armhf libkeyutils1:armhf libkrb5-3:armhf libkrb5support0:armhf
  libp11-kit0:armhf libproxy1v5:armhf libpsl-dev libpsl-dev:armhf libpsl5:armhf libsoup-gnome2.4-1:armhf libsoup2.4-1:armhf
  libsqlite3-dev:armhf libssl1.1:armhf libtasn1-6:armhf libxml2-dev libxml2-dev:armhf
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libbrotli-dev
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
After this operation, 67.6 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 170253 files and directories currently installed.)
Removing libbrotli-dev (1.0.7-2) ...

eugene@eugene-ThinkPad-T440s:~$ sudo apt-get install libbrotli-dev:armhf libbrotli-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 libbrotli-dev : Conflicts: libbrotli-dev:armhf but 1.0.7-2 is to be installed
 libbrotli-dev:armhf : Conflicts: libbrotli-dev but 1.0.7-2 is to be installed
E: Unable to correct problems, you have held broken packages.
eugene@eugene-ThinkPad-T440s:~$

AFTER this I ran the following command and found that libbrotli binaries aren't completely uninstalled:
eugene@eugene-ThinkPad-T440s:~$ find /usr/ -name "*libbrotli*"
/usr/lib/arm-linux-gnueabihf/libbrotlicommon.so.1
/usr/lib/arm-linux-gnueabihf/libbrotlicommon.so.1.0.7
/usr/lib/arm-linux-gnueabihf/libbrotlidec.so.1.0.7
/usr/lib/arm-linux-gnueabihf/libbrotlienc.so.1
/usr/lib/arm-linux-gnueabihf/libbrotlienc.so.1.0.7
/usr/lib/arm-linux-gnueabihf/libbrotlidec.so.1
/usr/lib/x86_64-linux-gnu/libbrotlicommon.so.1
/usr/lib/x86_64-linux-gnu/libbrotlicommon.so.1.0.7
/usr/lib/x86_64-linux-gnu/libbrotlidec.so.1.0.7
/usr/lib/x86_64-linux-gnu/libbrotlienc.so.1
/usr/lib/x86_64-linux-gnu/libbrotlienc.so.1.0.7
/usr/lib/x86_64-linux-gnu/libbrotlidec.so.1
/usr/share/lintian/overrides/libbrotli1
/usr/share/doc/libbrotli1

Thanks in advance!

Manfred Hampl (m-hampl) said : #3

ok, the root cause is that two different architecture versions of libbrotli-dev (and probably libbrotli1) cannot be installed at the same time.

This should probably be reported in the Debian bug tracker.

Maybe it works when adding "Multiarch: same" to the control files of the *brotli* packages.

Hi Manfred,

Frankly speaking, I have no idea about reporting bugs in the Debian bug tracker and have a very limited time to investigate this topic (I am a newbie to all this Linux stuff).
Can you, please, share here a link to the instructions on how to report?

Thanks in advance!

Manfred Hampl (m-hampl) said : #5

Instructions how to report bugs in Debian: https://www.debian.org/Bugs/Reporting (available in several languages).

Manfred Hampl (m-hampl) said : #6

Ok. I found time to play around on a test system, and this is what I conclude:

If you add "Multi-Arch: same" to the control files in the libbrotli-dev packages, then you can install the packages for both architectures at the same time.

What I did (I tried for amd64 and i386, but I assume the same will be valid for amd64 and armhf):

Download the packages libbrotli-dev_1.0.7-2_amd64.deb and libbrotli-dev_1.0.7-2_i386.deb (for you would be armhf)
Issue the commands

fakeroot
mkdir tmp
dpkg-deb -R libbrotli-dev_1.0.7-2_amd64.deb tmp
nano tmp/DEBIAN/control # remark below
dpkg-deb -b tmp libbrotli-dev_1.0.7-2~1_amd64.deb
rm -r tmp
exit

fakeroot
mkdir tmp
dpkg-deb -R libbrotli-dev_1.0.7-2_i386.deb tmp # armhf for you
nano tmp/DEBIAN/control # remark below
dpkg-deb -b tmp libbrotli-dev_1.0.7-2~1_i386.deb # armhf for you
rm -r tmp
exit

sudo dpkg -i libbrotli-dev_1.0.7-2~1_*

Remark from above:
nano will give a warning when starting, but just press enter.
Add the line "Multi-Arch: same" somewhere, e.g. above the "Homepage..." line, then press ctrl-o and enter and ctrl-x

This is a "quick and dirty" approach. I cannot tell whether libbrotli will work afterwards.
The correct solution is creating bug reports to get a correct multiarch capability in the libbrotli packages.

Can you help with this problem?

Provide an answer of your own, or ask Evgeni Shishlannikov for more information if necessary.

To post a message you must log in.