Building Perl Module XML::Parser (108 Views)
Reply
Frequent Advisor
Syed Madar J S
Posts: 59
Registered: ‎04-22-2008
Message 1 of 5 (108 Views)
Accepted Solution

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!!
Please use plain text.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 2 of 5 (108 Views)

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...
Please use plain text.
Respected Contributor
Shinji Teragaito_1
Posts: 212
Registered: ‎12-20-2007
Message 3 of 5 (108 Views)

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
%
Please use plain text.
Frequent Advisor
Syed Madar J S
Posts: 59
Registered: ‎04-22-2008
Message 4 of 5 (108 Views)

Re: Building Perl Module XML::Parser

Thanks All, i would try building on the suggested lines.
Please use plain text.
Frequent Advisor
Syed Madar J S
Posts: 59
Registered: ‎04-22-2008
Message 5 of 5 (108 Views)

Re: Building Perl Module XML::Parser

Closing the Thread.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation