Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default found pkg-config is broken on windows MSVC #9480

Closed
mrobertseidowsky-gpsw opened this issue Oct 28, 2021 · 2 comments
Closed

Default found pkg-config is broken on windows MSVC #9480

mrobertseidowsky-gpsw opened this issue Oct 28, 2021 · 2 comments

Comments

@mrobertseidowsky-gpsw
Copy link

Describe the bug
Since meson version 0.60, the default pkg-config found automatically by meson on windows with visual studio backend is broken and thus made the CI of my project failed.

  • meson 0.59: Found pkg-config: C:\Strawberry\perl\bin\pkg-config.BAT (0.26) => OK
  • meson 0.60: found pkg-config 'C:\\Strawberry\\perl\\bin\\pkg-config.BAT' but it is Strawberry Perl and thus broken. Ignoring... => KO

To Reproduce
See: https://github.com/Stupeflix/sxplayer/blob/master/meson.build
And associated CI workflow: https://github.com/Stupeflix/sxplayer/blob/master/.github/workflows/ci_win.yml

Expected behavior
I expected the same behaviour of meson from 0.59 to 0.60 or an info into the changelog.

Fix
Fix is to get pkgconf sources, built it for windows, rename the pkgconf.exe generated binary to pkg-config.exe then make it ingested by meson throught PATH variable.
See PR: Stupeflix/sxplayer#43

system parameters

  • It's a plain native build for windows
  • OS: Windows 10
  • python 3.10
  • meson 0.60
@xclaesse
Copy link
Member

This is intentional, pkg-config from perl is broken and causes tones of issues. If you need pkg-config you need to install it yourself in msys for example.

@eli-schwartz
Copy link
Member

This was changed in #9384 which explains the rationale for the change. Note that Strawberry Perl is generally installed by accident, not by people who were looking for a pkg-config program... and it causes a number of dependencies to be successfully detected by meson, but then fail to build with ninja due to missing headers and link flags.

The pkg-config in question is only supposed to ever be used together with the GCC which is also provided by Strawberry Perl, and it is quite doubtful you (or anyone) was doing that.

I expected the same behaviour of meson from 0.59 to 0.60 or an info into the changelog.

It's neither a breaking change, nor a noteworthy one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants