Josef Wolf
2008-10-09 22:02:47 UTC
Hello,
I have created my XS, and it works as expected when I link everything
statically.
Then I linked dynamically and installed it by "make install". This
installs following files:
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/Kdb.so
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/Kdb.bs
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/autosplit.ix
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/.packlist
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/Kdb.a
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/extralibs.ld
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/extralibs.all
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/Kdb.pm
When I run the program from the directory where I compiled it, it runs
fine. But when I try to run it from a different directory, I get this
error message:
***@raven:~/kdb> (cd /; ~/kdb/test)
~/kdb/test: error while loading shared libraries: Kdb/blib/arch/auto/Kdb/Kdb.so: cannot open shared object file: No such file or directory
Please note the "Kdb/blib/arch" prefix. This prefix is correct when
the program is run from the compilation directory. But when the
compilation directory is not available, the library should be searched
in auto/Kdb/Kdb.so since that's where "make install" installed it
(relative to /usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi,
which is in perl's @INC array).
Any ideas what's going on here?
I have created my XS, and it works as expected when I link everything
statically.
Then I linked dynamically and installed it by "make install". This
installs following files:
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/Kdb.so
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/Kdb.bs
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/autosplit.ix
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/.packlist
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/Kdb.a
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/extralibs.ld
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/auto/Kdb/extralibs.all
/usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi/Kdb.pm
When I run the program from the directory where I compiled it, it runs
fine. But when I try to run it from a different directory, I get this
error message:
***@raven:~/kdb> (cd /; ~/kdb/test)
~/kdb/test: error while loading shared libraries: Kdb/blib/arch/auto/Kdb/Kdb.so: cannot open shared object file: No such file or directory
Please note the "Kdb/blib/arch" prefix. This prefix is correct when
the program is run from the compilation directory. But when the
compilation directory is not available, the library should be searched
in auto/Kdb/Kdb.so since that's where "make install" installed it
(relative to /usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi,
which is in perl's @INC array).
Any ideas what's going on here?