Summary: | dev-libs/wayland has problems finding its build-time dependency wayland-scanner when cross-compiling | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tt_1 <herrtimson> |
Component: | Current packages | Assignee: | Gentoo X packagers <x11> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sam, shimarin |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build log
output from meson log |
Created attachment 726124 [details]
output from meson log
I don't speak very good meson, but it seems there is no obvious problem in the upstream config files? https://github.com/wayland-project/wayland/blob/main/src/meson.build#L73 so I was able to work around this: host amd64 is able to cross compile wayland to aarch64-unknown-linux-gnu host amd64 is not able to cross compile to armv7a-unknown-linux-gnueabihf this made me think twice, and by enabling USE="abi_x86_32" for the host, cross compile is now possible with the amd64 host to armv7a-unknown-linux-gnueabihf is this a bug, or a feature? >_> The intention is that wayland-scanner produces the same output regardless of architecture, so for cross-compiling wayland, using a native wayland-scanner is not only 100% fine but actually intended. (In reply to tt_1 from comment #3) > so I was able to work around this: > > host amd64 is able to cross compile wayland to aarch64-unknown-linux-gnu > host amd64 is not able to cross compile to armv7a-unknown-linux-gnueabihf > > this made me think twice, and by enabling USE="abi_x86_32" for the host, > cross compile is now possible with the amd64 host to > armv7a-unknown-linux-gnueabihf > > is this a bug, or a feature? >_> That sounds like it might be related to the location of the wayland-scanner pkgconfig file. I bet that on aarch64 it's /usr/lib64/pkgconfig/wayland-scanner.pc and on armv7 it's /usr/lib/pkgconfig/wayland-scanner.pc and so the connection to abi_x86_32 makes sense. A good test would be to move /usr/*/pkgconfig/wayland-scanner.pc to /usr/share/pkgconfig/wayland-scanner.pc. I suspect wayland will cross compile fine with that, regardless of the setting of ABI_X86. I actually wanted to install the pc file only to /usr/share, but there was a problem in the transition to the split wayland-scanner package that necessitated the current situation. Perhaps it's now possible to correct that. thanks for your fast answer, there are a few missunderstandings I believe: dev-libs/wayland has wayland-scanner in BDEPS, and that is correct as it is a binary and needs to be build on the hosts side. It can't find it, and that must be because of difficulties with resolving the correct libdir, since the only difference between 32bit and 64bit pkgconf file is libdir=${prefix}/lib vs libdir=${prefix}/lib64 In any case, I recompiled wayland-scanner without USE="abi_x86_32", and moved the 64bit pkgconfig to /usr/share/pkgconfig/ folder. That made armv7a and aarch64 cross compile possible: Build-time dependency wayland-scanner found: YES 1.19.0 Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner) please note: due to the bug, it isn't even possible to cross-compile dev-util/wayland-scanner itself, as well as dev-libs/wayland-protocols. (In reply to tt_1 from comment #5) > thanks for your fast answer, there are a few missunderstandings I believe: > > dev-libs/wayland has wayland-scanner in BDEPS, and that is correct as it is > a binary and needs to be build on the hosts side. It can't find it, and that > must be because of difficulties with resolving the correct libdir, since the > only difference between 32bit and 64bit pkgconf file is libdir=${prefix}/lib > vs libdir=${prefix}/lib64 > I think Matt is in exact agreement here. It should be independent of libdir in theory, is his point. > please note: due to the bug, it isn't even possible to cross-compile > dev-util/wayland-scanner itself, as well as dev-libs/wayland-protocols. Could you explain this part? sure, dev-util/wayland-scanner is in BDEPS and only gets merged to the host. In case you wanted it to cross compile anyway, because maybe you do embedded stuff or what have you not, it is not possible at the moment, because dev-util/wayland-scanner doesn't find the wayland-scanner to build: emerge-armv7a-unknown-linux-gnueabihf -av wayland-scanner Found pkg-config: /usr/bin/armv7a-unknown-linux-gnueabihf-pkg-config (0.29.2) Run-time dependency expat found: YES 2.4.1 Configuring config.h using configuration Configuring wayland-version.h using configuration Found pkg-config: /usr/bin/x86_64-pc-linux-gnu-pkg-config (0.29.2) Found CMake: /usr/bin/cmake (3.19.7) Build-time dependency wayland-scanner found: NO (tried pkgconfig and cmake) ../wayland-1.19.0/src/meson.build:62:1: ERROR: Dependency "wayland-scanner" not found, tried pkgconfig and cmake maybe meson config file is a bit too enthusiastic here? :-) symlinking the 64bit package config file into /usr/share/pkgconfig/ is sufficent by the way, so seems as if dev-libs/wayland checks the /usr/share/pkgconfig dir first. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcccc1065cef9551515359072c4c9d1fcdd50fc3 commit bcccc1065cef9551515359072c4c9d1fcdd50fc3 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2021-12-10 02:59:01 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2021-12-10 05:48:40 +0000 dev-util/wayland-scanner: Move .pc file to neutral location Allows us to drop multilib support too, which only existed to ease the wayland/wayland-scanner package split. Closes: https://bugs.gentoo.org/803533 Signed-off-by: Matt Turner <mattst88@gentoo.org> dev-util/wayland-scanner/wayland-scanner-9999.ebuild | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) |
Created attachment 726121 [details] build log when I fire up this: emerge-armv7a-unknown-linux-gnueabihf -pv dev-libs/wayland These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] dev-util/wayland-scanner-1.19.0::gentoo ABI_X86="(64) -32 (-x32)" 446 KiB [ebuild N ] dev-libs/wayland-1.19.0::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ USE="-doc" 0 KiB the host installs dev-util/wayland-scanner, but in step 2, wayland itself fails to find the aforementioned /usr/bin/wayland-scanner I feel a little lost, since dev-util/wayland-scanner fails to cross compile for the same reason