-
Notifications
You must be signed in to change notification settings - Fork 12
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
Use ExtUtils::PkgConfig to discover the CFLAGS and LDFLAGS for external libraries #210
Use ExtUtils::PkgConfig to discover the CFLAGS and LDFLAGS for external libraries #210
Conversation
1992abc
to
3998044
Compare
@marc-vanderwal, milestone? |
I wasn’t sure about the milestone. It might be nice to have it in 2024.2, though. What do you think? |
On FreeBSD:
Installation instructions for build environment must be updated too. https://github.com/zonemaster/zonemaster/tree/develop/docs/internal/distrib-testing |
If other documents are updated too it should be fine. |
Yes, I’m preparing a PR for the installation instructions in zonemaster/zonemaster because we need one more package to be installed. I’ll set the milestone to 2024.2 then. |
A pull request on zonemaster-ldns [1] now requires ExtUtils::PkgConfig. Update the documentation to that effect. [1]: zonemaster/zonemaster-ldns#210
A pull request on zonemaster-ldns [1] now requires ExtUtils::PkgConfig. Update the documentation to that effect. [1]: zonemaster/zonemaster-ldns#210
51fce8a
to
b27f14e
Compare
On platforms or systems where libraries might be installed somewhere else than the usual /usr/local/lib or /usr/lib, running perl Makefile.PL might fail to detect the location of the libraries. Fortunately, pkg-config can help us determine which appropriate CFLAGS and LDFLAGS to append to the compiler and linker command lines respectively, and ExtUtils::PkgConfig provides a simple wrapper around that command line utility. This unfortunately requires one more dependency, but that library is widely packaged across Linux distributions and FreeBSD. It’s packaged as follows: * on Alpine Linux: perl-extutils-pkgconfig; * on Debian-based OSes: libextutils-pkgconfig-perl; * on FreeBSD: p5-ExtUtils-PkgConfig; * on Red Hat-based OSes: perl-ExtUtils-PkgConfig.
Install ExtUtils::PkgConfig in the build container.
As a drive-by change, update the NSEC test in rr.t because the .se has started using ZONEMD.
b27f14e
to
c7b7407
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this on Arch Linux and it seems to work.
Pull request zonemaster/zonemaster-ldns#210 added an additional build-time dependency on ExtUtils::PkgConfig that wasn’t mirrored in the CI configuration for Zonemaster::Engine, therefore breaking CI. Adding the missing dependency should restore CI to normal working state.
Pull request zonemaster/zonemaster-ldns#210 added an additional build-time dependency on ExtUtils::PkgConfig that wasn’t mirrored in the CI configuration for Zonemaster::Engine, therefore breaking CI. Adding the missing dependency should restore CI to normal working state.
Pull request zonemaster/zonemaster-ldns#210 added an additional build-time dependency on ExtUtils::PkgConfig that wasn’t mirrored in the CI configuration for Zonemaster::Engine, therefore breaking CI. Adding the missing dependency should restore CI to normal working state.
Pull request zonemaster/zonemaster-ldns#210 added an additional build-time dependency on ExtUtils::PkgConfig that wasn’t mirrored in the CI configuration for Zonemaster::Engine, therefore breaking CI. Adding the missing dependency should restore CI to normal working state.
Pull request zonemaster#210 forgot to document the change in README.md. Let’s fix that before quickly before the next release.
Purpose
This PR aims to make detection of CFLAGS and LDFLAGS more reliable and portable across *nix systems by calling out to
pkg-config
. By doing so, libraries that have been installed by hand (in/usr/local
or a private prefix such as$HOME/.local
) or through alternative package managers are more likely to be successfully detected.Context
See #129.
Changes
How to test this PR
Run
perl Makefile.PL
; it should still work.Building the Dockerfile should also still work.