cpan-testers-discuss  

Re: PM post on Makefile.PL FAIL for missing libraries

Sisyphus
Thu, 27 Sep 2007 00:27:44 -0700


----- Original Message ----- From: "David Cantrell" <[EMAIL PROTECTED]>
.
.

I'm gonna wrote Devel::DoesLibraryExist (suggestions for a better name
would be most welcome).  It will test by compiling this:
 int main(void) { return 42; }

attempting to link it to $libfoo, and detecting whether the resulting
executable can be run.  It will have one function which will return true
or false, and a version which will either return true or die with a
suitable message.

That will tell us whether the library is being found - though it doesn't tell us anything about the locatability of any header files. Unfortunately it also won't help when we need to determine whether a sufficiently recent version of the library is available - for which I see no alternative other than to have the Makefile.PL process actually compile and run an executable that returns the library version.

The big question for the author of the PM post (who I happen to know quite well) is "Having had the 'Makefile.PL' process establish that the build environment is inadequate, how does one then have the process terminate in such a way that an NA is reported ?"

.
.
Further, the warning is actually this:
    Note (probably harmless): No library found for -lfoo

So is it harmless or not?

TONS of modules' build processes say that.  It is very rare indeed for
it to be harmless.

On many of my Win32 builds of perl I often get that warning in relation to each of the $Config{libs} libraries. In those cases it is nearly always harmless. However, I have found it *never* to be harmless when the warning relates to other libraries.

Cheers,
Rob