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

Pkg-config method doesn't work anymore #69

Closed
hoytech opened this issue Oct 30, 2018 · 3 comments
Closed

Pkg-config method doesn't work anymore #69

hoytech opened this issue Oct 30, 2018 · 3 comments

Comments

@hoytech
Copy link

hoytech commented Oct 30, 2018

If I try to install Alien::LMDB on a system with liblmdb already installed it doesn't work. I tested on Ubuntu 18.04, and here is the same problem on cpantesters:

http://www.cpantesters.org/cpan/report/97f44fce-6ace-11e8-bf50-ee4c4956e891

Also I don't see anywhere in the docs a way to force disable the pkg-config stuff?

@plicease
Copy link
Member

You can force a system install by using the ALIEN_INSTALL_TYPE environment variable. pkg-config is just one method that you can use to probe for system libraries so there isn't a generic "turn pkg-config" off option:

% env ALIEN_INSTALL_TYPE=share cpanm Alien::LMDB

As far as I can tell the pkg-config probe is working correctly. The problem here is with the test, AlienLoaded isn't populated for a system install

https://metacpan.org/source/PLICEASE/Alien-Build-1.48/lib/Alien/Base.pm#L22

I don't think it has ever been populated for a system install--it is there to specifically handle dynamic libraries on a share install. Arguably this is an internal interface since it isn't documented, but at the very least it is deprecated since it isn't portable.

I recommend using Test::Alien which tests your alien in the way that it will actually be used, ie builds a toy XS and tries to call it from Perl. This will catch a lot of corner cases that you simply cannot test in any other way.

@hoytech
Copy link
Author

hoytech commented Oct 30, 2018

Ahh thanks for the pointer to ALIEN_INSTALL_TYPE.

OK got it on the AlienLoaded, not sure how I found that in the first place. I'll check out Test::Alien which I get a little time to spare.

Thanks!

@hoytech hoytech closed this as completed Oct 30, 2018
@plicease
Copy link
Member

np. Let me know if you run into any road blocks with Test::Alien!

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

No branches or pull requests

2 participants