Home > Archive > PERL Modules > April 2005 > XML::Parser::Expat install problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
XML::Parser::Expat install problem
|
|
| Justin Wyllie 2005-04-24, 3:55 am |
| Hi
I am trying to install this module. I have installed XML-Parser-2.34 and
this seems to be ok. It is supposed to install XML::Expat with it.
On my system it seems to have partly installed XML:;Expat. I have:
Expat::Expat.so
Expat.Expat.bs - which is in fact empty.
However when I try to use this in a Perl Script it fails with this message:
'/usr/home/xxx/usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd/auto/XML/Par
ser/Expat/Expat.so' for module XML::Parser::Expat: Shared object
"libexpat.so.5" not found at
/usr/local/lib/perl5/5.6.1/i386-freebsd/DynaLoader.pm line 206.
I dedice from this that the libexpat.so.5 compiled file is missing. I have
tried installing Expat directly rather than as part of the XML-Parser-2.34
build from CPAN. Doing this with expat-1.95.6 it does install expat.so.4
(not in my Perl libaries - but still it looks promising.
So I tried doing this with expat-1.95.8 which I got as a .tar.gz file from
sourceforge.net and my attempts to unzip and uncompress this all fail.
Can anyone tell me how I can get libexpat.so.5 installed onto my system ?
Many thanks for any help
Justin Wyllie
| |
| Sisyphus 2005-04-24, 8:55 am |
|
"Justin Wyllie" <justinw@mms-oxfordnotspamhere.com> wrote in message
news:426add69_4@mk-nntp-2.news.uk.tiscali.com...
>I have:
>
> Expat::Expat.so
> Expat.Expat.bs - which is in fact empty.
>
> However when I try to use this in a Perl Script it fails with this
message:
>
>
'/usr/home/xxx/usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd/auto/XML/Par
> ser/Expat/Expat.so' for module XML::Parser::Expat: Shared object
> "libexpat.so.5" not found at
> /usr/local/lib/perl5/5.6.1/i386-freebsd/DynaLoader.pm line 206.
>
Installing XML::Parser will install *that* module and nothing else. It won't
install expat (which is needed by XML::Parser). The Expat.so and Expat.bs
files that you found are both part of the XML::Parser module. It's normal
that Expat.bs is empty.
> I dedice from this that the libexpat.so.5 compiled file is missing. I have
> tried installing Expat directly rather than as part of the XML-Parser-2.34
> build from CPAN. Doing this with expat-1.95.6 it does install expat.so.4
> (not in my Perl libaries - but still it looks promising.
>
Yep - that's pretty much right - when you build and install expat, it will
*not* be installed within perl. I imagine that libexpat.so will be installed
into /usr/local/lib. The solution to your problem may be as simple as
renaming 'libexpat.so.4' to 'libexpat.so.5' - though I don't really
understand this suffix numbering stuff.
On my (Mandrake) linux box I find that I already have /usr/lib/libexpat.so
and /usr/lib/libexpat.so.0.4.0 (which are identical files, I think). The
fact that they're in /usr/lib/ leads me to believe that they were probably
installed from the OS installation disks (either when the OS was installed,
or at a later date).
I found that I could rename /usr/lib/libexpat.so to whatever I liked and it
made no difference re XML::Parser - but if I renamed
/usr/lib/libexpat.so.0.4.0, then any perl script that attempted to load
XML::Parser would fail because 'libexpat.so.0' could not be found.
If 'libexpat.so' had not been found on your box in at least one of the
directories reported by 'perl -V:libpth', then the XML::Parser build process
would have died at the 'perl Makefile.PL' stage. (Take a look at the
XML::Parser Makefile.PL and you'll see why.) So ... it seems to me that you
already had everything you needed when you set out to build XML::Parser -
but that there's something not quite right in regard to the naming of the
libexpat '.so' file.
Hope there's something there that helps.
Cheers,
Rob
| |
| Justin Wyllie 2005-04-26, 8:55 pm |
|
"Sisyphus" <sisyphus1@nomail.afraid.org> wrote in message
news:426b60f4$0$4659$afc38c87@news.optusnet.com.au...
>
> "Justin Wyllie" <justinw@mms-oxfordnotspamhere.com> wrote in message
> news:426add69_4@mk-nntp-2.news.uk.tiscali.com...
>
> message:
>
'/usr/home/xxx/usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd/auto/XML/Par
>
> Installing XML::Parser will install *that* module and nothing else. It
won't
> install expat (which is needed by XML::Parser). The Expat.so and Expat.bs
> files that you found are both part of the XML::Parser module. It's normal
> that Expat.bs is empty.
>
have[color=darkred]
XML-Parser-2.34[color=darkred]
>
> Yep - that's pretty much right - when you build and install expat, it will
> *not* be installed within perl. I imagine that libexpat.so will be
installed
> into /usr/local/lib. The solution to your problem may be as simple as
> renaming 'libexpat.so.4' to 'libexpat.so.5' - though I don't really
> understand this suffix numbering stuff.
>
> On my (Mandrake) linux box I find that I already have /usr/lib/libexpat.so
> and /usr/lib/libexpat.so.0.4.0 (which are identical files, I think). The
> fact that they're in /usr/lib/ leads me to believe that they were probably
> installed from the OS installation disks (either when the OS was
installed,
> or at a later date).
>
> I found that I could rename /usr/lib/libexpat.so to whatever I liked and
it
> made no difference re XML::Parser - but if I renamed
> /usr/lib/libexpat.so.0.4.0, then any perl script that attempted to load
> XML::Parser would fail because 'libexpat.so.0' could not be found.
>
> If 'libexpat.so' had not been found on your box in at least one of the
> directories reported by 'perl -V:libpth', then the XML::Parser build
process
> would have died at the 'perl Makefile.PL' stage. (Take a look at the
> XML::Parser Makefile.PL and you'll see why.) So ... it seems to me that
you
> already had everything you needed when you set out to build XML::Parser -
> but that there's something not quite right in regard to the naming of the
> libexpat '.so' file.
>
> Hope there's something there that helps.
>
> Cheers,
> Rob
>
Hi Rob
Thanks, that was helpful. Esp. understanding that the Expat.pm is part of
XML::Parser and nothing to do with Expat itself. It 'provides an interface
to Expat' according to its documentation.
I installed Expat into the expected directory /usr/local/lib. The question
of versions is just to do with the latest version of Expat. If you install
from Expat-1.95.8 you get Expat.so.5.
Running Makefile.PL in the XML-Parser directory then seemed to know about
Expat and it all went smoothly from then on.
I don't really know much about Perl and C. It seems that the files with
extension .so are compiled C code which is accessed by the Perl modules when
the modules are complied. The Makefile for XML::Parser seems to expect the
Expat files to be in usr/local/lib and to put a link in the Perl directories
to the shared libraries here.
Thanks for your help
Thrilled to get RSS working - now I can start on my blog
Best regards
Justin Wyllie
|
|
|
|
|