Score:0

Why is "apt build-dep" not installing the packages I need?

ar flag

I'm trying to build the linux-raspi packages from source.

I ran apt build-dep -y linux-raspi and that installed a number of dependencies. If I run it again, it is satisfied that all necessary packages are installed.

Then I ran dpkg-buildpackage but it errored:

dpkg-checkbuilddeps: error: Unmet build dependencies: dh-systemd cpio kernel-wedge kmod
libcap-dev libelf-dev libnewt-dev libiberty-dev rsync libdw-dev libpci-dev pkg-config flex
bison libunwind8-dev openssl libssl-dev libaudit-dev bc libudev-dev uuid-dev dkms curl xmlto
docbook-utils ghostscript fig2dev sharutils asciidoc python3-sphinx python3-sphinx-rtd-theme
python3-docutils

Clearly apt-cache showsrc linux-raspi shows that cpio (for example) is a build dependency:

Package: linux-raspi
...
Build-Depends: debhelper (>= 9), dh-systemd, cpio, kernel-wedge, kmod 
<!stage1>, makedumpfile [amd64] <!stage1>, libelf-dev <!stage1>, libnewt-dev 
<!stage1>, libiberty-dev <!stage1>, rsync <!stage1>, libdw-dev <!stage1>, 
libpci-dev <!stage1>, pkg-config <!stage1>, flex <!stage1>, bison <!stage1>, 
libunwind8-dev [amd64 arm64 armhf ppc64el] <!stage1>, openssl <!stage1>, 
libssl-dev <!stage1>, libaudit-dev <!stage1>, bc <!stage1>, gawk <!stage1>, 
device-tree-compiler [powerpc] <!stage1>, u-boot-tools [powerpc] <!stage1>, 
libc6-dev-ppc64 [powerpc] <!stage1>, libudev-dev <!stage1>, autoconf <!stage1>, 
automake <!stage1>, libtool <!stage1>, uuid-dev <!stage1>

So in that case, why isn't apt build-dep installing it? How is it in disagreement with dpkg-buildpackage over what packages are necessary?

Score:1
us flag

From man apt-get:

build-dep
   [snip]

   The arguments are interpreted as binary or source package names. See the --only-source
   option if you want to change that.

linux-raspi the source package provides these binary packages (on an Ubuntu 22.04 Docker container):

Binary: linux-raspi-headers-5.15.0-1005, linux-raspi-tools-5.15.0-1005, linux-image-5.15.0-1005-raspi, linux-modules-5.15.0-1005-raspi, linux-modules-extra-5.15.0-1005-raspi, linux-headers-5.15.0-1005-raspi, linux-image-5.15.0-1005-raspi-dbgsym, linux-tools-5.15.0-1005-raspi, linux-buildinfo-5.15.0-1005-raspi, linux-image-5.15.0-1005-raspi-nolpae, linux-modules-5.15.0-1005-raspi-nolpae, linux-modules-extra-5.15.0-1005-raspi-nolpae, linux-headers-5.15.0-1005-raspi-nolpae, linux-image-5.15.0-1005-raspi-nolpae-dbgsym, linux-tools-5.15.0-1005-raspi-nolpae, linux-buildinfo-5.15.0-1005-raspi-nolpae

linux-raspi the binary package is provided by the linux-meta-raspi package.

Looks you want to build the linux-raspi source package, so:

