Compiling staden 2.0.0b7: 32-bit vs 64 bit?

  • Sylvain Foisy
    Sylvain Foisy


    I am installing staden 2.0.0b7 on two similar Ubuntu server + xfce4 VM, one is 32-bits, the other 64-bits. The 32-bits compile+make routine worked a-ok but the 64-bits is not happy:

    /usr/bin/ld: /opt/bio/sources/samtools-0.1.8/libbam.a(bam_import.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
    /opt/bio/sources/samtools-0.1.8/libbam.a: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: Leaving directory `/opt/bio/sources/staden-2.0.0b7-src/gap5'
    make: ***  Error 2

    Any insight on this issue? I say something about problems with Ubuntu in 64 bits but I thought that this issue was closed…

    Best regards

    Sylvain Foisy
    Montreal Heart Institute

  • Hi Sylvain,

    You have to compile samtools with -fPIC set.  From the file:

    Samtools is only needed by tg_index to build Gap5 databases from
    bam format files. Note that if used it must be built as a relocatable library
    by adding -fPIC to the CFLAGS in the samtools Makefile.

    This should solve the problem.



  • Hi,

    D'oh! Of course, it now works. Seeing the 32-bits compile working, I got anesthetized…

    Thanks for the time