You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into some issues with using the PkgConfig plugin with qhull. The root of this is that qhull uses separate pc files for static and dynamic linking, and because of how some Linux distributions (e.g. Debian 12) link their "system" static libraries, they are unable to be linked against the Perl .so file for an XS module. So, system installs need to use dynamic libraries and share installs should use static.
Unfortunately, the use of distinct pc files (qhull_r for dynamic, qhullstatic_r for static) breaks the assumptions of PkgConfig, which assumes it can get both static and dynamic flags from the same pc file.
But now the code can no longer take advantage of Plugin::PkgConfig::Negotiate1, and I'm also replicating all of the code in the PkgConfig plugin.
I think it would be worth considering
having separate probe and gather modes for the PkgConfig plugin;
gather only for the install the plugin is specified for (or both if it is specified outside of a sys or share block)
The first could be accomplished by an additional parameter to the plugin, and each plugin's init would react accordingly.
The second could be accomplished by paying attention to the $meta->{phase} attribute (at least if the plugin is instantiated from an alienfile). I don't foresee a downside to this being the default behavior.
Footnotes
I note that PkgConfig::Negotiate explicitly refuses to use PkgConfig::CommandLine on Solaris & Windows ↩
The text was updated successfully, but these errors were encountered:
The probe always fails(🤞), but PkgConfig is now set up to use the proper .pc file for a static share install and I don't have to reimplement its guts. This avoids dealing with the separate .pc files at the cost of not being able to take advantage of a system install.
I'm running into some issues with using the PkgConfig plugin with qhull. The root of this is that
qhull
uses separate pc files for static and dynamic linking, and because of how some Linux distributions (e.g. Debian 12) link their "system" static libraries, they are unable to be linked against the Perl .so file for an XS module. So, system installs need to use dynamic libraries and share installs should use static.Unfortunately, the use of distinct pc files (qhull_r for dynamic, qhullstatic_r for static) breaks the assumptions of PkgConfig, which assumes it can get both static and dynamic flags from the same pc file.
Here's the gist of the workflow:
so, conceptually, this is
But this doesn't work because PkgConfig
An alternative approach might be to write it all out explicitly:
But now the code can no longer take advantage of Plugin::PkgConfig::Negotiate1, and I'm also replicating all of the code in the PkgConfig plugin.
I think it would be worth considering
The first could be accomplished by an additional parameter to the plugin, and each plugin's init would react accordingly.
The second could be accomplished by paying attention to the
$meta->{phase}
attribute (at least if the plugin is instantiated from an alienfile). I don't foresee a downside to this being the default behavior.Footnotes
I note that PkgConfig::Negotiate explicitly refuses to use PkgConfig::CommandLine on Solaris & Windows ↩
The text was updated successfully, but these errors were encountered: