Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

Building Perl Module XML::Parser

SOLVED
Go to Solution
Highlighted
Frequent Advisor

Building Perl Module XML::Parser

Hi,

We had been normally building the XML::Parser perl module in shared mode, but previously it was built in static/archive mode. The difference is, when built in shared mode the module does not load if the "libexpat" library is NOT present in "/usr/local/lib/". But it archive mode it doesn't requires such conditions.

Posting the chatr of both the perl module binaries:

Perl Module in Archive mode:
# chatr ./lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/XML/Parser/Expat/Expat.so
./lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/XML/Parser/Expat/Expat.so:
32-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /usr/lib/hpux32
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
6 text 04000000 z---c- D (default)
7 data 40000000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap disabled
address space model: default
caliper dynamic instrumentation disabled



Perl Module in Shared Mode:
# chatr ./lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/XML/Parser/Expat/Expat.so
./lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/XML/Parser/Expat/Expat.so:
32-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /usr/lib/hpux32:/usr/local/lib/hpux32
shared library list:
libexpat.so
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
7 text 04000000 z---c- D (default)
8 data 40010000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap disabled
address space model: default
caliper dynamic instrumentation disabled

As you can see there is a dependency on library "shared library list: libexpat.so", but not so in Archive mode.

Can any one suggest how this module could be built in Archive Mode ?

I use the following method to build the module in Shared Mode.

#perl Makefile.PL EXPATLIBPATH= EXPATINCPATH=

I am asking of the build option, in which the dependency can be resolved, by building this module in Archive Mode, Which i don't know how to!!
4 REPLIES
Acclaimed Contributor Acclaimed Contributor

Re: Building Perl Module XML::Parser

Hi:

See if this helps:

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1326545

See Shinji commentary therein.

Regards!

...JRF...
Respected Contributor Respected Contributor

Re: Building Perl Module XML::Parser

Hi,

I don't have a smart procedure. But after generating Makefile, you can
change Expat/Makefile to use libexpat.a instead of libexpat.so.

% diff Expat/Makefile.orig Expat/Makefile
265c265
< LDLOADLIBS = -L/home/shinji/oss/httpd-2.2.8/srclib/apr-util/xml/expat/lib/.libs -lexpat
---
> LDLOADLIBS = /home/shinji/oss/httpd-2.2.8/srclib/apr-util/xml/expat/lib/.libs/libexpat.a
%

% chatr blib/arch/auto/XML/Parser/Expat/Expat.so
blib/arch/auto/XML/Parser/Expat/Expat.so:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /usr/lib/hpux64
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
7 text 4000000000000000 z---c- D (default)
8 data 6000000000000000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap disabled
address space model: default
caliper dynamic instrumentation disabled
%
Frequent Advisor

Re: Building Perl Module XML::Parser

Thanks All, i would try building on the suggested lines.
Frequent Advisor

Re: Building Perl Module XML::Parser

Closing the Thread.