[Bioperl-l] Failure to compile the CVS snapshot of bioperl-ext on AMD64

Florin Iucha florin at iucha.net
Mon Oct 2 01:40:07 UTC 2006


Hello,

I am trying to install bioperl-network from CVS.  I found this to
require bioperl from CVS, which requires bioperl-ext from CVS.
I have compiled and installed io_lib 1.10.1.

After running "perl Makefile.PL; make test" in bioperl-ext I see a lot 
sources being compiled, then:

cc -c  -I./libs -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"1.5.1\" -DXS_VERSION=\"1.5.1\" -fPIC "-I/usr/lib/perl/5.8/CORE"  -DPOSIX -DNOERROR Align.c
Running Mkbootstrap for Bio::Ext::Align ()
chmod 644 Align.bs
rm -f ../blib/arch/auto/Bio/Ext/Align/Align.so
cc  -shared -L/usr/local/lib Align.o  -o ../blib/arch/auto/Bio/Ext/Align/Align.so libs/libsw.a  \
           -lm          \

/usr/bin/ld: libs/libsw.a(aln.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
libs/libsw.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [../blib/arch/auto/Bio/Ext/Align/Align.so] Error 1
make[1]: Leaving directory `/scratch/dmbio/tools/bioperl-ext/Bio/Ext/Align'
make: *** [subdirs] Error 2

This is on a Debian AMD64 box:

florin at zeus $ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20060901 (prerelease) (Debian 4.1.1-13)
florin at zeus $ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.16-1-vserver-amd64-k8, archname=x86_64-linux-gnu-thread-multi
    uname='linux excelsior 2.6.16-1-vserver-amd64-k8 #2 smp tue apr 4 03:40:49 utc 2006 x86_64 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='4.1.2 20060729 (prerelease) (Debian 4.1.1-10)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=/lib/libc-2.3.6.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8
    gnulibc_version='2.3.6'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
                        PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_64_BIT_ALL
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_PERLIO USE_REENTRANT_API

The compiler command line for aln.o is lacking -fPIC:

cc -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DPOSIX -DNOERROR   -c -o aln.o aln.c

Adding -fPIC to the CCFLAGS variable in Bio/Ext/Align/Makefile and
Makefile seems to take build further, but it fails with a similar
error in Bio/SeqIO/staden/_Inline/build/Bio/SeqIO/staden/read. That
Makefile seems to be regenerated every time I run 'make test' in the
top level directory.

The error in ../staden/read is:

rm -f blib/arch/auto/Bio/SeqIO/staden/read/read.so
cc  -shared -L/usr/local/lib read.o  -o blib/arch/auto/Bio/SeqIO/staden/read/read.so    \
           -L/usr/local/lib -lread -lz          \

/usr/bin/ld: /usr/local/lib/libread.a(libread_a-Read.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libread.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Bio/SeqIO/staden/read/read.so] Error 1

So, the questions appears to be:
   - should "-fPIC" be appended to CFLAGS in the generated Makefiles?
   - is there anything wrong with io_lib flags?
   - has anybody built bioperl-ext on AMD64?

I can help with debugging or testing if given a gentle nudge in the right
direction, but I have little experience with the interactions between perl
and static libraries on 64 bit.

Thanks,
florin

-- 
If we wish to count lines of code, we should not regard them as lines
produced but as lines spent.                       -- Edsger Dijkstra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20061001/bc134c7e/attachment.sig>


More information about the Bioperl-l mailing list