|
Script failing to 'dynaload' |
Posted by Dave LeLacheur on Aug-05-2014 22:51 |
|
Hi,
I've installed ChartDirector and am running a test script. The test script successfully calls up "index.pl" which in turn calls up "perchartdir.pm". However, this fails because lines 6 ~ 23 are not able to run:
6 sub autoImport
7 {
8 my $ver = shift;
9 if (!(eval "
10 package $ver;
11 require DynaLoader;
12 \\@ISA = qw(DynaLoader);
13 bootstrap $ver;
14 sub perlchartdir::major_ver { return &major_ver; };
15 sub perlchartdir::minor_ver { return &minor_ver; }
16 sub perlchartdir::copyright { return ?right; }
17 sub perlchartdir::id { return &id; }
18 sub perlchartdir::callMethod { return &callMethod; }
19 1;
20 ") && ($@)) {
21 die;
22 }
23 }
The error message is "Can't locate loadable object for module perlchartdir58i64mt in @INC at perlchartdir.pm line 9.
Any suggestions for this? Thanks in advance! |
Re: Script failing to 'dynaload' |
Posted by Peter Kwan on Aug-05-2014 23:26 |
|
Hi Dave,
This is often due to the following issues:
(a) ChartDirector for Perl not being installed. For example, the ChartDirector for Perl
shared objects have not been copied to a directory in the Perl search path.
or
(b) ChartDirector for Perl is not for your Perl architecture. For example, your Perl is for
Linux (i686), but the download ChartDirector is for Perl for Linux (x86_64).
For testing, you may test using the command line scripts first as it is easier to trouble-
shoot. After it works, you may try the CGI scripts.
Please open a command shell and kindly perform the following test.
(a) Copy all files from "ChartDirector/lib" to the "ChartDirector/perldemo" subdirectory
(b) change to the ChartDirector/perldemo subdirectory
(c) execute "perl simplebar.pl".
The "simplebar.pl" is a command line script that should generate a simple bar chart as an
image file "simplebar.png". If it is successful, there should be no error message. You may
examine the "ChartDirector/perldemo" subdirectory to verify if the "simplebar.png" has
been generated.
If the above does not work, please let me know what is the architecture of your Perl by
using "perl -V". Also, while still in the "ChartDirector/perldemo" subdirectory, please use "ls
-l *.so" (or "dir *.dll" on Windows) and inform me of the result, so I can determine the
type of ChartDirector for Perl you are using.
On the other hand, if the above works, it means the ChartDirector type is compatible
with the command line Perl type. Assuming your CGI Perl is also compatible with your
command line Perl (some people use different Perl implementations for CGI and command
line), the ChartDirector should also work with your CGI perl. For testing, please copy
everything from "ChartDirector/lib" to your "perldemo_cgi" subdirectory (or whatever CGI
directory that you have copied the scripts to) and then test the "simplebar.pl" to see if it
works.
Regards
Peter Kwan |
Re: Script failing to 'dynaload' |
Posted by Dave LeLacheur on Aug-06-2014 02:25 |
|
Thank you for the very detailed and helpful reply Peter.
I will attempt the command line tests you outlined, but first I checked out the system aspects.
The Linux is x86_64-linux.
The ChartDirector command resulted in:
...# ls -l *.so
-rwxr-xr-x 1 teamst13 teamst13 17400908 Aug 4 14:40 libchartdir.so*
Is that enlightening?
Cheers,
Dave L. |
Re: Script failing to 'dynaload' |
Posted by Dave LeLacheur on Aug-06-2014 02:27 |
|
Running 'perl simplebar.pl' results in the same error message as originally seen:
"an't locate loadable object for module perlchartdir58i64 in @INC..."
Thanks,
Dave L. |
Re: Script failing to 'dynaload' |
Posted by Peter Kwan on Aug-06-2014 17:31 |
|
Hi Dave,
According to your information, the file size of "libchartdir.so" is 17400908 and there is no
other ".so" file. This would occur if you are using the Mac OS X edition of ChartDirector
for Perl. You mentioned your Linux is x86_64. Is it possible the ChartDirector for Perl you
have downloaded is the Mac OS X edition, which is not for your operating system?
For Linux (x86_64), the "libchartdir.so" should be 4295960 bytes in size, and there should
be other shared objects like "perlchartdir58i64.so" and "perlchartdir58i64mt.so" and other
"perlchartdir?????.so". Please try to download "ChartDirector for Perl" for Linux (x86_64)
once more. The file name should be "chartdir_perl_linux_64.tar.gz". Please use this edition
instead of your existing edition.
Also, what is important is the operating system architecture of your Perl interpreter, not
that of your operating system. Although not common, it is possible for a Linux (x86_64)
operating system to use a Perl for Linux (i686) (as it is possible for 64-bit Linux to run 32-
bit Linux executable). Also, there are several types of Perl for Linux (x86_64). The "perl -
V" will show the details.
From your information, the error message for "perl simplebar.pl" is different from your
original error message. The original error message mentioned "perlchartdir58i64mt", but
your "perl simplebar.pl" mentioned "perlchartdir58i64". It means the CGI perl is not the
same as the command line perl. The CGI perl is multi-threaded (multithreaded Perl 5.8 is
not common for Linux), while the command line perl is not multi-threaded. ChartDirector
supports both, but it needs to use different shared objects "perlchartdir58i64mt.so" and
"perlchartdir58i64.so" as these two types of Perl are binary incompatible.
Please kindly let me know if using "chartdir_perl_linux_64.tar.gz" can solve the problem.
Regards
Peter Kwan |
Re: Script failing to 'dynaload' |
Posted by Dave LeLacheur on Aug-07-2014 21:38 |
|
Thanks again very much for your help diagnosing this Peter. I'll try the other version. Cheers, Dave L. |
|