[BioLib-dev] Test Errors on Ubuntu

Pjotr Prins pjotr.public14 at thebird.nl
Thu Feb 11 16:44:47 UTC 2010


On Wed, Feb 10, 2010 at 04:18:21PM -0600, Chris Fields wrote:
> Pjotr,
> 
> Just noticed an odd error on Ubuntu using the latest github; basically,
> everything builds on Ubuntu just fine, but there appear to be odd issues
> with shared libs.  This doesn't affect the example or emboss, but affyio
> and (strangely) io_lib are affected.  
> 
> The library in question is libR.so; this pops up with failing tests for
> affyio and io_lib with 'make test'.  Here are the relevant errors from
> the test scripts (bootstrapping problem):
> 
> cjfields at pyrimidine:~/src/biolib/src/mappings/swig/perl/test$ perl
> test_staden_io_lib.pl
> Can't load '/usr/local/lib/perl/5.10.0/staden_io_lib.so' for module
> staden_io_lib: libR.so: cannot open shared object file: No such file or
> directory at /usr/lib/perl/5.10/DynaLoader.pm line 196.
>  at /usr/local/lib/perl/5.10.0/biolib/staden_io_lib.pm line 10
> Compilation failed in require at test_staden_io_lib.pl line 1.
> BEGIN failed--compilation aborted at test_staden_io_lib.pl line 1.
>
> cjfields at pyrimidine:~/src/biolib/src/mappings/swig/perl/test$ perl
> test_affyio.pl
> Can't load '/usr/local/lib/perl/5.10.0/affyio.so' for module affyio:
> libR.so: cannot open shared object file: No such file or directory
> at /usr/lib/perl/5.10/DynaLoader.pm line 196.
>  at /usr/local/lib/perl/5.10.0/biolib/affyio.pm line 10
> Compilation failed in require at test_affyio.pl line 4.
> BEGIN failed--compilation aborted at test_affyio.pl line 4.
 
> For some reason the absolute path is dropped.  I understand this
> affecting affyio, but it's strange that io_lib is also affected.  OS X
> doesn't seem to be affected, but 

There should be no dependency, per se. If I do 

  ./configure --with-staden &> test.out

there is no libR.so reference. It appears that because you also built
affyio it finds libR.so and, from then on, add it in for all cases.
This is not necessarily bad behaviour.

The odd thing is that it gives this error while you apparently have
libR.so somewhere on your system. 

The location /usr/local/lib/perl/5.10.0/affyio.so is also a bit
puzzling. But that is what the Perl interpreter is telling the build
system. After above configure I can do:

  make install
  [ 94%] Built target biolib_staden_io_lib-0.0.6
  [100%] Built target staden_io_lib
  Install the project...
  -- Install configuration: "Release"
  -- Installing: /usr/lib/libbiolib_staden_io_lib-0.0.6.so
  -- Installing: /usr/local/lib/perl/5.10.1/biolib/staden_io_lib.pm
  -- Installing: /usr/local/lib/perl/5.10.1/staden_io_lib.so

Running ldd shows no libR.so dependency:

  ldd /usr/local/lib/perl/5.10.1/staden_io_lib.so
        linux-gate.so.1 =>  (0xb7eff000)
        libbiolib_staden_io_lib-0.0.6.so => /usr/lib/libbiolib_staden_io_lib-0.0.6.so (0xb7e52000)
        libperl.so.5.10 => /usr/lib/libperl.so.5.10 (0xb7d01000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7ceb000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7bfd000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7bc3000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7bb6000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7a6f000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7a6a000)
        libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7a51000)
        libcrypt.so.1 => /lib/i686/cmov/libcrypt.so.1 (0xb7a1f000)
        /lib/ld-linux.so.2 (0xb7f00000)

  ldd /usr/lib/libbiolib_staden_io_lib-0.0.6.so
        linux-gate.so.1 =>  (0xb7fdb000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7f4d000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7df2000)
        /lib/ld-linux.so.2 (0xb7fdc000)

Which is fine. When I do a full install there, indeed, appears a
dependency on libR.so. But that is OK. It is simply a side-product of
the full build with libR available.

Can you replicate above? Do you have libR.so on your system? If so,
does it show correctly in the build logs? If not, there is a real
problem, because it should not link to a non-existing library.

The R library is located in

  tools/cmake-support/modules/FindRLibs.cmake

if finds it by querying R itself. It should not find it if it is not
there.

I suspect you have to tell Perl what the load path is for the
libR.so. Is R in a standard location? Can you try updating the load
path? Maybe it is a Ubuntu thing:

  http://blog.andrewbeacock.com/2007/10/how-to-add-shared-libraries-to-linuxs.html

> I'll pass on the config and build output to you off-list, or I could put
> it up on Issues on github if you would like.

I prefer mail, normally. 

Pj.



More information about the BioLib-dev mailing list