Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


staden-2.0.0b4 compilation error on Red Hat 4

  • I recently tried to build the staden-2.0.0b4 source and experienced a compiler error that I do not understand.

    The machine is Red Hat 4.1.2-46, kernel v. 2.6.18-164.el5, as x86_64 GNU/Linux.
    I used only one configure flag, -enable-64bit, the last lines:

    curl:      via /usr/bin/curl-config
    zlib:      DIR (system)
    liblzma:   ***NOT FOUND***
    samtools:  ***NOT FOUND***
    io_lib:    via /n/site/inst/Linux-x86_64/bioinfo/bin/io_lib-config
    Tcl:       via /usr/lib/tclConfig.sh
    Tk:        via /usr/lib/tkConfig.sh
    tklib:     /usr/share/tklib0.4
    Iwidgets:  /usr/share/iwidgets4.0.1
    Itcl:      /usr/lib64/itcl3.3
    Itk:       /usr/lib64/itk3.3

    Then running make, the following last lines:

    cd tgap && make -f /home/asg/staden/b4/staden-2.0.0b4-src/./tgap/Makefile   BUILD=/home/asg/staden/b4/staden-2.0.0b4-src SRC=/home/asg/staden/b4/staden-2.0.0b4-src/./tgap SUBDIR=tgap all
    make: Entering directory `/home/asg/staden/b4/staden-2.0.0b4-src/tgap'
    make: Warning: File `../system.mk' has modification time 45 s in the future
    gcc -g -O2  -I/include -I/include -DUSE_NON_CONST  -I/home/asg/staden/b4/staden-2.0.0b4-src/./tgap -I/home/asg/staden/b4/staden-2.0.0b4-src/./Misc -I"/usr/include/tcl-private/generic" -I"/usr/include/tcl-private/unix" -I/home/asg/staden/b4/staden-2.0.0b4-src/./tk_utils -I/home/asg/staden/b4/staden-2.0.0b4-src/./seq_utils -I/n/site/inst/Linux-x86_64/bioinfo/include   -I/home/asg/staden/b4/staden-2.0.0b4-src  -fPIC  -o tg_iface_g.o -c tg_iface_g.c
    In file included from /home/asg/staden/b4/staden-2.0.0b4-src/./tgap/g-struct.h:24,
                     from g.h:1,
                     from tg_iface_g.c:7:
    /home/asg/staden/b4/staden-2.0.0b4-src/./tgap/hache_table.h:8:33: error: io_lib/pooled_alloc.h: No such file or directory
    In file included from /home/asg/staden/b4/staden-2.0.0b4-src/./tgap/g-struct.h:24,
                     from g.h:1,
                     from tg_iface_g.c:7:
    /home/asg/staden/b4/staden-2.0.0b4-src/./tgap/hache_table.h:42: error: expected specifier-qualifier-list before 'pool_alloc_t'
    tg_iface_g.c: In function 'btree_destroy':
    tg_iface_g.c:1040: error: 'HacheTable' has no member named 'clientdata'
    tg_iface_g.c:1041: error: 'HacheTable' has no member named 'clientdata'
    tg_iface_g.c: In function 'io_database_connect':
    tg_iface_g.c:1143: error: 'HacheTable' has no member named 'name'
    tg_iface_g.c:1149: error: 'HacheTable' has no member named 'clientdata'
    tg_iface_g.c:1150: error: 'HacheTable' has no member named 'load'
    tg_iface_g.c:1151: error: 'HacheTable' has no member named 'del'
    tg_iface_g.c:1158: error: 'HacheTable' has no member named 'name'
    tg_iface_g.c:1164: error: 'HacheTable' has no member named 'clientdata'
    tg_iface_g.c:1165: error: 'HacheTable' has no member named 'load'
    tg_iface_g.c:1166: error: 'HacheTable' has no member named 'del'
    make: ***  Error 1
    make: Leaving directory `/home/asg/staden/b4/staden-2.0.0b4-src/tgap'
    make: ***  Error 2

    Can you make sense of this?

  • James Bonfield
    James Bonfield

    This looks like you're linking against an older version of io_lib. In staden-io_lib-1.12.2 we added a pool_alloc_t type as part of the hash table interface there. The hachetable code in Gap5/Tgap requires this newer version too. Please download the latest io_lib release and install that first.

    Thanks for the report. I'll update the Staden configure script to check for the correct version as previously it accepted 1.12.anything.


  • Thank you James,

    I missed that new version requirement on io_lib.  After building and pointing the configure script to io_lib-1.12.2, I am now receiving another compile error with Gap5/Tgap:

    make: Leaving directory `/home/asg/staden/b4/staden-2.0.0b4-src/genekc03/tgap'
    cd gap5 && make -f /home/asg/staden/b4/staden-2.0.0b4-src/genekc03/../gap5/Makefile   BUILD=/home/asg/staden/b4/staden-2.0.0b4-src/genekc03 SRC=/home/asg/staden/b4/staden-2.0.0b4-src/genekc03/../gap5 SUBDIR=gap5 all
    make: Entering directory `/home/asg/staden/b4/staden-2.0.0b4-src/genekc03/gap5'
    LD_LIBRARY_PATH=/home/asg/staden/b4/staden-2.0.0b4-src/genekc03/lib:$LD_LIBRARY_PATH gcc  -g -L/home/asg/staden/b4/staden-2.0.0b4-src/genekc03/lib  -o tg_index  tg_index.o  -ltgap -lgap5  -lmisc  -lz  -ltk_utils   -lseq_utils  -L/usr/lib64 -ltcl8.4   -lm  -ldl
    /home/asg/staden/b4/staden-2.0.0b4-src/genekc03/lib/libtgap.so: undefined reference to `pool_free'
    /home/asg/staden/b4/staden-2.0.0b4-src/genekc03/lib/libtgap.so: undefined reference to `pool_create'
    /home/asg/staden/b4/staden-2.0.0b4-src/genekc03/lib/libtgap.so: undefined reference to `pool_alloc'
    /home/asg/staden/b4/staden-2.0.0b4-src/genekc03/lib/libtgap.so: undefined reference to `pool_destroy'
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: Leaving directory `/home/asg/staden/b4/staden-2.0.0b4-src/genekc03/gap5'
    make: ***  Error 2

    Do you know which library is deficient here?

  • James Bonfield
    James Bonfield

    These should be in the io_lib-1.12.2 library:  Ie http://staden.svn.sourceforge.net/viewvc/staden/io_lib/trunk/io_lib/pooled_alloc.c?revision=1813&view=markup

    Clearly you're include path is now picking up the newer io_lib, but as you have linking errors I suspect a library search path problem, perhaps linking against an older installed io_lib (either explicitly or by picking it up on LD_LIBRARY_PATH). I don't see an explicit -L for io_lib in the above link line. Note it you have a requirement to keep an old io_lib installed for some reason then consider building the new one statically and doing an install in a temporary directory purely for the purposes of building the staden package against it. (I can't think of a good reason why you'd explicitly need an older version installed too though.)

    I've been experimenting with using -rpath-link in my local configure script so hopefully the next release should be more resilient to differences in environment.