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


In reply to Re^3: Cannot build/install XML::Parser by bliako
in thread Cannot build/install XML::Parser by nixcat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.