View previous topic :: View next topic |
Author |
Message |
its_randomness n00b
Joined: 06 Dec 2023 Posts: 14
|
Posted: Wed Oct 23, 2024 11:31 am Post subject: crossdev and make.conf confusion? |
|
|
Hey all,
I'm trying to cross-build an arm version of Gentoo, because I want to avoid all use of QEMU or building on native hardware, for performance reasons and to keep build configurations on a huge building host.
The host is x86_64-pc-linux-gnu and the target is armv7a-unknown-linux-gnueabihf.
I have followed the guides I could find from gentoo wiki's about crossdev and cross compiling using emerge.
Code: | ROOT=/chroot/arm
PORTAGE_CONFIGROOT=/chroot/arm
|
When using running Code: | armv7a-unknown-linux-gnueabihf-emerge --info | I can tell it picks up the settings I set in /chroot/arm/etc/portage/make.conf/local.conf
Code: | [ebuild N ] sys-libs/ncurses-6.4_p20240414:0/6::gentoo to /chroot/arm/ USE="cxx (tinfo) -ada -debug -doc -gpm -minimal -profile (-split-usr) (-stack-realign) -static-libs -test -trace -verify-sig" 0 KiB
[ebuild N ] sys-process/htop-3.3.0::gentoo to /chroot/arm/ USE="unicode -caps -debug -delayacct -hwloc -llvm-libunwind (-lm-sensors) -openvz -unwind -vserver" 0 KiB
|
This succeeds and I can see ncurses files and htop files are placed in the target root.
When running Code: | armv7a-unknown-linux-gnueabihf-emerge -ep @system | I get:
Code: | !!! The ebuild selected to satisfy "sys-apps/util-linux" for /usr/armv7a-unknown-linux-gnueabihf/ has unmet requirements.
- sys-apps/util-linux-2.40.2::gentoo USE="cramfs hardlink logger readline su suid -audit -build -caps -cryptsetup -fdformat -kill -magic -ncurses -nls -pam -python -rtas (-selinux) -slang -static-libs -systemd -test -tty-helpers -udev -unicode -uuidd -verify-sig" PYTHON_TARGETS="python3_12 -python3_10 -python3_11"
The following REQUIRED_USE flag constraints are unsatisfied:
su? ( pam )
|
So I check my USE flags for target root:
Code: | armv7a-unknown-linux-gnueabihf-emerge --info | grep pam
|
returns:
Code: | USE="acl arm bzip2 crypt gdbm iconv ipv6 ncurses nls openmp pam pcre readline seccomp ssl test-rust unicode xattr zlib"
|
Do I have to manually maintain/switch portage between my target root /chroot/arm/etc/portage and /usr/armv7a-unknown-linux-gnueabihf/etc/portage , or am I missing something? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1472 Location: Richmond Hill, Canada
|
Posted: Wed Oct 23, 2024 1:43 pm Post subject: |
|
|
In your configuration, there are two Portage configures. One is at your $ROOT(/chroot/arm)/etc/portage/ and the other is at /usr/armv7a-unknown-linux-gnueabihf/etc/portage/.
The message Quote: | !!! The ebuild selected to satisfy "sys-apps/util-linux" for /usr/armv7a-unknown-linux-gnueabihf/ has unmet requirements | Is refer to "build time" dependency which look in to /usr/armv7a-unknown-linux-gnueabihf/etc/portage/*
your command "emerge -ep" make emerge assume empty target therefor everything need to be rebuild include all system software. |
|
Back to top |
|
|
its_randomness n00b
Joined: 06 Dec 2023 Posts: 14
|
Posted: Thu Oct 24, 2024 7:35 am Post subject: |
|
|
pingtoo wrote: | In your configuration, there are two Portage configures. One is at your $ROOT(/chroot/arm)/etc/portage/ and the other is at /usr/armv7a-unknown-linux-gnueabihf/etc/portage/.
The message Quote: | !!! The ebuild selected to satisfy "sys-apps/util-linux" for /usr/armv7a-unknown-linux-gnueabihf/ has unmet requirements | Is refer to "build time" dependency which look in to /usr/armv7a-unknown-linux-gnueabihf/etc/portage/*
your command "emerge -ep" make emerge assume empty target therefor everything need to be rebuild include all system software. |
Leaving the '-e' from armv7a-unknown-linux-gnueabihf-emerge command still triggers same error.
How do I know which of the two configuration takes precedence and when?
Does this leave my with a single "build time" target in /usr/armv7a-unknown-linux-gnueabihf? If so, do I need to replace/change the /usr/armv7a-unknown-linux-gnueabihf/etc/portage/ configuration every time I switch ${ROOT} target? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1472 Location: Richmond Hill, Canada
|
Posted: Thu Oct 24, 2024 2:30 pm Post subject: |
|
|
its_randomness wrote: | How do I know which of the two configuration takes precedence and when? | "Build time" dependency mean the package build tool defined something outside of the package itself required in order to complete the build procedure. Those "build time" dependency usually are not need for the package to execute during every day run. So they are not installed into $ROOT by default. As far as I know current there is no Gentoo tool that can easly give out dependencies with indicator it is a BUILD or RUN dependency. You will have to check the ebuild to find kind of dependency are.
with crossdev, build time dependencies install into /usr/<crossdev target>/. You can add "--with-bdeps=y" to force build dependency also install into $ROOT.
For more information on Dependencies see this Gentoo wiki link
Quote: | Does this leave my with a single "build time" target in /usr/armv7a-unknown-linux-gnueabihf? If so, do I need to replace/change the /usr/armv7a-unknown-linux-gnueabihf/etc/portage/ configuration every time I switch ${ROOT} target? | Yes, if this question idea is that your $ROOT will have different configuration for same CHOST. No if you are thinking different crossdev target. Each crossdev target will have its own /usr/<crossdev target>/ directory therefor have its own build time installation and configuration. |
|
Back to top |
|
|
its_randomness n00b
Joined: 06 Dec 2023 Posts: 14
|
Posted: Fri Oct 25, 2024 7:39 am Post subject: |
|
|
pingtoo wrote: | Yes, if this question idea is that your $ROOT will have different configuration for same CHOST. No if you are thinking different crossdev target. Each crossdev target will have its own /usr/<crossdev target>/ directory therefor have its own build time installation and configuration. |
I am thinking of have a single /usr/<crossdev target>/ and multiple $ROOT 's, like /chroot/arm0/ and /chroot/arm1/ , each with their own gentoo configuration dir (etc/portage/) |
|
Back to top |
|
|
|