in reply to Can I re-use modules compiled with a different build of Perl, but with the same version number on the same machine?

This is -- the worst part of using Linux / Unix. I've found Perl itself really easy to compile, but unless you have active internet connection to CPAN, very time consuming to get everything working right. If you get a nice packaged solution post it! I used a workstation with internet to compile everything and then got it moved, but it took lot of work to get it working and not an easy upgrade. I think an easier route to go is, assuming your machine has all necessary compilers, get the perl source and get a minicpan, though perlbrew might also work. In addition to the other suggestions maybe try this

bash# strace perl -e 'use DBI;' 2>&1 | grep -i DBI.so stat64("/usr/local/lib/perl/5.18.2/auto/DBI/DBI.so", {st_mode=S_IFREG| +0555, st_size=391823, ...}) = 0 open("/usr/local/lib/perl/5.18.2/auto/DBI/DBI.so", O_RDONLY|O_CLOEXEC) + = 5 bash# ldd -v /usr/local/lib/perl/5.18.2/auto/DBI/DBI.so linux-gate.so.1 => (0xb7727000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7539000) /lib/ld-linux.so.2 (0xb7728000) Version information: /usr/local/lib/perl/5.18.2/auto/DBI/DBI.so: libc.so.6 (GLIBC_2.3.4) => /lib/i386-linux-gnu/libc.so +.6 libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/libc.so +.6 libc.so.6 (GLIBC_2.4) => /lib/i386-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.3) => /lib/i386-linux-gnu/libc.so.6 /lib/i386-linux-gnu/libc.so.6: ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2 ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2 ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2

Maybe that will shed some light on what is going on. You might have to track down all the .so files to make sure they are in the right place. Possibly you need to symlink a .so from somewhere else, or possibly someone else has symlinked a different version. As you can probably already tell, all in the weeds from here.

  • Comment on Re: Can I re-use modules compiled with a different build of Perl, but with the same version number on the same machine?
  • Download Code

Replies are listed 'Best First'.
Re^2: Can I re-use modules compiled with a different build of Perl, but with the same version number on the same machine?
by neuty (Novice) on Feb 11, 2015 at 20:20 UTC
    If you get a nice packaged solution post it!

    Hey, I just updated my post above with the issue. It turns out matching the ./Configure flags to the system Perl was indeed the solution. The problem was that I was improperly testing the new build with a script that was pointing to an older, faulty build of Perl. Pointing the script to the new build with all of the ./Configure flags properly done corrected all of the issues.

    Also, I appreciate the sympathy for lack of Internet. Lots of people simply reply "That's a dumb solution, why aren't you doing this and this instead" without taking into consideration the limitations that the programmer is forced to deal with as part of the job.