rob at eatenbyagrue.org
Wed May 16 00:07:06 PDT 2012
On Wed, May 16, 2012 at 3:51 PM, Christopher Short
<christopher.short at monash.edu> wrote:
> have any of you managed to successfully install XML::Xerces under Perl 5.14 ?
Just worked through it now. Its fiddly, but it appears to work.
If you haven't already got Xerces-C installed, you'll need to build
it. XML::Xerces requires 2.7.0 only, so the latest version isn't much
good to you. Grab it here:
Unpack and build, setting XERCESROOT along the way (critical to the
Xerces-C and Xerces::XML builds). Explicitly specifying the compilers
in runConfigure is important, as Xerces::XML will fail to build if
Xerces was not built with g++, but on many Linuxes configure finds
c++. Explicit is good!
$ tar xvfz xerces-c-src_2_7_0.tar.gz
$ cd xerces-c-src_2_7_0
$ export XERCESROOT=`pwd`
$ cd src/xercesc
$ ./runConfigure -p linux -c gcc -x g++
You'll probably want to install this somewhere, but I didn't for now.
XML::Xerces will link to wherever its built so it will work properly,
but you need to keep the build dir around if you don't install it. Or
you can do crazy shenanigans with static linking and such. Up to you
Now XML::Xerces. For Perl later that 5.9.notsure it needs to rebuild
the SWIG bindings. You'll need SWIG on your path, and XML::Xerces
needs the XERCES_DEVEL=1 environment variable to tell it what to do.
$ XERCES_DEVEL=1 cpanm XML::Xerces.
That completed successfully for me. I haven't verified it other than
to note that Perl can load it ok:
$ perl -MXML::Xerces -e1
$ echo $?
More information about the Melbourne-pm