Re: Warning (mostly harmless): No library found for -lxml2
by Corion (Patriarch) on Aug 01, 2024 at 09:25 UTC
|
'LIBS' => [$yazlibs], # e.g., '-lm'
... which lists all the libraries that some tool wants that your XS module wants to link to. It seems that these libraries are not found (and maybe not installed) when you run Makefile.PL. The "mostly harmless" message is rarely mostly harmless as usually, required libraries are required.
I guess you can improve the compilation situation by installing the -devel packages for all the libraries listed. | [reply] [d/l] [select] |
|
|
Thanks, but it's not that simple. The libraries are in place, and my code runs successfully. So I think the issue here may just be that ExtUtils::MakeMaker doesn't know how to find the libraries that ld does find late in the process.
... which I guess likely means this is mostly harmless.
| [reply] [d/l] |
|
|
Maybe we can get closer to the problem if you show us the output where Something more significant is going wrong with dynamic libraries later on when I run "make test". If the libraries are not needed, I'm not sure why they are listed in the Makefile.PL. As you are the maintainer of the module, maybe you can tell us why you put the libraries into the Makefile.PL in the first place?
| [reply] [d/l] [select] |
|
|
|
|
|
|
|
This might be a stupid question, but are the development-packages (=header files) also installed? I don't know about MacOS, but in many if not most Unix/Linux systems, the headers come in extra packages, so as to not clutter the harddisks of the average consumer.
| [reply] |
|
|
Re: Warning (mostly harmless): No library found for -lxml2
by syphilis (Archbishop) on Aug 01, 2024 at 13:52 UTC
|
Something more significant is going wrong with dynamic libraries later on when I run "make test" ...
This suggests to me that the warnings are almost certainly NOT harmless.
The warnings are telling you that EU::MM can't find the import libraries libexslt.a, libxslt.a, libxml2.a, etc., and that no attempt will therefore be made to link to them.
The failure to link to all of those import libraries will probably show up as runtime failures during "make test" because there's (probably) a whole lot of unresolved symbols.
The headers are obviously being found - otherwise there would have been compilation failures during the "make" stage.
I think you just need to tell EU::MM where those libraries are.
Cheers, Rob | [reply] |
|
|
MacOS doesn't have "import libraries". There, .a files would be static link libraries. Instead, it's dynamic libraries EUMM can't find.
| [reply] [d/l] |
|
|
Thanks, Rob. That would be a solid interpretation were it not for the fact that I can coerce the linking to work and the tests to run as noted in this comment down in the other trouser-leg of the thread.
| [reply] |
|
|
That would be a solid interpretation were it not for the fact that I can coerce the linking to work and the tests to run as noted in this comment down in the other trouser-leg of the thread.
Yeah - I saw that comment after I posted ... and wondered ...
And etj has pointed out that "it's dynamic libraries EUMM can't find".
Still, to me it seems unreasonable to expect the build to work if EU::MM can't find those libraries - given (my assumption) that none of those linking directives will therefore be present in the build's "make" stage.
However, given my lack of understanding of MacOs processes, I should just shut up.
Cheers, Rob
| [reply] |
Re: Warning (mostly harmless): No library found for -lxml2
by bliako (Abbot) on Aug 02, 2024 at 08:27 UTC
|
from a diagonal google search it looks to me the error is coming from OSX and not perl. Code signing libraries perhaps.
| [reply] |
|
|
Yes, I think it's to do with MacOS and code-signing. But I would expect MakeMaker to generate a Makefile that avoids that trap.
| [reply] |
|
|
And with that, I finally thought to myself: I wonder if my version of MakeMaker is too old? On checking, I found that I had version 7.34, which the changelog says is from 19 March 2018 ... more than six years old!
I upgraded to the current version (7.70) and found that perl Makefile.PL now runs without warnings (good!) ...
... but that the actual make now fails completely, saying
SimpleServer.xs:34:10: fatal error: 'EXTERN.h' file not found
Oh well. Onward and upward! | [reply] [d/l] [select] |
|
|