Summary: | Build problem: meson build can not find wayland-scanner | ||
---|---|---|---|
Product: | Mesa | Reporter: | markus <shevegen> |
Component: | Other | Assignee: | mesa-dev |
Status: | RESOLVED NOTOURBUG | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | baker.dylan.c, emil.l.velikov, fdo-bugs, jljusten |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
markus
2019-07-14 06:56:29 UTC
Hi. How did you try to compile mesa exactly? Provide plz build script. Also, provide output of "/Depot/Temp/rbt/mesa-19.1.2/BUILD_DIRECTORY/meson-logs/meson-log.txt" - as I remember similar issues with packages, it prints there exact "try" for the package. I also saw this on debian sid after upgrading from meson 0.49 to 0.51. Downgrading to 0.49 fixed it. In the meson log, it suspiciously lists the PKG_CONFIG_PATH as empty, but for several previously found libraries, PKG_CONFIG_PATH is printed as non-empty: Pkg-config binary for MachineChoice.BUILD is not cached. Pkg-config binary missing from cross or native file, or env var undefined. Trying a default pkg-config fallback at pkg-config Trying pkg-config binary pkg-config for machine MachineChoice.BUILD at ['/usr/bin/pkg-config'] Found pkg-config: /usr/bin/pkg-config (0.29) Determining dependency 'wayland-scanner' with pkg-config executable '/usr/bin/pkg-config' PKG_CONFIG_PATH: Called `/usr/bin/pkg-config --modversion wayland-scanner` -> 1 Emil, in: commit c077b74ee8187042ad3ad8001d94074e73e3e9ea meson: use dependency()+find_program() for wayland-scanner You added "native: true". How is that used? I notice that if I remove it, then mesa will configure with meson 0.51. BTH it's been a while, so I don't recall the details. It was either: - target machine was missing wayland-scanner (correct), so we had to tell meson to use the one of the build host, or - meson was trying to run the target wayland-scanner on the build host, and failing since they are different architectures Quick look around shows that meson 0.51 release notes mentions something about this in "Specifying options per mer machine". Yet I cannot see a clear example having meson.build compatible with old and new meson :-\ FWIW I'm inclined to call this a meson bug - changing behaviour is w/o a big fat preemptive WARNING is not nice. Yet I won't object if you want to revert my patch. Are you doing a cross compile? (In reply to Emil Velikov from comment #4) > Yet I won't object if you want to revert my patch. I don't want to revert this patch. I'm hoping that either you or Dylan can reproduce it with 0.51, and figure out the best fix. :) (In reply to Dylan Baker from comment #5) > Are you doing a cross compile? I am not cross compiling. I do set PKG_CONFIG_PATH, but it includes the system path where the wayland-scanner.pc is at. Yet, from the meson log output, it looks like when searching for wayland-scanner.pc, it uses an empty set of paths. When pkg-config is used for other deps, the meson log shows my PKG_CONFIG_PATH is used. I found a fix for my build environment. I have to add this to my meson configuration: --build.pkg-config-path "$PKG_CONFIG_PATH" It looks like meson now ignores PKG_CONFIG_PATH if a "native" library is being located. I'm not sure if there might be a way to detect if an actual cross compilation is happening. If we are not cross compiling, then we could set "native" to false, and PKG_CONFIG_PATH could be used without the additional meson parameter. Are you passing PKG_CONFIG_PATH at meson setup time? such as 'PKG_CONFIG_PATH="..." meson builddir'? Because if you are this is definitely a meson bug, and there might be a PR for this already. (In reply to Dylan Baker from comment #9) > Are you passing PKG_CONFIG_PATH at meson setup time? such as > 'PKG_CONFIG_PATH="..." meson builddir'? Because if you are this is > definitely a meson bug, and there might be a PR for this already. Yes, PKG_CONFIG_PATH is set in the environment before running meson. In looking through meson's code (mesonmesonbuild/dependencies/base.py), it seems some effort may have been taken to ignore PKG_CONFIG_PATH if a dependency sets native. The first meson commit that seems to take related steps is 11e3011a6bf0adeb51582c590c90b0f4dccb4df8. It seems like the related code has been reworked substantially since then. Hmm, I guess af2d7af9983a04fa2dd6c073bdc41847a23012c8 is what has changed the behavior recently. It's a meson bug. There's a PR discussing what to do here: https://github.com/mesonbuild/meson/pull/5674 Could someone please test if this issue is fixed if you use the following Meson PR: https://github.com/mesonbuild/meson/pull/5674 Upon confirmation we'll get the 0.52.2 release out. Thanks, |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.