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

Autoconf and pure perl pkg-config interactions under windows #227

Open
shawnlaffan opened this issue Sep 3, 2020 · 4 comments
Open

Autoconf and pure perl pkg-config interactions under windows #227

shawnlaffan opened this issue Sep 3, 2020 · 4 comments
Labels
🐣Enhancement Useful potential future feature (not a bug) 💣MSWin32 Windows is a weird best 🚉Platform Specific Often Windows lol, but could be something else

Comments

@shawnlaffan
Copy link
Contributor

This is a follow-on from discussion in #195 (see #195 (comment) ).

There are colon issues with drive names and path separators when passing between Windows and MSYS, where the pure perl pkg-config is in use. Wrapping the pure perl pkg-config is one means of avoiding these issues, which was the purpose of #195 . Unfortunately the shell wrapper in #195 did not handle quoted arguments.

I have reworked the pure-perl pkg-config wrapper approach using perl for the wrapper script to better handle quoted arguments. I've released it to CPAN as a plugin, with development on GitHub.

https://metacpan.org/release/Alien-Build-Plugin-PkgConfig-PPWrapper
https://github.com/shawnlaffan/Alien-Build-Plugin-PkgConfig-PPWrapper

It works for Alien::gdal and Alien::proj based on CI results (see https://github.com/shawnlaffan/geo-gdal-ffi-canary , noting that recent CI failures are unrelated to the plugin code).

If you decide it's worth including in Alien::Build then I can work up another PR, or feel free to adapt as needed.

@plicease
Copy link
Member

Thanks for doing this work!

I think including the plugin in AB core would be an option. I've done this before with other plugins, though none that we're written by me yet. I usually let them stew for a while to collect cpantesters results, but I've noticed this plugin doesn't have any tests aside from the basic "this module can compile". So I'd like to see a few tests firsts Test::Alien::Build can be useful here.

Another option would be to have this built into the AutoConf plugin. If it is "on by default" that benefits the most users, unless there are packages that it breaks, which makes me nervous of course. If it is opt-in then it isn't functionally much better than if it is a separate plugin.

@shawnlaffan
Copy link
Contributor Author

No worries.

You are right about the tests, and this is listed as shawnlaffan/Alien-Build-Plugin-PkgConfig-PPWrapper#1
I was not sure how to set something up to actually test the functionality but will have a look at Test::Alien::Build.

I now use it in CPAN releases of Alien::gdal and Alien::proj and it is working thus far, so there is at least indirect testing. The cpan-testers failures are unrelated.
https://metacpan.org/release/SLAFFAN/Alien-gdal-1.23
https://metacpan.org/release/SLAFFAN/Alien-proj-1.15

@plicease
Copy link
Member

I now use it in CPAN releases of Alien::gdal and Alien::proj and it is working thus far, so there is at least indirect testing. The cpan-testers failures are unrelated.
https://metacpan.org/release/SLAFFAN/Alien-gdal-1.23
https://metacpan.org/release/SLAFFAN/Alien-proj-1.15

Yup this is good 👍 I still want some unit tests for anything in AB core to make it easy to refactor stuff and catch things early on.

@plicease plicease added 🐣Enhancement Useful potential future feature (not a bug) 💣MSWin32 Windows is a weird best 🚉Platform Specific Often Windows lol, but could be something else labels Sep 11, 2020
@zmughal
Copy link
Member

zmughal commented Nov 11, 2023

I don't know if this will help, but has anybody else looked at:

I have used pkg-config-lite successfully with Strawberry Perl 5.38.

zmughal added a commit to perlrdf/Alien-Sord that referenced this issue Nov 12, 2023
This is needed because Meson skips the Pure Perl `pkg-config.bat`
provided by Strawberry Perl.

Connects with:
  - <mesonbuild/meson#9384>
  - <PerlAlien/Alien-Build#227>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐣Enhancement Useful potential future feature (not a bug) 💣MSWin32 Windows is a weird best 🚉Platform Specific Often Windows lol, but could be something else
Development

No branches or pull requests

3 participants