in reply to Re^2: Cannot build/install XML::Parser
in thread Cannot build/install XML::Parser
Looking at their respective Makefile.PL, X::P calls check_lib of Devel::CheckLib to find/verify the expat lib. But X::P::E just assumes that the library is there and links with -lexpat. And if it is there, as you said, then no problem. So the failure is most likely with check_lib of Devel::CheckLib. You could write a minimal script using said sub to see if it fails and how:
use Devel::CheckLib; $expat_libpath = $ENV{EXPATLIBPATH} || ''; $expat_incpath = $ENV{EXPATINCPATH} || ''; my @replacement_args; foreach (@ARGV) { if (/^EXPAT(LIB|INC)PATH=(.+)/) { if ( $1 eq 'LIB' ) { $expat_libpath = $2; } else { $expat_incpath = $2; } #push(@replacement_args, "$1=$2"); } else { push( @replacement_args, $_ ); } } @ARGV = @replacement_args; # ** I am using check_lib_or_exit() for verbosity check_lib_or_exit( # fill in what you prompted the user for here lib => [qw(expat)], header => ['expat.h'], incpath => $expat_incpath, ( $expat_libpath ? ( libpath => $expat_libpath ) : () ), );
You could also hack Devel::CheckLib (since you own it) to make it more verbose and pinpoint exactly where the problem is.
The absolute shortcut is to hack X::P's Makefile.PL to not exit 0 when it thinks that expat libraries/headers can not be found (according to CheckLib), and see if it will be linked eventually (since it is located in /usr/lib it will need no extra CFLAGS/LDFLAGS).
But you must make sure that the library is there and its header files too.
bw, bliako
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Cannot build/install XML::Parser
by Anonymous Monk on Mar 14, 2023 at 13:49 UTC | |
by bliako (Abbot) on Mar 14, 2023 at 14:33 UTC | |
by Anonymous Monk on Mar 15, 2023 at 12:42 UTC |