Operating System - HP-UX
1752571 Members
5202 Online
108788 Solutions
New Discussion юеВ

Re: Linking problem while building XML::Parser against libexpat

 
SOLVED
Go to solution
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Linking problem while building XML::Parser against libexpat

don't REmove. just REname for now, but yes, that should help

# mv /usr/local/lib /usr/local/_lib_

You could also change the LD= line to have -L/usr/local/pa20_64/lib in front of the list, something like

LD=$(LD) -L/usr/local/pa20_64/lib

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ralph Grothe
Honored Contributor

Re: Linking problem while building XML::Parser against libexpat

Ah, moving of the wrong libexpat files out of /usr/local/lib revealed an interesting error message.

# CC=/opt/ansic/bin/cc perl Makefile.PL INC=-I/usr/local/pa20_64/include LDDLFLAGS=-L/usr/local/pa20>
Note (probably harmless): No library found for -lexpat

Expat must be installed prior to building XML::Parser and I can't find
it in the standard library directories. 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.


So the Module provides an extra EXPATLIBPATH and EXPATINCPATH environment variable.
I thought I read the README?
To my apology, the README doesn't mention :-(

Hey, but this works

# CC=/opt/ansic/bin/cc perl Makefile.PL EXPATINCPATH=/usr/local/pa20_64/include EXPATLIBPATH=/usr/lo>
Checking if your kit is complete...
Looks good
Writing Makefile for XML::Parser::Expat
Writing Makefile for XML::Parser
[root@gouda:/root/.cpan/build/XML-Parser-2.34]
# make
cp Parser/Encodings/x-sjis-cp932.enc blib/lib/XML/Parser/Encodings/x-sjis-cp932.enc
cp Parser/Encodings/iso-8859-7.enc blib/lib/XML/Parser/Encodings/iso-8859-7.enc
cp Parser/Style/Tree.pm blib/lib/XML/Parser/Style/Tree.pm
cp Parser/Encodings/iso-8859-9.enc blib/lib/XML/Parser/Encodings/iso-8859-9.enc
cp Parser/Encodings/x-euc-jp-unicode.enc blib/lib/XML/Parser/Encodings/x-euc-jp-unicode.enc
cp Parser/Encodings/README blib/lib/XML/Parser/Encodings/README
cp Parser/Encodings/euc-kr.enc blib/lib/XML/Parser/Encodings/euc-kr.enc
cp Parser/Encodings/windows-1250.enc blib/lib/XML/Parser/Encodings/windows-1250.enc
cp Parser/Encodings/windows-1252.enc blib/lib/XML/Parser/Encodings/windows-1252.enc
cp Parser/Encodings/big5.enc blib/lib/XML/Parser/Encodings/big5.enc
cp Parser/Encodings/iso-8859-3.enc blib/lib/XML/Parser/Encodings/iso-8859-3.enc
cp Parser/Encodings/Japanese_Encodings.msg blib/lib/XML/Parser/Encodings/Japanese_Encodings.msg
cp Parser/Style/Subs.pm blib/lib/XML/Parser/Style/Subs.pm
cp Parser/Encodings/iso-8859-4.enc blib/lib/XML/Parser/Encodings/iso-8859-4.enc
cp Parser/Encodings/iso-8859-8.enc blib/lib/XML/Parser/Encodings/iso-8859-8.enc
cp Parser/Encodings/x-euc-jp-jisx0221.enc blib/lib/XML/Parser/Encodings/x-euc-jp-jisx0221.enc
cp Parser/Encodings/iso-8859-2.enc blib/lib/XML/Parser/Encodings/iso-8859-2.enc
cp Parser/Encodings/x-sjis-jdk117.enc blib/lib/XML/Parser/Encodings/x-sjis-jdk117.enc
cp Parser/Encodings/x-sjis-unicode.enc blib/lib/XML/Parser/Encodings/x-sjis-unicode.enc
cp Parser/LWPExternEnt.pl blib/lib/XML/Parser/LWPExternEnt.pl
cp Parser/Style/Objects.pm blib/lib/XML/Parser/Style/Objects.pm
cp Parser.pm blib/lib/XML/Parser.pm
cp Parser/Style/Debug.pm blib/lib/XML/Parser/Style/Debug.pm
cp Parser/Encodings/x-sjis-jisx0221.enc blib/lib/XML/Parser/Encodings/x-sjis-jisx0221.enc
cp Parser/Style/Stream.pm blib/lib/XML/Parser/Style/Stream.pm
cp Parser/Encodings/iso-8859-5.enc blib/lib/XML/Parser/Encodings/iso-8859-5.enc
cp Expat.pm ../blib/lib/XML/Parser/Expat.pm
/usr/bin/perl /opt/cpan/lib/5.8.6/ExtUtils/xsubpp -noprototypes -typemap /opt/perl5/lib/5.8.6/E
xtUtils/typemap -typemap typemap Expat.xs > Expat.xsc && mv Expat.xsc Expat.c
cc -c -I/usr/local/pa20_64/include +z -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit -DVERSION=\"2.34\" -DXS_VERS
ION=\"2.34\" +Z "-I/opt/perl5/lib/5.8.6/PA-RISC2.0-LP64/CORE" Expat.c
Running Mkbootstrap for XML::Parser::Expat ()
chmod 644 Expat.bs
rm -f ../blib/arch/auto/XML/Parser/Expat/Expat.sl
LD_RUN_PATH="/usr/local/pa20_64/lib" /usr/bin/ld -b +vnocompatwarnings -L/usr/local/lib -L/lib
/pa20_64 Expat.o -o ../blib/arch/auto/XML/Parser/Expat/Expat.sl -L/usr/local/pa20_64/lib -lexpat
chmod 755 ../blib/arch/auto/XML/Parser/Expat/Expat.sl
cp Expat.bs ../blib/arch/auto/XML/Parser/Expat/Expat.bs
chmod 644 ../blib/arch/auto/XML/Parser/Expat/Expat.bs
Manifying ../blib/man3/XML::Parser::Expat.3
Manifying blib/man3/XML::Parser::Style::Objects.3
Manifying blib/man3/XML::Parser::Style::Debug.3
Manifying blib/man3/XML::Parser.3
Manifying blib/man3/XML::Parser::Style::Subs.3
Manifying blib/man3/XML::Parser::Style::Tree.3
Manifying blib/man3/XML::Parser::Style::Stream.3

