Dear all monks:
I try to use threads in my project, and I have installed threads to my own local lib directory in my project directory, when I try to run the script in 64bit box, It throws error msg like these:
Can't load '/home/larry/project/sysmonitor/lib/perl5/5.8.5/i386-linux-
+thread-multi/auto/threads/threads.so' for module threads: /home/larry
+/project/sysmonitor/lib/perl5/5.8.5/i386-linux-thread-multi/auto/thre
+ads/threads.so: cannot open shared object file: No such file or direc
+tory at /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/XSLoader.pm
+line 68.
at /home/larry/project/sysmonitor/lib/perl5/5.8.5/i386-linux-thread-m
+ulti/threads.pm line 32
Compilation failed in require at ./monitorSrv.pl line 47.
BEGIN failed--compilation aborted at ./monitorSrv.pl line 47.
and I have add the lib directory by "use lib"like this:
use strict;
use warnings;
#use diagnostics;
use FindBin;
use lib "$FindBin::Bin/lib64/perl5/5.8.5/x86_64-linux-thread-multi";
use lib "$FindBin::Bin/lib64/perl5/5.8.5/x86_64-linux-thread-multi/au
+to";
use lib "$FindBin::Bin/lib64/perl5/site_perl/5.8.5";
use lib "$FindBin::Bin/lib64/perl5/site_perl/5.8.5/auto";
use lib "$FindBin::Bin/lib64/perl5/site_perl/5.8.5/x86_64-linux-threa
+d-multi";
use lib "$FindBin::Bin/lib64/perl5/site_perl/5.8.5/x86_64-linux-threa
+d-multi/auto";
use lib "$FindBin::Bin/lib/perl5/5.8.5/i386-linux-thread-multi";
use lib "$FindBin::Bin/lib/perl5/5.8.5/i386-linux-thread-multi/auto";
use lib "$FindBin::Bin/lib/perl5/site_perl/5.8.5";
use lib "$FindBin::Bin/lib/perl5/site_perl/5.8.5/auto";
use lib "$FindBin::Bin/lib/perl5/site_perl/5.8.5/i386-linux-thread-mu
+lti";
use lib "$FindBin::Bin/lib/perl5/site_perl/5.8.5/i386-linux-thread-mu
+lti/auto";
And I check the threads.so, It is laid on where it should be:
[larry@localhost sysmonitor]$ ll /home/larry/project/sysmonitor/lib/pe
+rl5/5.8.5/i386-linux-thread-multi/auto/threads/threads.so
-rwxrwxr-x 1 larry larry 110977 Sep 27 16:46 /home/larry/project/sysm
+onitor/lib/perl5/5.8.5/i386-linux-thread-multi/auto/threads/threads.s
+o
Because, I sometimes test my script at 32 bit box, sometimes 64bit, so I install both arch threads, and I check their location:
/home/larry/project/sysmonitor/lib64/perl5/5.8.5/x86_64-linux-thread-m
+ulti/threads.pm
/home/larry/project/sysmonitor/lib/perl5/5.8.5/i386-linux-thread-multi
+/threads.pm
I guess may be this is the evil that cause the problem.
but, Can't the perl find the right arch threads.pm by itself? Or, there is some way to instrust the perl to find the right threads.pm.
Can any one give some tips. I am very confused about this problem.