Operating System - HP-UX
1846252 Members
5539 Online
110255 Solutions
New Discussion

problem comiling XML::Parser module

 
Kam Cheung
Occasional Contributor

problem comiling XML::Parser module

I am having problem compiling XML::Parser perl module. I keep on getting the error message, /usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libc.2.
/lur/lib/dld.sl: Exec format error.

I read on this forum that someone else had similar problem installing another perl module. She fixed it by adding -lcl -lthread to the build. I put these in various places in the Makefile generated by the script Makefile.PL but still has the same problem. Has anyone had this problem with XML::Parser? How do I fix this? Where do I add these flags in the Makefile?

Thanks.
4 REPLIES 4
benoit Bruckert
Honored Contributor

Re: problem comiling XML::Parser module

Hi,
Try to specify :
LD_PRELOAD=/usr/lib/libc.2
export LD_PRELOAD
and check if it's work.
You should have the explanation of the pb. with man dld.sl....

hope that help..
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Kam Cheung
Occasional Contributor

Re: problem comiling XML::Parser module

I am still getting the same problem in compiling XML::Parser.

I added environment variable as suggested:
export LD_PRELOAD=/usr/lib/libc.2

and compile again but still run into the same problem when I run make test:

t/astress.........../usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libc.2
/usr/lib/dld.sl: Exec format error
Can't load 'blib/arch/auto/XML/Parser/Expat/Expat.sl' for module XML::Parser::Expat: Exec format error at /home/apache/perl/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206.
at blib/lib/XML/Parser.pm line 15
Compilation failed in require at blib/lib/XML/Parser.pm line 15.

Please help! Thanks.
benoit Bruckert
Honored Contributor

Re: problem comiling XML::Parser module

Hi,
the LD_PRELOAD should be done before starting Apache, not during the compilation phase.
instead of make test, try previously to start apache, and see if you have the same error !
(I never use the make test !!!)
And before starting Apache don't forget the LD_PRELOAD.

The LD_PRELOAD is just a fast way to see if your module is working.
The best thing after is to compile again with the proper order in the Library to include the thread library before the others !
Where did you get the XML::Parser module ? may be I can compile it on my side to see if I have the same trouble ??

Tell me if it's work !!
regards
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Kam Cheung
Occasional Contributor

Re: problem comiling XML::Parser module

September 27, 2002 13:38 PM GMT

--------------------------------------------------------------------------------
Guy Mengel posted a comment on this forum on 10/12/2000 saying I must download the perl source and recompile with flags -lcl -lthread which I have not done. I am not a sys admin person so I tried to avoid compile the whole perl. May be I need to do this. I am not using apache server. I think it's just part of a directory path name. I tried compiling with another perl and got the same error. I downloaded the XML:Parser from cpan.org. To install this you all so need expat. When you compile, it will tell you in case you have not installed expat.

Thanks very much.

============================
Mengel wrote: I have had the same exact problem using the Oracle DBI drivers for perl.
Simply add the pthread and cl libraries when building perl. Note:
You MUST rebuild perl to get rid of this issue, if you are using a binary
then you must get the sources and recompile adding the libraries
-lpthread -lcl when asked for the library information. Note2: This is NOT building
a "threaded" perl either, unless you need threads you should be answering "no" to
building a threaded perl.