CPAN testers requests the opinion of someone with MakeMaker / C compiler fu. They foolishly asked me. :)
Anyone have a thought? -------- Original Message -------- Subject: Re: PM post on Makefile.PL FAIL for missing libraries Date: Mon, 24 Sep 2007 19:03:17 -0400 From: David Golden <[EMAIL PROTECTED]> To: CPAN Testers Discuss <[EMAIL PROTECTED]> CC: Michael G Schwern <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> On 9/24/07, Barbie <[EMAIL PROTECTED]> wrote: > > die "Required library not installed: libfoo\n"; > > I would prefer the author didn't force that text, as it implies they are > doing their own checking for a library, which is not necessarily the > same as how a compiler would load the library. The better way is to be > able to parse the compiler output and detect the warning that the > library is missing. That makes sense, but requires parsing compiler output for error messages for missing libraries -- and actually, a missing library is probably going to fail compilation due to missing headers anyway. And then how do you tell if a missing header is really a library problem or just a typo? #include <sdtio.h> > > > m/No library found for -l([-\w]+)/g > > > > Should I add that to CPAN::Reporter as well? If so, I'll squeak it in > > before 1.00. How portable is that across compilers? > > It was working for gcc and Visual Studio, I don't have others so can't > say whether it is truly portable. If we encourage this it might throw up > other formats. Looking into it -- that seems to be a Makefile.PL output from libraries in LIBS not being found -- generated from a lot of deep magic buried in ExtUtils::LibList::Kid. (Which is probably why it's portable. And I don't think that Module::Build offers any comparable capability, either. Further, the warning is actually this: Note (probably harmless): No library found for -lfoo So is it harmless or not? I guess it depends on whether make fails, which might or might not be due to a missing library. Should a harmless missing library and a .xs syntax error cause a report to be thrown away? Also, at least for CPAN::Reporter, I'd have to add capabilities to CPAN and CPAN::Reporter to retain output from each phase to the next so that if "make" fails, I can go back and parse PL output for the "no library" string. That's not terribly hard (Andreas and I have already discussed tacking it onto the CPAN::Distribution object), but it's more than the trivial addition of a quick regex that I had anticipated. > I think we are in agreement that these reports should not be sent, but > need to find a suitable method to detect the reason for the failure and > accepting that missing libraries are legitimate reasons for abandoning > the report. I've copied Schwern since I'm not sure if he's on the cpan-testers-discuss list and I think we need the opinion of someone with more EUMM/compiler-fu... David -- I have a date with some giant cartoon robots and booze.