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

Alien-Libxml2 needs PkgConfig #394

Open
mtelka opened this issue Apr 20, 2023 · 4 comments
Open

Alien-Libxml2 needs PkgConfig #394

mtelka opened this issue Apr 20, 2023 · 4 comments
Labels
🐞Bug Something fails that should not (not a feature) 🦖Unreproducible Unable to reproduce, may be difficult or impossible to address, please add more detail if possible

Comments

@mtelka
Copy link

mtelka commented Apr 20, 2023

It looks like Alien-Libxml2 needs PkgConfig to build itself, but such dependency is missing in the package metadata (META.json).

@plicease
Copy link
Member

Alien-Libxml2 should work with either PkgConfig.pm, PkgConfig::LibPkfConf or the system pkg-config. Alien-Build will dynamically require PkgConfig.pm if either pkg-config or PkgConfig::LibPkfConf aren't found when it is installed. The alienfile for this alien doesn't directly use PkgConfig, but instead uses the pkg-config negotiator plugin Alien::Build::Plugin::PkgConfig::Negotiate to select the best available implementation for the current platform.

@mtelka
Copy link
Author

mtelka commented Apr 20, 2023

In my case there was pkg-config installed (but no PkgConfig.pm). The failure is this:

(cd $(BUILD_DIR) ; MAKE=/usr/gnu/bin/make \
                        PATH=/usr/gcc/7/bin/::/usr/bin/amd64:/usr/bin:/usr/gnu/bin:/usr/sbin/amd64:/usr/sbin:/usr/perl5/5.36/bin \
                        LANG="" CC="/usr/gcc/7/bin/gcc" CFLAGS="-m64 -O3" PERL="/usr/perl5/5.36/bin/perl"
                        /usr/perl5/5.36/bin/perl Makefile.PL )
Architecture detection: Unknown archname 'i86pc-solaris-thread-multi-64'. at /usr/perl5/vendor_perl/5.36/Alien/Build/Plugin/Core/Setup.pm line 247.
Could not find an appropriate pkg-config or pkgconf implementation, please install PkgConfig.pm, PkgConfig::LibPkgConf, pkg-config or pkgconf at $(BUILD_DIR)/alienfile line 40.
$ /usr/bin/pkg-config --version
0.29.2
$

Once I installed PkgConfig.pm the build passed.

@mtelka
Copy link
Author

mtelka commented Apr 20, 2023

There is also 64-bit pkg-config installed, but this should make no difference:

$ /usr/bin/amd64/pkg-config --version
0.29.2
$

@plicease plicease transferred this issue from PerlAlien/Alien-Libxml2 Apr 20, 2023
@plicease
Copy link
Member

Moving this to AB since it is not specific to Alien::Libxml2.

Is pkg-config in the PATH? AB should find it if so. (I would expect /usr/bin to be in the PATH but when you ran it you used the full path).

This is the logic it uses to find pkg-config
https://metacpan.org/release/PLICEASE/Alien-Build-2.78/source/lib/Alien/Build/Plugin/PkgConfig/CommandLine.pm#L24-31

@plicease plicease added 🐞Bug Something fails that should not (not a feature) 🦖Unreproducible Unable to reproduce, may be difficult or impossible to address, please add more detail if possible labels May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞Bug Something fails that should not (not a feature) 🦖Unreproducible Unable to reproduce, may be difficult or impossible to address, please add more detail if possible
Development

No branches or pull requests

2 participants