Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Installing XML::Parser (with expat)

by syphilis (Archbishop)
on Feb 14, 2007 at 10:34 UTC ( [id://599904]=note: print w/replies, xml ) Need Help??


in reply to Installing XML::Parser (with expat)

./configure --prefix=/home/reliant/shaw/.local

Sometimes it's easier to just build a static library:
./configure --enable-static --disable-shared --prefix=/home/reliant/sh +aw/.local
Of course, it shouldn't be necessary to do that. But it can save some aggravation :-)

You still set $expat_libpath and $expat_incpath the same as you've already done ... and it should work ok. Worked fine for me on Windows - only problem was that I had to copy lib/expat.h and lib/expat_external.h to the tests folder to get 'make check' to run successfully when building expat-2.0.0.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Installing XML::Parser (with expat)
by Corion (Patriarch) on Dec 11, 2013 at 12:12 UTC

    Weirdly enough, the --enable-static trick did not work out for me, but for completeness (and off-site backup :) ), here is what I need to do to build expat and XML::Parser on Solaris x86 with the SUN C compiler:

    First build expat:

    PATH=/usr/ccs/bin:$PATH # to add the correct "ar" # autotools does not seem to know when the configuration was changed, +this is just a safety measure gmake clean CC=/opt/SUNWspro/bin/cc CFLAGS="-KPIC -O -D_LARGEFILE_SOURCE -D_FILE_O +FFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -xarch=generic64" ./configure - +-prefix=/home/corion/lib --enable-shared gmake all # this one might not compile the C++ checks, if you don't have the SUN + C++ compiler installed gmake check gmake install

    After installation, remember to update LD_LIBRARY_PATH in an appropriate location:

    # Update LD_LIBRARY_PATH export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/corion/lib

    Then, the installation of XML::Parser works, although the SUN C compiler did not like having the library directories listed after the -lexpat command. So I had to fudge that by patching the Makefile.PL:

    unless ( check_lib( # fill in what you prompted the user for here #lib => [qw(expat)], header => ['expat.h'], debug => 1, incpath => $expat_incpath, # Ugly hack here ($expat_libpath? (libpath => "$expat_libpath -lexpat"):()), )) {

    Then, configuring and testing Just Works:

    perl Makefile.PL EXPATLIBPATH=/home/corion/lib/lib EXPATINCPATH=/home/ +corion/lib/include -lexpat gmake gmake test gmake install

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://599904]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found