# make test
rm -f ../blib/arch/auto/XML/Parser/Expat/Expat.sl
LD_RUN_PATH="/usr/local/pa20_64/lib" /usr/bin/ld -b +vnocompatwarnings -L/usr/local/lib -L/lib
/pa20_64 Expat.o -o ../blib/arch/auto/XML/Parser/Expat/Expat.sl -L/usr/local/pa20_64/lib -lexpat
chmod 755 ../blib/arch/auto/XML/Parser/Expat/Expat.sl
cp Expat.bs ../blib/arch/auto/XML/Parser/Expat/Expat.bs
chmod 644 ../blib/arch/auto/XML/Parser/Expat/Expat.bs
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'bl
ib/arch')" t/*.t
t/astress.........ok
t/cdata...........ok
t/decl............ok
t/defaulted.......ok
t/encoding........"my" variable $p masks earlier declaration in same scope at t/encoding.t line 94.
t/encoding........ok
t/external_ent....ok
t/file............ok
t/finish..........ok
t/namespaces......ok
t/parament........ok
t/partial.........ok
t/skip............ok
t/stream..........ok
t/styles..........ok
All tests successful.
Files=14, Tests=130, 4 wallclock secs ( 2.56 cusr + 0.67 csys = 3.23 CPU)


You saved my day :-)

Madness, thy name is system administration