Compiling 2.0.0b9 on 64bit Centos 5.6

2011-12-08
2013-04-18
  • I don't know if this is an issue with staden or the OS. However when trying to do "make" with staden 2.0.0b9 I get some stuff to STDERR that leads me to think that 32bit files are being used rather than the 64bit versions I also have installed:

    /usr/bin/ld: skipping incompatible /usr/lib/liblzma.so when searching for -llzma
    /usr/bin/ld: skipping incompatible /usr/lib/libtk8.4.so when searching for -ltk8.4
    /usr/bin/ld: skipping incompatible /usr/lib/libtcl8.4.so when searching for -ltcl8.4
    /usr/bin/ld: skipping incompatible /usr/lib/liblzma.so when searching for -llzma
    /usr/bin/ld: skipping incompatible /usr/lib/libtk8.4.so when searching for -ltk8.4
    /usr/bin/ld: skipping incompatible /usr/lib/libtcl8.4.so when searching for -ltcl8.4
    /usr/bin/ld: skipping incompatible /usr/lib/liblzma.so when searching for -llzma
    /usr/bin/ld: skipping incompatible /usr/lib/libtk8.4.so when searching for -ltk8.4
    /usr/bin/ld: skipping incompatible /usr/lib/libtcl8.4.so when searching for -ltcl8.4

    I uninstalled the 32bit versions of curl, tklib and tcl. At this point, these disappeared.

    Once I've run make and try to run gap5 I get the following error:
    couldn't load file "/home/nwatson-haigh/staden-2.0.0b9/bin/../lib/staden/libtk_utils.so": libstaden-read.so.1: cannot open shared object file: No such file or directory
        while executing
    "load $env(STADLIB)/${lib_prefix}tk_utils${lib_suffix}"
        (file "/home/nwatson-haigh/staden-2.0.0b9/bin/../share/staden/tcl/gap5/gap5.tcl" line 488)

    I'd love to get this version of gap5 running ASAP, so help is much appreciated!

    Cheers,
    Nathan

     
  • Slight edit to the above post:
    I had to uninstall 32 bit versions of curl and tcl:

    $ yum remove curl.i386 tcl.i386
    
     
  • OK, so I managed to get this working at last!

    I just set LD_LIBRARY_PATH and gap5 then loaded OK:

    mkdir build_dir
    cd build_dir
    ../configure CC=gcc44 CXX=g++44 --prefix=$HOME/staden-2.0.0b9
    make && make install
    export LD_LIBRARY_PATH=/home/nwatson-haigh/io_lib/lib/
    gap5
    
     
  • James Bonfield
    James Bonfield
    2012-01-24

    I just tested building and installing on a liveCD iso of 64-bit Centos 6.2 and after installing the necessary dependencies (gcc, g++, make, tk-devel, etc) it worked fine. Specifically it seems to be the installing of 32-bit compaibility libraries that causes most of the problems (and my advice would be to simply not do that and rebuild any code needing them as native 64-bit instead).

    Further investigations show this is just down to redhat being silly.  Googling shows lots of people with other packages (not just Staden) have the same problems due to RedHat's insistence on making /usr/lib a 32-bit directory even for 64-bit installs.

    However the easy solution is just to hold the hand of configure a little bit more by manually specifying where the proper versions of these libraries are. Eg

    ../configure -with-tcl=/usr/lib64 -with-tk=/usr/lib64

    The io_lib issue is different. You need to have it installed *and working*, test things like makeSCF starts up, before compiling the Staden Package. Hence why you may need LD_LIBRARY_PATH setup. If you install io_lib in a central system place (it's actually bundled as a standard package in Ubuntu) or use the same -prefix I think it should work out of the box.

    I'll investigate the prebuilt binaries more.