On Monday, 29 April 2024 22:26:49 BST ralfconn wrote: > Hello, > > I recently got me a Raspberry Pi4b to use as a PiHole [1]. As a first > step I put user-space Gentoo (i.e. aarch64 stage3) on it and now I am > trying to set up my desktop to cross-compile binary packages for the PI, > to keep the Pi up-to-date in reasonable computing time.
TBH I've had limited success with cross-compiling and this was for an x86 guest on amd64 buildhost, but I have not tried aarch64 (yet). > I've built the cross toolchain with 'crossdev --taget > aarch64-unknown-linux-gnu' per wiki [2]. I've selected a 23.0-split-usr > profile on the Pi since this is the one supported by the crossdev (or so > I understood from the error message when I tried with the non-split-usr > profile on the desktop). Did you download the correct stage3? There are split-usr and merged-usr tar archives. Since split-usr is or will be soon deprecated you better start with merged-usr. > The crossdev environment on the desktop knows nothing about the packages > installed on the Pi, so I copied /var/db/pkg from Pi to > /usr/aarch64-unknown-linux-gnu/var/db/pkg on the desktop. I ran emerge > --sync on the Pi and on the desktop approximatively at the same time. > > ==== Now If I try a @system update on the Pi I get: ==== > > pihole ~ # emerge -uDvN --ask @system Why didn't you try '--usepkg y', or '--usepkgonly y' to emerge the precompiled binaries on the pi? > These are the packages that would be merged, in order: > > Calculating dependencies... done! > Dependency resolution took 31.91 s (backtrack: 0/20). > > [ebuild U ] sys-libs/ncurses-6.4_p20240414:0/6::gentoo > [6.4_p20230401:0/6::gentoo] USE="cxx (split-usr*) (tinfo) -ada -debug > -doc -gpm -minimal -profile (-stack-realign) -static-libs -test -trace > -verify-sig" 7647 KiB > [ebuild U ] sys-apps/baselayout-2.15::gentoo [2.14-r2::gentoo] > USE="(split-usr*) -build" 30 KiB > [ebuild U ] dev-util/re2c-3.1::gentoo [2.2::gentoo] USE="-debug > -test" 1415 KiB > [ebuild U ] dev-util/pkgconf-2.2.0:0/5::gentoo [2.1.1:0/4::gentoo] > USE="(native-symlinks) -test" 305 KiB > [ebuild U ] app-portage/elt-patches-20240415::gentoo > [20240315::gentoo] 46 KiB > [ebuild R ] app-alternatives/awk-4::gentoo USE="gawk (split-usr*) > -busybox -mawk -nawk" 0 KiB > [ebuild R ] app-alternatives/bzip2-1::gentoo USE="reference > (split-usr*) -lbzip2 -pbzip2" 0 KiB > [ebuild R ] app-alternatives/tar-0::gentoo USE="gnu (split-usr*) > -libarchive" 0 KiB > [ebuild R ] app-alternatives/gzip-1::gentoo USE="reference > (split-usr*) -pigz" 0 KiB > [ebuild U ] dev-libs/libxml2-2.12.6:2::gentoo [2.12.5:2::gentoo] > USE="ftp python readline -debug -examples -icu -lzma -static-libs -test" > PYTHON_TARGETS="python3_11 -python3_10 -python3_12" 2582 KiB > [ebuild U ] sys-devel/gettext-0.22.5::gentoo [0.22.4::gentoo] > USE="acl cxx ncurses nls openmp* (xattr) -doc -emacs -git -java > -static-libs -verify-sig" 10031 KiB > [ebuild N ] app-arch/libarchive-3.7.4:0/13::gentoo USE="acl bzip2 > e2fsprogs iconv lzma xattr zstd -blake2 -expat -lz4 -lzo -nettle > -static-libs -test -verify-sig" 5291 KiB > [ebuild U ] sys-apps/shadow-4.14.6:0/4::gentoo [4.14.2:0/4::gentoo] > USE="acl nls pam (split-usr*) xattr -audit -cracklib (-selinux) -skey > -su -systemd -verify-sig" 1764 KiB > [ebuild N ] app-crypt/rhash-1.4.4-r1:0/1::gentoo USE="nls ssl > -debug -static-libs" 426 KiB > [ebuild U ] dev-python/platformdirs-4.2.1::gentoo [4.2.0::gentoo] > USE="-test" PYTHON_TARGETS="python3_11 -pypy3 -python3_10 -python3_12" > 20 KiB > [ebuild N ] dev-python/backports-tarfile-1.1.1::gentoo USE="-test" > PYTHON_TARGETS="python3_11 -pypy3 -python3_10" 83 KiB > [ebuild U ] dev-python/trove-classifiers-2024.4.10::gentoo > [2024.3.25::gentoo] USE="-test" PYTHON_TARGETS="python3_11 -pypy3 > -python3_10 -python3_12" 16 KiB > [ebuild U ] dev-python/jaraco-context-5.3.0::gentoo [5.1.0::gentoo] > USE="-test" PYTHON_TARGETS="python3_11 -pypy3 -python3_10 -python3_12" > 14 KiB > [ebuild U ] dev-python/jaraco-functools-4.0.1::gentoo > [4.0.0::gentoo] USE="-test" PYTHON_TARGETS="python3_11 -pypy3 > -python3_10 -python3_12" 18 KiB > [ebuild U ] sys-apps/coreutils-9.5::gentoo [9.4-r1::gentoo] > USE="acl nls openssl (split-usr*) xattr -caps -gmp -hostname -kill > -multicall (-selinux) -static -test -vanilla -verify-sig" 5873 KiB > [ebuild NS ] dev-build/autoconf-2.72-r1:2.72::gentoo > [2.71-r6:2.71::gentoo] USE="-emacs -verify-sig%" 1358 KiB > [ebuild U ] app-eselect/eselect-pinentry-0.7.4::gentoo > [0.7.3::gentoo] 0 KiB > [ebuild U ] dev-perl/XS-Parse-Keyword-0.410.0::gentoo > [0.380.0::gentoo] USE="-test" 87 KiB > [ebuild U ] sys-apps/kmod-32-r1::gentoo [31::gentoo] USE="lzma > (split-usr%*) (tools) zlib zstd -debug -doc -pkcs7 -static-libs > (-python%)" PYTHON_TARGETS="(-python3_10%) (-python3_11%*)" 500 KiB > [ebuild U ] app-crypt/pinentry-1.3.0-r2::gentoo [1.2.1-r4::gentoo] > USE="ncurses -X -caps -efl -emacs -gtk -keyring -qt5 (-qt6) -verify-sig > -wayland" 597 KiB > [ebuild U ] dev-lang/tcl-8.6.14:0/8.6::gentoo > [8.6.13-r1:0/8.6::gentoo] USE="threads -debug" 6916 KiB > [ebuild N ] dev-libs/libuv-1.48.0:0/1::gentoo USE="-verify-sig" > 1285 KiB > [ebuild U ] dev-perl/Syntax-Keyword-Try-0.290.0::gentoo > [0.280.0::gentoo] USE="-test" 45 KiB > [ebuild U ] app-text/po4a-0.71::gentoo [0.69::gentoo] USE="-test" > 4747 KiB > [ebuild U ] app-portage/portage-utils-0.97::gentoo [0.96.1::gentoo] > USE="openmp* qmanifest -static (-qtegrity%*)" 1818 KiB > [ebuild U ] dev-python/setuptools-69.5.1-r1::gentoo > [69.2.0-r1::gentoo] USE="-test" PYTHON_TARGETS="python3_11 -pypy3 > -python3_10 -python3_12" 2238 KiB > [ebuild U ] dev-build/meson-1.4.0-r1::gentoo [1.3.2::gentoo] > USE="(-test) -verify-sig" PYTHON_TARGETS="python3_11 -pypy3 -python3_10 > -python3_12" 2504 KiB > [ebuild U ] dev-python/cython-3.0.10::gentoo [3.0.9::gentoo] > USE="-debug -doc -test" PYTHON_TARGETS="python3_11 -pypy3 -python3_10 > -python3_12" 2707 KiB > [ebuild U ] dev-python/pluggy-1.5.0::gentoo [1.4.0::gentoo] > USE="-test" PYTHON_TARGETS="python3_11 -pypy3 -python3_10 -python3_12" > 67 KiB > [ebuild U ] dev-python/lxml-5.2.1::gentoo [5.1.1::gentoo] > USE="threads -debug -doc -examples -test" PYTHON_TARGETS="python3_11 > -pypy3 -python3_10 -python3_12" 929 KiB > [ebuild U ] dev-python/hatchling-1.24.2::gentoo [1.22.5-r1::gentoo] > USE="-test" PYTHON_TARGETS="python3_11 -pypy3 -python3_10 -python3_12" > 1030 KiB > [ebuild U ] dev-build/ninja-1.12.0::gentoo [1.11.1-r5::gentoo] > USE="-doc (-test%)" 235 KiB > [ebuild N ] dev-libs/jsoncpp-1.9.5:0/25::gentoo USE="-doc -test" > 211 KiB > [ebuild N ] dev-build/cmake-3.29.2::gentoo USE="ncurses (-dap) > -doc -gui -qt6 -test -verify-sig" 11492 KiB > [ebuild U ] sys-apps/systemd-utils-254.11::gentoo > [254.10-r1::gentoo] USE="acl kmod (split-usr*) tmpfiles udev -boot > -kernel-install -secureboot (-selinux) -sysusers -test -ukify" > PYTHON_SINGLE_TARGET="python3_11 -python3_10 -python3_12" 14102 KiB > > Total: 40 packages (29 upgrades, 6 new, 1 in new slot, 4 reinstalls), > Size of downloads: 88412 KiB > > ==== While on the desktop I get: ==== > > desktop /usr/aarch64-unknown-linux-gnu # > emerge-aarch64-unknown-linux-gnu --ask -uDvN --oneshot --buildpkg @system > > These are the packages that would be merged, in order: > > Calculating dependencies... done! > Dependency resolution took 7.15 s (backtrack: 0/20). > > [ebuild U ] sys-libs/ncurses-6.4_p20240414:0/6::gentoo > [6.4_p20230401:0/6::gentoo] to /usr/aarch64-unknown-linux-gnu/ USE="cxx > (split-usr*) (tinfo) -ada -debug -doc -gpm -minimal -profile > (-stack-realign) -static-libs -test -trace -verify-sig" 0 KiB > [ebuild U ] sys-apps/baselayout-2.15::gentoo [2.14-r2::gentoo] to > /usr/aarch64-unknown-linux-gnu/ USE="(split-usr*) -build" 0 KiB > [ebuild R ] app-alternatives/awk-4::gentoo to > /usr/aarch64-unknown-linux-gnu/ USE="gawk (split-usr*) -busybox -mawk > -nawk" 0 KiB > [ebuild R ] app-alternatives/bzip2-1::gentoo to > /usr/aarch64-unknown-linux-gnu/ USE="reference (split-usr*) -lbzip2 > -pbzip2" 0 KiB > [ebuild R ] app-alternatives/gzip-1::gentoo to > /usr/aarch64-unknown-linux-gnu/ USE="reference (split-usr*) -pigz" 0 KiB > [ebuild R ] app-alternatives/tar-0::gentoo to > /usr/aarch64-unknown-linux-gnu/ USE="gnu (split-usr*) -libarchive" 0 KiB > [ebuild U ] sys-apps/coreutils-9.5::gentoo [9.4-r1::gentoo] to > /usr/aarch64-unknown-linux-gnu/ USE="acl nls openssl (split-usr*) xattr > -caps -gmp -hostname -kill -multicall (-selinux) -static -test -vanilla > -verify-sig" 0 KiB > [ebuild U ] sys-apps/kmod-32-r1::gentoo [31::gentoo] to > /usr/aarch64-unknown-linux-gnu/ USE="lzma (split-usr%*) (tools) zlib > zstd -debug -doc -pkcs7 -static-libs (-python%)" > PYTHON_TARGETS="(-python3_10%) (-python3_11%*)" 0 KiB > [ebuild U ] app-crypt/pinentry-1.3.0-r2::gentoo [1.2.1-r4::gentoo] > to /usr/aarch64-unknown-linux-gnu/ USE="ncurses -X -caps -efl -emacs > -gtk -keyring -qt5 (-qt6) -verify-sig -wayland" 0 KiB > [ebuild U ] sys-apps/shadow-4.14.6:0/4::gentoo [4.14.2:0/4::gentoo] > to /usr/aarch64-unknown-linux-gnu/ USE="acl nls pam (split-usr*) xattr > -audit -cracklib (-selinux) -skey -su -systemd -verify-sig" 0 KiB > [ebuild U ] sys-apps/systemd-utils-254.11::gentoo > [254.10-r1::gentoo] to /usr/aarch64-unknown-linux-gnu/ USE="acl kmod > (split-usr*) tmpfiles udev -boot -kernel-install -secureboot (-selinux) > -sysusers -test -ukify" PYTHON_SINGLE_TARGET="python3_11 -python3_10 > -python3_12" 0 KiB > > Total: 11 packages (7 upgrades, 4 reinstalls), Size of downloads: 0 KiB > > ==== What am I missing to make the desktop use the same list of packages > to be upgraded as the Pi? ==== > > thanks, > > raffaele > > [1] https://pi-hole.net/ > [2] https://wiki.gentoo.org/wiki/Crossdev Check the selected make.profile and the stage3 fs are the same on both buildhost and guest. Also diff the two /var/lib/portage/world and don't forget to compare/grep for different USE flags between the two systems. Finally, if nothing works as intended consider compiling in QEMU: https://wiki.gentoo.org/wiki/Embedded_Handbook/General/ Compiling_with_QEMU_user_chroot
signature.asc
Description: This is a digitally signed message part.