Operating System - HP-UX
1833613 Members
3317 Online
110062 Solutions
New Discussion

ld: can't find library for -lexpat

 
Brett Simpson
Frequent Advisor

ld: can't find library for -lexpat

All,
I've been trying to make the XML Parser module and keep getting the following error:

cc -c -Ae -D_HPUX_SOURCE +z +e Wl ,+vnocompatwarnings +DD64 -I/usr/lo
cal/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit -DVERSIO
N=\"2.34\" -DXS_VERSION=\"2.34\" +Z "-I/opt/perl5/lib/5.8.3/PA-RISC2.0-LP64/COR
E" 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/lib" /usr/bin/ld -b +vnocompatwarnings -L/usr/l
ocal/lib -L/lib/pa20_64 Expat.o -o ../blib/arch/auto/XML/Parser/Expat/Expat.sl
-lexpat
ld: Can't find library for -lexpat
Fatal error.
*** Error exit code 1

I've set the LDPATH, LD_RUN_PATH, etc. I still get the error. Does anyone have any ideas?
Thanks,

Brett
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: ld: can't find library for -lexpat

Well, I'm going to ask an extremely obvious question: Have you downloaded and installed expat?

http://hpux.connect.org.uk/hppd/hpux/Development/Tools/expat-1.95.7/
If it ain't broke, I can fix that.
ranganath ramachandra
Esteemed Contributor

Re: ld: can't find library for -lexpat

you should be setting LPATH or specify the search path to linker using -L .
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Brett Simpson
Frequent Advisor

Re: ld: can't find library for -lexpat

1. Yes. Expat is installed and the libs are in /usr/local/lib.

2. I tried setting LPATH earlier, but it still didn't work. The -L/usr/local/lib is also set in the linker section of the makefile.

That's what makes this so weird!

Thanks
ranganath ramachandra
Esteemed Contributor

Re: ld: can't find library for -lexpat

since you are building 64-bit, are you sure that the 64-bit libexpat is in /usr/local/lib ? there may be a libexpat there which is actually 32-bit and the 64-bit one may be in /usr/local/lib/pa20_64 ?

if 'file /usr/local/lib/libexpat.*' does not say 'ELF shared library' (and says 'PA 2.0' or some such thing) then its not a 64-bit library. i think the 64-bit linker ignores 32-bit libraries in the search path, but i am not sure of that.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Brett Simpson
Frequent Advisor

Re: ld: can't find library for -lexpat

I will check that as I believe that may be the case. Thanks