Created attachment 884575 [details] emerge-aarch64-unknown-linux-gnu crossdev version: 20240117 Executing "emerge-aarch64-unknown-linux-gnu -av -e @world" shows that 274 host packages (x86_64-pc-linux-gnu) will be reinstalled and 182 target packages (/usr/aarch64-unknown-linux-gnu/) are new builds (see attached). I don't know whether this is the desired (normal) behavior or a bug. I was expecting only the ARM packages to be built. Please advise. It is worth mentioning that before emerging the crossdev package and creating the "aarch64-unknown-linux-gnu" target, I updated the @world packages (emerge -avuDN @world). I have followed this tutorial: https://wiki.gentoo.org/wiki/Binary_package_guide#Advanced_topics
Created attachment 884604 [details] emerge on the host target It's also worth mentioning that "emerge -av -e @world" shows 310 packages to be reinstalled on the host target (see attached). Shouldn't the same packages be built for the target architecture (aarch64-unknown-linux-gnu), considering that both host and target have the same profile "default/linux/amd64/17.1/systemd/merged-usr"?
This is expected because some dependencies are BDEPEND aka build host dependencies, so a) the build host is being updated because it affects the build, and b) these dependencies do not need to be installed to the target host. Having said that, I have long wanted options to a) not update build dependencies unless it's really necessary (while keeping target host dependencies updated) and b) install build host dependencies to the target host. The options we already have are confusing and inconsistent though because Portage's functionality has outgrown them, so it probably needs a big breaking redesign.
(In reply to James Le Cuirot from comment #2) > This is expected because some dependencies are BDEPEND aka build host > dependencies, so a) the build host is being updated because it affects the > build, and b) these dependencies do not need to be installed to the target > host. > > Having said that, I have long wanted options to a) not update build > dependencies unless it's really necessary (while keeping target host > dependencies updated) and b) install build host dependencies to the target > host. The options we already have are confusing and inconsistent though > because Portage's functionality has outgrown them, so it probably needs a > big breaking redesign. Thanks for the explanation. I was expecting that might be the reason. However, since the profile (systemd/merged-usr) is the same on both host and target, shouldn't the same packages be built for x86_64 and aarch64? 310 (x86_64) vs. 180 (aarch64) is quite a difference.
I thought that the "systemd/merged-usr" profiles could be different on host (x86_64) and target (aarch64), so I did the following: 1. Clean install Gentoo (x86_64 host), including emaint -a sync && emerge -avuDN @world 2. emerge -av -e @world - Total: 310 packages (310 reinstalls) 3. emerge sys-devel/crossdev 4. emerge -av -e @world - Total: 312 packages (312 reinstalls) 5. Create crossdev overlay (https://wiki.gentoo.org/wiki/Crossdev#Crossdev_overlay) 6. crossdev --stable -t x86_64-unknown-linux-gnu 7. PORTAGE_CONFIGROOT=/usr/x86_64-unknown-linux-gnu eselect profile set 23 ("systemd/merged-usr" profile) 8. emerge-x86_64-unknown-linux-gnu -av -e @world - Total: 456 packages (182 new, 274 reinstalls) - those 182 are for x86_64-unknown-linux-gnu and the other 274 for host Note that I had to add "sys-apps/util-linux -systemd -udev" to /usr/x86_64-unknown-linux-gnu/etc/portage/package.use to solve the circular dependencies. Since I got the same results for aarch64-unknown-linux-gnu (182 new, 274 reinstalls), we may conclude it's not related to the profile. Moreover, I was expecting all 310 packages to be built for the target, not just 182.
I noticed that the bug was renamed to "sys-apps/portage - emerge --root=... -e @world". Related to that, it might be worth considering the output of these two commands: - emerge --root /new-root -pv -e @world => Total: 467 packages (184 new, 283 reinstalls) - emerge -pv -e @world => Total: 310 packages (310 reinstalls) I might be wrong, but shouldn't the output of the first command be "Total: 310 packages (310 new)"?