dfmatt has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I am trying to compile a perl script using ActiveState's PerlApp, and use the created binary on linux.

My script makes use of BerkeleyDB so I need to include that module.

I compiled on debian and the app ran fine on that (and on ubuntu) but when I tested it on suse it complained that:

Can't load 'auto/BerkeleyDB/BerkeleyDB.so' for module BerkeleyDB: auto +/BerkeleyDB/BerkeleyDB.so: cannot open shared object file: No such fi +le or directory at /</usr/share/myapp/myapp.bin>DynaLoader.pm line 21 +7. at perlapp line 810 BEGIN failed--compilation aborted at yams.pl line 7.


I have tried specifying the --bind option which ActiveState suggest to use when including a library, but this doesn't change the issue.

Without BerkeleyDB the app works fine on all linux platforms.

Also, BerkeleyDB.so is included in the tmp/pdk-root/ directory that PerlApp creates when it runs which also holds libperl.so

Thanks in advance for any help you can offer!

Replies are listed 'Best First'.
Re: Compile with PerlApp for linux and include BerkeleyDB.so
by Anonymous Monk on Jun 24, 2009 at 13:41 UTC
    To see extra files, try
    use BerkeleyDB; for my $so( @DynaLoader::dl_shared_objects ){ print "$so\n"; print `ldd $so\n`; }
      Thank you for the help.
      I have run that command and it returned this:
      /opt/ActivePerl-5.10/lib/auto/IO/IO.so linux-gate.so.1 => (0xb7f3b000) libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7dcd000) /lib/ld-linux.so.2 (0xb7f3c000) /opt/ActivePerl-5.10/lib/auto/Fcntl/Fcntl.so linux-gate.so.1 => (0xb7f94000) libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7e27000) /lib/ld-linux.so.2 (0xb7f95000) /opt/ActivePerl-5.10/site/lib/auto/BerkeleyDB/BerkeleyDB.so linux-gate.so.1 => (0xb7fa7000) libdb-4.6.so => /usr/lib/libdb-4.6.so (0xb7e21000) libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7cba000) libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7ca0000) /lib/ld-linux.so.2 (0xb7fa8000)
      IO.so and Fcntl.so are both included in the /tmp/pdk-root folder along with BerkeleyDB.so (PerlApp adds them automatically) and the BerkeleyDB.so that it lists is the one I have tried adding manually using --bind.
      Was there something else this was supposed to tell me?