[sf-perl] current choice: XML::Parser or my hair

David Alban extasia at extasia.org
Fri Oct 7 14:01:54 PDT 2011


greetings,

i seem to be pulling out my hair on this fine friday afternoon.
trying to install XML::Parser as my last prerequisite for SOAP::Lite.

i try first with cpan.  i get:

cpan> install SOAP::Lite

[...]

---- Unsatisfied dependencies detected during
[M/MK/MKUTTER/SOAP-Lite-0.714.tar.gz] -----
    XML::Parser
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]

[to which i answer yes]

[...]

  CPAN.pm: Going to build T/TO/TODDR/XML-Parser-2.41.tar.gz

/nas/home/dalban/.cpan/build/XML-Parser-2.41/assertlibDA1JJiD9: error
while loading shared libraries: libexpat.so.1: cannot open shared
object file: No such file or directory

Expat must be installed prior to building XML::Parser and I can't find
it in the standard library directories. Install 'expat-devel' package with your
OS package manager. See 'README'.

Or you can download expat from:

http://sourceforge.net/projects/expat/

If expat is installed, but in a non-standard directory, then use the
following options to Makefile.PL:

    EXPATLIBPATH=...  To set the directory in which to find libexpat

    EXPATINCPATH=...  To set the directory in which to find expat.h

For example:

    perl Makefile.PL EXPATLIBPATH=/home/me/lib EXPATINCPATH=/home/me/include

so i installed expat-2.0.1 from source into /nas/reg/lib and
/nas/reg/include (my PERL5LIB is /nas/reg/lib/perl5).  retried.  still
complained about not being able to find expat.  so i created these
symlinks:

lrwxrwxrwx   1 root root      23 Oct  7 19:56 /usr/lib/libexpat.a ->
/nas/reg/lib/libexpat.a
lrwxrwxrwx   1 root root      24 Oct  7 19:55 /usr/lib/libexpat.la ->
/nas/reg/lib/libexpat.la
lrwxrwxrwx   1 root root      24 Oct  7 19:55 /usr/lib/libexpat.so ->
/nas/reg/lib/libexpat.so
lrwxrwxrwx   1 root root      26 Oct  7 19:55 /usr/lib/libexpat.so.1
-> /nas/reg/lib/libexpat.so.1

lrwxrwxrwx  1 root root      23 Oct  7 20:00 /usr/local/lib/libexpat.a
-> /nas/reg/lib/libexpat.a
lrwxrwxrwx  1 root root      24 Oct  7 20:00
/usr/local/lib/libexpat.la -> /nas/reg/lib/libexpat.la
lrwxrwxrwx  1 root root      24 Oct  7 20:00
/usr/local/lib/libexpat.so -> /nas/reg/lib/libexpat.so
lrwxrwxrwx  1 root root      26 Oct  7 20:01
/usr/local/lib/libexpat.so.1 -> /nas/reg/lib/libexpat.so.1

tried again.  same result.

tried setting these in the environment and rerunning the cpan shell:

export EXPATLIBPATH=/nas/reg/lib
export EXPATINCPATH=/nas/reg/include

no luck.

then i tried a command line install, still with EXPATLIBPATH and
EXTINCPATH defined in the environment.

$ export TREEROOT=/nas/reg ; perl Makefile.PL PREFIX=$TREEROOT
LIB=$TREEROOT/lib/perl LDFLAGS=-L/usr/lib64 EXPATLIBPATH=/nas/reg/lib
EXPATINCPATH=/nas/reg/include 2>&1 | tee -a make.makefile.out
Checking if your kit is complete...
Looks good
Writing Makefile for XML::Parser::Expat
Writing MYMETA.yml and MYMETA.json
Writing Makefile for XML::Parser
Writing MYMETA.yml and MYMETA.json

$ echo $?
0

make also succeeds.  but just when i think i've reached the finish line:

$ sudo make install
make[1]: Entering directory `/nas/home/dalban/dist/XML-Parser-2.41/Expat'
make[1]: Leaving directory `/nas/home/dalban/dist/XML-Parser-2.41/Expat'
Can't coerce array into hash at
/usr/lib/perl5/5.8.8/ExtUtils/Install.pm line 94.
make: *** [pure_site_install] Error 255

on http://utlw.blogspot.com/2010/11/one-for-google-bot.html i find:

If you get the following really strange message :
Can't coerce array into hash at
/usr/lib/perl5/5.8.8/ExtUtils/Install.pm line 94.

Just do
touch Makefile.PL; make ; make install

Yes you need 2 makes: first one will cause Makefile to be rebuilt with
the same params as used the first time, second one will do the install
you wanted in the first place.

Now the longer question is "WHAT CHANGED?" And I have no answer to that.

so i touch Makefile.PL and do make again.  i get:

Makefile out-of-date with respect to Makefile.PL
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
/usr/bin/perl Makefile.PL "PREFIX=/nas/reg" "LIB=/nas/reg/lib/perl"
"LDFLAGS=-L/usr/lib64"

Expat must be installed prior to building XML::Parser and I can't find
it in the standard library directories. Install 'expat-devel' package with your
OS package manager. See 'README'.

Or you can download expat from:

http://sourceforge.net/projects/expat/

If expat is installed, but in a non-standard directory, then use the
following options to Makefile.PL:

    EXPATLIBPATH=...  To set the directory in which to find libexpat

    EXPATINCPATH=...  To set the directory in which to find expat.h

For example:

    perl Makefile.PL EXPATLIBPATH=/home/me/lib EXPATINCPATH=/home/me/include

Note that if you build against a shareable library in a non-standard location
you may (on some platforms) also have to set your LD_LIBRARY_PATH environment
variable at run time for perl to find the library.

Checking if your kit is complete...
Looks good
Writing Makefile for XML::Parser::Expat
Writing MYMETA.yml and MYMETA.json
Writing Makefile for XML::Parser
Writing MYMETA.yml and MYMETA.json
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command.  <==
false
make: *** [Makefile] Error 1

if i do make again, i get lots of expat errors:

Expat.c:2687: error: expected ';' before 'parser'
Expat.c:2688: warning: ISO C90 forbids mixed declarations and code
Expat.xs:2194: error: 'parser' undeclared (first use in this function)
Expat.xs:2194: warning: cast to pointer from integer of different size
Expat.xs:2205: warning: unused variable 'pret'
Expat.xs:2194: warning: unused variable 'cbv'
Expat.xs:2192: warning: unused variable 'type'
make[1]: *** [Expat.o] Error 1
make[1]: Leaving directory `/nas/home/dalban/dist/XML-Parser-2.41/Expat'
make: *** [subdirs] Error 2

what am i missing?

thanks,
david

-- 
Live in a world of your own, but always welcome visitors.
***
Just say NO to a police state:
http://www.nytimes.com/2011/09/13/opinion/protect-our-right-to-anonymity.html


More information about the SanFrancisco-pm mailing list