Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dependencies in cross compilation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Khumarahn
Apprentice
Apprentice


Joined: 17 Apr 2009
Posts: 199

PostPosted: Sun Oct 29, 2017 10:35 am    Post subject: Dependencies in cross compilation Reply with quote

Hi all,

there is something weird. I am installing aarch64 guest on an amd64 host. I run:
Code:
# aarch64-linux-gnu-emerge -av1 libepoxy mesa

 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] media-libs/libepoxy-1.4.3::gentoo to /usr/aarch64-linux-gnu/ USE="X {-test}" 0 KiB
[ebuild  N     ] virtual/acl-0-r2::gentoo to /usr/aarch64-linux-gnu/ USE="-static-libs" 0 KiB
[ebuild  N     ] sys-apps/coreutils-8.28::gentoo to /usr/aarch64-linux-gnu/ USE="acl nls xattr -caps -gmp -hostname -kill -multicall (-selinux) -static -vanilla" 0 KiB
[ebuild  N     ] x11-libs/libxcb-1.12-r2:0/1.12::gentoo to /usr/aarch64-linux-gnu/ USE="xkb (-doc) (-selinux) -static-libs {-test}" 0 KiB
[ebuild  N     ] sys-apps/sed-4.4::gentoo to /usr/aarch64-linux-gnu/ USE="acl nls (-selinux) -static" 0 KiB
[ebuild  N     ] x11-libs/libX11-1.6.5::gentoo to /usr/aarch64-linux-gnu/ USE="ipv6 (-doc) -static-libs {-test}" 0 KiB
[ebuild  N     ] x11-libs/libXext-1.3.3::gentoo to /usr/aarch64-linux-gnu/ USE="(-doc) -static-libs" 0 KiB
[ebuild  N     ] x11-libs/libXfixes-5.0.3::gentoo to /usr/aarch64-linux-gnu/ USE="-static-libs" 0 KiB
[ebuild  N     ] x11-libs/libXdamage-1.1.4-r1::gentoo to /usr/aarch64-linux-gnu/ USE="-static-libs" 0 KiB
[ebuild  N     ] x11-libs/libXxf86vm-1.1.4::gentoo to /usr/aarch64-linux-gnu/ USE="-static-libs" 0 KiB
[ebuild  N     ] sys-libs/gpm-1.20.7-r2::gentoo to /usr/aarch64-linux-gnu/ USE="(-selinux) -static-libs" 0 KiB
[ebuild  N     ] sys-libs/ncurses-6.0-r1:0/6::gentoo to /usr/aarch64-linux-gnu/ USE="cxx gpm tinfo unicode (-ada) -debug (-doc) -minimal -profile -static-libs {-test} -threads -trace" 0 KiB
[ebuild  N     ] sys-libs/readline-7.0_p3:0/7::gentoo to /usr/aarch64-linux-gnu/ USE="-static-libs -utils" 0 KiB
[ebuild  N     ] app-admin/eselect-1.4.9::gentoo to /usr/aarch64-linux-gnu/ USE="(-doc) (-emacs) (-vim-syntax)" 0 KiB
[ebuild  N     ] sys-devel/llvm-5.0.0:5::gentoo to /usr/aarch64-linux-gnu/ USE="libffi ncurses -debug (-doc) -gold -libedit {-test}" LLVM_TARGETS="(AArch64) BPF -AMDGPU -ARM -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -X86 -XCore" 0 KiB
[ebuild  N     ] app-shells/bash-4.4_p12::gentoo to /usr/aarch64-linux-gnu/ USE="net nls (readline) (-afs) -bashlogger -examples -mem-scramble -plugins" 0 KiB
[ebuild  N     ] app-eselect/eselect-opengl-1.3.1-r4::gentoo to /usr/aarch64-linux-gnu/ 0 KiB
[ebuild  N     ] app-eselect/eselect-mesa-0.0.10-r1::gentoo to /usr/aarch64-linux-gnu/ 0 KiB
[ebuild  N     ] media-libs/mesa-17.2.2::gentoo to /usr/aarch64-linux-gnu/ USE="classic dri3 egl gallium gbm llvm nptl -bindist -d3d9 -debug -gles1 -gles2 -opencl (-openmax) -osmesa -pax_kernel -pic (-selinux) -unwind -vaapi (-valgrind) (-vdpau) (-vulkan) -wayland -xa -xvmc" VIDEO_CARDS="-freedreno (-i915) (-i965) -imx (-intel) -nouveau (-r100) (-r200) (-r300) (-r600) (-radeon) (-radeonsi) -vc4 -vivante (-vmware)" 0 KiB

Total: 19 packages (19 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]


Now, the above will fail at the first package: libepoxy. This is because libepoxy requires mesa[egl], while mesa is going to be installed last. The dependency in the ebuild seems ok, but why does portage ignore it?
Back to top
View user's profile Send private message
Khumarahn
Apprentice
Apprentice


Joined: 17 Apr 2009
Posts: 199

PostPosted: Sun Oct 29, 2017 10:39 am    Post subject: Reply with quote

Also, libepoxy does not pull mesa with it.

Code:
# aarch64-linux-gnu-emerge -av1 libepoxy

 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] media-libs/libepoxy-1.4.3::gentoo to /usr/aarch64-linux-gnu/ USE="X {-test}" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]


Why?
libepoxy-1.4.3.ebuild:
DEPEND="${PYTHON_DEPS}
   media-libs/mesa[egl,${MULTILIB_USEDEP}]
   x11-misc/util-macros
   X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )"
RDEPEND=""
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sun Oct 29, 2017 4:47 pm    Post subject: Reply with quote

As I understand the documentation, this is expected. media-libs/libepoxy requires media-libs/mesa[egl] as a build-time dependency, so if it is available on your host filesystem, that dependency is satisfied. It does not require it as a runtime dependency, so Portage does not attempt to build and install an aarch64 mesa. You can override this by passing --root-deps on the command line or by using ebuilds that support the experimental HDEPEND syntax, which allows the ebuild to disambiguate build-time dependencies that must be on the host (because they provide commands which must be run) versus build-time dependencies which must be in the target (because they provide libraries which must be linked in).

See man emerge for --root-deps. See man 5 ebuild section Cross-compilation for a brief discussion of HDEPEND.
Back to top
View user's profile Send private message
Khumarahn
Apprentice
Apprentice


Joined: 17 Apr 2009
Posts: 199

PostPosted: Sun Oct 29, 2017 5:34 pm    Post subject: Reply with quote

Thanks for the explanation! Not building packages in DEPEND kinda makes sense, although does not work.

I tried with --root-deps, and the dependency graph looks better, but it brings in other packages which break for other reasons, like perl.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sun Oct 29, 2017 9:02 pm    Post subject: Reply with quote

You may need to help Portage solve this. Explicitly cross-emerge the packages that provide supporting libraries into the aarch64 root, then run the emerge that you want.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum