Re: [greenstone-users] Greenstone and perl

From John R. McPherson
DateWed, 17 Dec 2003 12:09:16 +1300
Subject Re: [greenstone-users] Greenstone and perl
In-Reply-To (20031216121117-KKHB19255-mta2-svc-business-ntl-com-10-137-101-72)
t.janssen wrote:

> Uncaught exception from user code: Can't load
> '/home/httpd/gsdl/perllib/cpan/auto/XML/Parser/Expat/Expat.so' for
> module XML::Parser::Expat:
> /home/httpd/gsdl/perllib/cpan/auto/XML/Parser/Expat/Expat.so:
> undefined symbol: PL_sv_undef at
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229.
> at /home/httpd/gsdl/perllib/cpan/XML/Parser.pm line 14
...
> I presume this is a problem with my OS distribution. I am running
> 2.41 on Red Hat 9. Any ideas, anyone?


And Jeremy Mears wrote:

> Here's the new error log when i go to build:
> Command: /Applications/Greenstone/bin/script/import.pl -importdir
> /Applications/Greenstone/collect/test2/gimport/ test2
> import.pl> dyld: perl Undefined symbols:
> import.pl> _PL_curpad
> import.pl> _PL_markstack_max
...
>
> MacOSX 10.3.1


I think I know what is causing these problems... I assume you are both
using a very recent version of perl, like 5.8 or 5.8.1 (you can type
"perl -v" from the command line to see the version).

Both our prebuilt linux and mac os x greenstone distributions were built
on machines that use perl 5.6, and the distributions contain a few
binary perl modules. I think these are what are causing the problems
when trying to import and build collections.

There are two things you could try:
1) install the perl "XML::Parser" natively for your system and get
greenstone to use that instead of the one that comes with greenstone.
You might have to remove the "gsdl/perllib/cpan/XML" and
"gsdl/perllib/cpan/auto" directories so that perl doesn't look in there
first.

2) build greenstone from the source distribution. This will compile the
perl modules for your currently installed version of perl.
We have notes online to help with compiling greenstone from source:
http://www.greenstone.org/docs/compiling.html

Hope this helps

John McPherson