0

I am trying to install libseccomp-dev:armhf (and arm64) on Ubuntu bionic (same on Xenial). I'm doing this because I would like to cross compile something that depends on libseccomp-dev.

This works fine on Ubuntu Focal, as well as Debian Stretch/Buster.

On Ubuntu Xenial and Bionic, attempting to install libseccomp-dev for a different CPU arch attempts to replace the entire C toolchain. Example output attaced at the bottom.

Is there something I can do to make this work, or is there a problem with the packaging for xenial and bionic?

btw, I do this by first setting all the default apt repos to be [arch=amd64], then dpkg --add-architecture armhf and append deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic main universe to the sources list.

root@7166f5911273:/# apt-get install libseccomp-dev:armhf
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 to resolve the situation:

The following packages have unmet dependencies:
 libseccomp-dev:armhf : Depends: libseccomp2:armhf (= 2.3.1-2.1ubuntu4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@7166f5911273:/# apt-get install libseccomp-dev:armhf libseccomp2:armhf 
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 to resolve the situation:

The following packages have unmet dependencies:
 libseccomp2:armhf : Depends: libc6:armhf (>= 2.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@7166f5911273:/# apt-get install libseccomp-dev:armhf libseccomp2:armhf libc6:armhf
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 to resolve the situation:

The following packages have unmet dependencies:
 libc6:armhf : Depends: libgcc1:armhf but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@7166f5911273:/# apt-get install libseccomp-dev:armhf libseccomp2:armhf libc6:armhf libgcc1:armhf
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 to resolve the situation:

The following packages have unmet dependencies:
 libgcc1:armhf : Depends: gcc-8-base:armhf (= 8-20180414-1ubuntu2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@7166f5911273:/# apt-get install libseccomp-dev:armhf libseccomp2:armhf libc6:armhf libgcc1:armhf gcc-8-base:armhf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  autotools-dev bash-completion binutils-common distro-info-data gcc-7-base git-man gnupg-l10n iso-codes krb5-locales libglib2.0-data libldap-common libmagic-mgc libx11-data linux-libc-dev manpages manpages-dev mime-support
  netbase publicsuffix python-apt-common vim-runtime
Use 'apt autoremove' to remove them.
Suggested packages:
  glibc-doc:armhf debconf:armhf | debconf-2.0:armhf locales:armhf seccomp:armhf
The following packages will be REMOVED:
  adduser apt at autoconf automake autopoint base-files base-passwd bash binutils binutils-x86-64-linux-gnu bsdmainutils bsdutils build-essential bzip2 ca-certificates coreutils cpp cpp-7 curl dash dctrl-tools debconf debhelper
  debianutils devscripts dh-autoreconf dh-strip-nondeterminism diffstat diffutils dirmngr dpkg dpkg-dev dput e2fsprogs equivs fakeroot fdisk file findutils g++ g++-7 gcc gcc-7 gcc-8-base gettext gettext-base git gnupg gnupg-utils
  gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grep groff-base gzip hostname init-system-helpers intltool-debian less libacl1 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libapt-inst2.0 libapt-pkg-perl libapt-pkg5.0 libarchive-cpio-perl libarchive-zip-perl libasan4 libasn1-8-heimdal libassuan0 libatomic1 libattr1 libaudit1 libauthen-sasl-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl
  libbinutils libblkid1 libbsd0 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcap-ng0 libcc1-0 libcgi-fast-perl libcgi-pm-perl libcilkrts5 libclass-accessor-perl libclass-method-modifiers-perl libclass-xsaccessor-perl
  libclone-perl libcom-err2 libcroco3 libcurl3-gnutls libcurl4 libdata-dump-perl libdata-optlist-perl libdb5.3 libdebconfclient0 libdevel-callchecker-perl libdevel-globaldestruction-perl libdigest-hmac-perl libdistro-info-perl
  libdpkg-perl libdynaloader-functions-perl libedit2 libemail-valid-perl libencode-locale-perl liberror-perl libexpat1 libexporter-tiny-perl libext2fs2 libfakeroot libfcgi-perl libfdisk1 libffi6 libfile-basedir-perl
  libfile-chdir-perl libfile-fcntllock-perl libfile-homedir-perl libfile-listing-perl libfile-stripnondeterminism-perl libfile-which-perl libfont-afm-perl libgcc-7-dev libgcc1 libgcrypt20 libgdbm-compat4 libgdbm5
  libgetopt-long-descriptive-perl libgit-wrapper-perl libglib2.0-0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgpgme11 libgpm2 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal
  libhogweed4 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl
  libhx509-5-heimdal libicu60 libidn2-0 libimport-into-perl libio-html-perl libio-pty-perl libio-socket-inet6-perl libio-socket-ssl-perl libio-string-perl libio-stringy-perl libipc-run-perl libipc-system-simple-perl libisl19
  libitm1 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 libldap-2.4-2 liblist-compare-perl liblist-moreutils-perl liblocale-gettext-perl liblsan0 libltdl-dev libltdl7 liblwp-mediatypes-perl
  liblwp-protocol-https-perl liblz4-1 liblzma5 libmagic1 libmail-sendmail-perl libmailtools-perl libmodule-implementation-perl libmodule-runtime-perl libmoo-perl libmount1 libmpc3 libmpdec2 libmpfr6 libmpx2 libnamespace-clean-perl
  libncurses5 libncursesw5 libnet-dns-perl libnet-domain-tld-perl libnet-http-perl libnet-ip-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnettle6 libnghttp2-14 libnpth0 libnumber-compare-perl libnumber-range-perl libp11-kit0
  libpackage-stash-perl libpackage-stash-xs-perl libpam-modules libpam-modules-bin libpam-runtime libpam0g libparams-classify-perl libparams-util-perl libparams-validate-perl libparse-debianchangelog-perl
  libpath-iterator-rule-perl libpath-tiny-perl libpcre3 libperl5.26 libperlio-gzip-perl libpipeline1 libpod-constants-perl libprocps6 libpsl5 libpython3-stdlib libpython3.6 libpython3.6-minimal libpython3.6-stdlib libquadmath0
  libreadline7 libregexp-pattern-license-perl libroken18-heimdal librole-tiny-perl librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libseccomp2 libselinux1 libsemanage1 libsepol1 libsigsegv2 libsmartcols1 libsocket6-perl
  libsort-key-perl libsort-versions-perl libsqlite3-0 libss2 libssl1.0.0 libssl1.1 libstdc++-7-dev libstdc++6 libstrictures-perl libstring-copyright-perl libstring-escape-perl libsub-exporter-perl libsub-exporter-progressive-perl
  libsub-identify-perl libsub-install-perl libsub-name-perl libsub-quote-perl libsys-hostname-long-perl libsystemd0 libtasn1-6 libtext-glob-perl libtext-levenshtein-perl libtimedate-perl libtinfo5 libtool libtry-tiny-perl libtsan0
  libubsan0 libudev1 libunicode-utf8-perl libunistring2 libunwind8 liburi-perl libuuid1 libvariable-magic-perl libwind0-heimdal libwww-perl libwww-robotrules-perl libx11-6 libxau6 libxcb1 libxdmcp6 libxext6 libxml-libxml-perl
  libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl libxml-simple-perl libxml2 libxmuu1 libyaml-0-2 libyaml-libyaml-perl libzstd1 licensecheck lintian login lsb-release m4
  make man-db mawk mount multiarch-support ncurses-bin openssh-client openssl passwd patch patchutils perl perl-base perl-modules-5.26 perl-openssl-defaults pinentry-curses po-debconf procps python3 python3-apt python3-certifi
  python3-chardet python3-debian python3-gpg python3-idna python3-magic python3-minimal python3-pkg-resources python3-requests python3-six python3-unidiff python3-urllib3 python3-xdg python3.6 python3.6-minimal readline-common sed
  shared-mime-info strace sysvinit-utils t1utils tar ucf unzip util-linux vim vim-common wdiff xauth xdg-user-dirs xxd xz-utils zlib1g
The following NEW packages will be installed:
  gcc-8-base:armhf libc6:armhf libgcc1:armhf libseccomp-dev:armhf libseccomp2:armhf
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt adduser (due to apt) gpgv (due to apt) libapt-pkg5.0 (due to apt) libc6 (due to apt) libgcc1 (due to apt) libgnutls30 (due to apt) libseccomp2 (due to apt) libstdc++6 (due to apt) base-files base-passwd
  libdebconfclient0 (due to base-passwd) bash libtinfo5 (due to bash) debianutils (due to bash) bsdutils libsystemd0 (due to bsdutils) coreutils libacl1 (due to coreutils) libattr1 (due to coreutils) libselinux1 (due to coreutils)
  dash dpkg (due to dash) diffutils libbz2-1.0 (due to dpkg) liblzma5 (due to dpkg) libzstd1 (due to dpkg) zlib1g (due to dpkg) tar (due to dpkg) e2fsprogs libblkid1 (due to e2fsprogs) libcom-err2 (due to e2fsprogs)
  libext2fs2 (due to e2fsprogs) libss2 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk libfdisk1 (due to fdisk) libmount1 (due to fdisk) libncursesw5 (due to fdisk) libsmartcols1 (due to fdisk) findutils grep
  libpcre3 (due to grep) gzip hostname init-system-helpers perl-base (due to init-system-helpers) libc-bin login libaudit1 (due to login) libpam0g (due to login) libpam-runtime (due to login) libpam-modules (due to login) mount
  util-linux (due to mount) ncurses-bin sed sysvinit-utils libudev1 (due to util-linux)
0 upgraded, 5 newly installed, 371 to remove and 0 not upgraded.
Need to get 2346 kB of archives.
After this operation, 464 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
cpuguy83
  • 101

1 Answers1

0

I resolved this by pruned down my apt sources to just what's listed in the answer for Cross-compile for armhf and install a static library and this seems to work well.

Example:

deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial main multiverse restricted universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial main multiverse restricted universe
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ xenial-updates main multiverse restricted universe
deb [arch=amd64] http://security.ubuntu.com/ubuntu/ xenial-security main multiverse restricted universe
cpuguy83
  • 101