# apt-get build-dep linux-raspi --only-source
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  asciidoc asciidoc-base asciidoc-common autoconf automake autopoint autotools-dev bc binutils binutils-aarch64-linux-gnu binutils-common bison bsdextrautils
  build-essential bzip2 ca-certificates ca-certificates-java cpio cpp cpp-11 cpp-12 curl dctrl-tools debhelper debugedit default-jdk-headless default-jre-headless
  dh-autoreconf dh-strip-nondeterminism distro-info-data dkms docbook-dsssl docbook-utils docbook-xml docbook-xsl docutils-common dpkg-dev dvipng dwz fig2dev file
  flex fontconfig fontconfig-config fonts-dejavu-core fonts-font-awesome fonts-lato fonts-lmodern fonts-noto-cjk fonts-urw-base35 g++ g++-11 gawk gcc gcc-11
  gcc-11-base gcc-12 gettext gettext-base ghostscript graphviz groff-base hicolor-icon-theme imagemagick imagemagick-6-common imagemagick-6.q16 intltool-debian
  java-common kmod latexmk libann0 libaom3 libapache-pom-java libarchive-zip-perl libasan6 libasan8 libasound2 libasound2-data libatomic1 libaudit-dev
  libavahi-client3 libavahi-common-data libavahi-common3 libbinutils libbpf0 libbrotli1 libbsd0 libc-dev-bin libc6-dev libcairo-gobject2 libcairo2 libcap-dev
  libcap-ng-dev libcc1-0 libcdt5 libcgraph6 libcommons-logging-java libcommons-parent-java libcrypt-dev libctf-nobfd0 libctf0 libcups2 libcurl4 libdatrie1 libdav1d5
  libdbus-1-3 libde265-0 libdebhelper-perl libdeflate0 libdpkg-perl libdw-dev libdw1 libelf-dev libelf1 libexpat1 libexpat1-dev libfftw3-double3
  libfile-stripnondeterminism-perl libfontbox-java libfontconfig1 libfreetype6 libfribidi0 libgcc-11-dev libgcc-12-dev libgd3 libgdbm-compat4 libgdbm6
  libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-common libglib2.0-0 libgomp1 libgraphite2-3 libgs9 libgs9-common libgts-0.7-5 libgvc6 libgvpr2 libharfbuzz0b libheif1
  libhwasan0 libiberty-dev libice6 libicu70 libidn12 libijs-0.35 libisl23 libitm1 libjbig0 libjbig2dec0 libjpeg-turbo8 libjpeg8 libjs-jquery libjs-sphinxdoc
  libjs-underscore libkmod2 libkpathsea6 liblab-gamut1 liblcms2-2 libldap-2.5-0 liblqr-1-0 liblsan0 libltdl7 liblzma-dev libmagic-mgc libmagic1
  libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmd0 libmpc3 libmpdec3 libmpfr6 libnetpbm10 libnewt-dev libnewt0.52 libnghttp2-14 libnsl-dev libnspr4 libnss3
  libnuma-dev libnuma1 libopenjp2-7 libosp5 libostyle1c2 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpathplan4 libpci-dev
  libpci3 libpcsclite1 libpdfbox-java libperl5.34 libpipeline1 libpixman-1-0 libpng-dev libpng16-16 libpopt0 libpsl5 libptexenc1 libpython3-dev libpython3-stdlib
  libpython3.10 libpython3.10-dev libpython3.10-minimal libpython3.10-stdlib libreadline8 librsvg2-2 librsvg2-bin librtmp1 libsasl2-2 libsasl2-modules-db
  libsgmls-perl libsigsegv2 libslang2 libslang2-dev libsm6 libsqlite3-0 libssh-4 libssl-dev libstdc++-11-dev libsub-override-perl libsynctex2 libteckit0 libtexlua53
  libthai-data libthai0 libtiff5 libtirpc-dev libtool libtsan0 libtsan2 libubsan1 libuchardet0 libudev-dev libunwind-dev libunwind8 libwebp7 libwebpdemux2
  libwebpmux3 libx11-6 libx11-data libx265-199 libxau6 libxaw7 libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxext6 libxi6 libxml2 libxml2-utils libxmu6 libxpm4
  libxrender1 libxslt1.1 libxt6 libzzip-0-13 linux-libc-dev lsb-release lto-disabled-list lynx lynx-common m4 make man-db media-types netpbm openjade
  openjdk-11-jdk-headless openjdk-11-jre-headless opensp openssl pahole patch pci.ids perl perl-modules-5.34 pkg-config po-debconf poppler-data preview-latex-style
  python-babel-localedata python3 python3-alabaster python3-babel python3-certifi python3-chardet python3-dev python3-distutils python3-docutils python3-idna
  python3-imagesize python3-jinja2 python3-lib2to3 python3-markupsafe python3-minimal python3-packaging python3-pkg-resources python3-pygments python3-pyparsing
  python3-requests python3-roman python3-six python3-snowballstemmer python3-sphinx python3-sphinx-rtd-theme python3-tz python3-urllib3 python3.10 python3.10-dev
  python3.10-minimal readline-common rpcsvc-proto rsync sgml-base sgml-data sgmlspl shared-mime-info sharutils sphinx-common sphinx-rtd-theme-common t1utils teckit
  tex-common texlive-base texlive-binaries texlive-fonts-recommended texlive-formats-extra texlive-latex-base texlive-latex-extra texlive-latex-recommended
  texlive-pictures texlive-plain-generic texlive-xetex tipa tzdata ucf uuid-dev x11-common xdg-utils xml-core xmlto xsltproc xz-utils zlib1g-dev
The following packages will be upgraded:
  libcap2
1 upgraded, 348 newly installed, 0 to remove and 0 not upgraded.

Without that option it tries to install only 90 new packages.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.