Re: [gentoo-user] cross-compiling environment for Rapberry
On 4/30/2024 12:26 AM, ralfconn wrote: 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. this is wrong. so ima gonna assume we talking about crossdev. and cross-emerge. which should be the go to tool for this. but here is the problem. you cant just "mimic" fake packages. which is wht you did is. 3 different systems. host system, prolly x86/64. then virtual system. then the actual pi. do not confuse them. profiles are less important. dependencies are important however. lets say you do USE="xz" ROOT="/someplace" SYSROOT=$ROOT ARCH=$whatever cross-emerge gcc. you would need headers and libs not just in the target system, but in the building systems as well. not just in the main building system, the host system, but based on how and what you are doing, you might need to build, dependencies, including in that intermediary /usr/$arch.
Re: [gentoo-user] cross-compiling environment for Rapberry
Il 01/05/24 19:54, ralfconn ha scritto: Il 01/05/24 19:05, Michael ha scritto: 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. I wasn't clear: when I tried to select the merged-usr profile on the host and on the target I got an error invoking emerge-aarch64-unknown-linux-gnu on the _host_ telling me that the profile was 'merged-usr' but the directory layout wasn't. So the problem is in the directory layout created by crossdev on the host.The host has a merged-usr profile, I believe the problem is in crossdev itself. I tried to manually copy files in the crossdev environment to recreate the merged-usr layout but then the error on the host was even worse (I forgot what it was) so I went back to split. Update: stage3 on the pi is merge-usr so the above is bound to fail sooner or later (as I discovered trying to emerge app-misc/resolve-march-native on the pi). But, the sys-apps/merge-usr script accepts a --root parameter, so it is possible to issue, on the host: # merge-usr --root /usr/aarch64-unknown-linux-gnu # PORTAGE_CONFIGROOT=/usr/aarch64-unknown-linux-gnu eselect profile set default/linux/arm64/23.0 and have on the host the same directory layout and profile of the ARM stage3 installed on the pi. raffaele
Re: [gentoo-user] cross-compiling environment for Rapberry
Il 01/05/24 19:05, Michael ha scritto: 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. I wasn't clear: when I tried to select the merged-usr profile on the host and on the target I got an error invoking emerge-aarch64-unknown-linux-gnu on the _host_ telling me that the profile was 'merged-usr' but the directory layout wasn't. So the problem is in the directory layout created by crossdev on the host.The host has a merged-usr profile, I believe the problem is in crossdev itself. I tried to manually copy files in the crossdev environment to recreate the merged-usr layout but then the error on the host was even worse (I forgot what it was) so I went back to split. 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? That is the intention, after I'll manage to set up a workflow to crossbuild binary packages on the host :-) 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. /etc/portage/make.conf on the pi and in /usr/aarch64-unknown-linux-gnu/etc/portage/make.conf on the host are almost identical except for host-only feature (e.g. buildpkg is only specified on the host side) and number of emerge jobs. Finally, if nothing works as intended consider compiling in QEMU: https://wiki.gentoo.org/wiki/Embedded_Handbook/General/ Compiling_with_QEMU_user_chroot For the moment I am trying a different approach: create a list of packages to be updated on the pi and use it as input to the emerge-aarch64-unknown-linux-gnu command on the host. Wow, even an emerge --sync takes forever on the pi, I was no longer used to such long delays! raffaele
Re: [gentoo-user] cross-compiling environment for Rapberry
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 ]
Re: [gentoo-user] cross-compiling environment for Rapberry
Am Mon, Apr 29, 2024 at 11:26:49PM +0200 schrieb ralfconn: > 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. > [...] > /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. You could simply rsync the portage tree from one host to the other to get an identical state on both. > [different emerge -u on both hosts] > > What am I missing to make the desktop use the same list of packages to > be upgraded as the Pi? Do you have the same use flags? I’ve never really dealt with crosscompiling. Maybe somewhere deep in the system the use flags are changed. Try comparing the output of emerge --info from both hosts. -- Grüße | Greetings | Salut | Qapla’ Please do not share anything from, with or about me on any social network. Development aid is to give money from the poor of rich countries to the rich of poor countries. signature.asc Description: PGP signature
[gentoo-user] cross-compiling environment for Rapberry
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. 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). 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 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*