staden-2.0.0b4 compilation error on ubuntu

2010-01-20
2013-04-18
  • Hi I am trying to compile the new version on ubuntu 9.10 with intel 64Bit machine.
    I think these are the last lines after make befor exit.

    gcc -g -O2  -I/include -I/include -I/include -DUSE_NON_CONST  -I/usr/local/staden-2.0.0b4-src/./gap5 -I/usr/local/staden-2.0.0b4-src/./Misc -I/usr/local/staden-2.0.0b4-src/./tgap -I"/usr/include/tcl8.4/tk-private/generic" -I"/usr/include/tcl8.4/tk-private/unix" -I"/usr/include/tcl8.4/tcl-private/generic" -I"/usr/include/tcl8.4/tcl-private/unix" -I/usr/local/include -I/usr/local/staden-2.0.0b4-src/./tk_utils -I/usr/local/staden-2.0.0b4-src/./seq_utils  -I/usr/local/staden-2.0.0b4-src  -fPIC  -o tg_index_common.o -c tg_index_common.c
    In file included from /usr/local/staden-2.0.0b4-src/./tgap/zfio.h:5,
                     from tg_index_common.c:15:
    /usr/include/zlib.h:1374: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gzseek64’
    /usr/include/zlib.h:1375: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gztell64’
    /usr/include/zlib.h:1376: error: expected declaration specifiers or ‘…’ before ‘off64_t’
    /usr/include/zlib.h:1377: error: expected declaration specifiers or ‘…’ before ‘off64_t’
    tg_index_common.c: In function ‘bttmp_file_store’:
    tg_index_common.c:80: warning: field precision should have type ‘int’, but argument 3 has type ‘size_t’
    tg_index_common.c: In function ‘bttmp_file_sort’:
    tg_index_common.c:88: warning: ignoring return value of ‘tmpnam’, declared with attribute warn_unused_result
    tg_index_common.c:94: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
    tg_index_common.c: In function ‘parse_data_type’:
    tg_index_common.c:487: warning: field precision should have type ‘int’, but argument 3 has type ‘long unsigned int’
    make: ***  Error 1
    make: Leaving directory `/usr/local/staden-2.0.0b4-src/gap5'
    make: ***  Error 2

    Could be that I missed something. Can you help me?

    Thank you in advance

    Giuseppe

     
  • James Bonfield
    James Bonfield
    2010-01-21

    It looks like it somehow failed to work out what was necessary to support 64-bit file sizes. off64_t is presumably the correct type for this system, but hasn't been set for some reason. From what I can see it's defined in unistd.h which is already included via zconf.h.

    What values to you have in your staden_config.h for this? Please try:

      egrep 'LARGE|64' staden_config.h

    and report the results. In theory autoconf / configure is meant to figure all this out, but maybe I'm using it wrongly.

     
  • ok, I just copied the line you wrote ant this is the result:

    # egrep 'LARGE|64' staden_config.h

    /* Define to 1 if you have the `lseek64' function. */
    #define HAVE_LSEEK64 1
    /* Define to 1 if you have the `open64' function. */
    #define HAVE_OPEN64 1
    /* Is 'struct dirent64' in <sys/types.h>? */
    /* #undef HAVE_STRUCT_DIRENT64 */
    /* Is 'struct stat64' in <sys/stat.h>? */
    #define HAVE_STRUCT_STAT64 1
    /* Is off64_t in <sys/types.h>? */
    #define HAVE_TYPE_OFF64_T 1
    #define _FILE_OFFSET_BITS 64
    /* Add the _LARGEFILE64_SOURCE flag when building */
    #define _LARGEFILE64_SOURCE 1
    /* #undef _LARGEFILE_SOURCE */
    /* Add the _LARGEFILE_SOURCE64 flag when building */
    /* #undef _LARGEFILE_SOURCE64 */
    /* #undef _LARGE_FILES */

     
  • James Bonfield
    James Bonfield
    2010-01-25

    We tested (very slowly!) a qemu install of ubuntu 9 on 64-bit intel and the staden_config.h contents looked very different to your example above.  I think the "#define HAVE_TYPE_OFF64_T 1" in your staden_config.h is in error, as your original compilation error seems to imply that it died because you don't have off64_t defined.

    Are you certain you ran ./configure (or ../configure if you made a build subdirectory) on the machine you did the compilation on? (If you're attempting to build on multiple hosts it's usually best to create subdirectories, cd into them and run ../configure instead.)

    Your config.log file should give you information on what system the configure script ran and what it determined your machine requirements to be. Eg on my development host I see in the first page of config.log:


    hostname = seq1l
    uname -m = x86_64
    uname -r = 2.6.22.19-lustre-1.6.7.1
    uname -s = Linux
    uname -v = #2 SMP Fri Apr 17 17:52:49 BST 2009

    Please check that the hostname listed there matches the one you think it should.  If you cannot spot the cause of the build problems, feel free to email me the contents of your config.log file.

    James

     
  • James Bonfield
    James Bonfield
    2010-01-25

    Ok I take it back - we did get an erorr apparently. Investigating further.

     
  • James Bonfield
    James Bonfield
    2010-01-25

    So it seems that commenting out the "#define _LARGEFILE64_SOURCE 1" line with /* … */ cures the problem here, however our staden_config.h still looked very different to yours.

    The cause of the misconfiguration appears to come from the Tcl configuration, but we're looking at ways to avoid this now. Please let me know if this cures the compilation for you.

     
  • I commented the config.log file as you indicated I found several places with this line and I commented all but the make stop exactly in the same position with the same messages.

    Just one example:

    | #define HAVE_VA_COPY 1
    | #define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
    | /* #define _LARGEFILE64_SOURCE 1 */
    | /* end confdefs.h.  */
    | #include <sys/stat.h>
    | int

    The error is always

    gcc -g -O2  -I/include -I/include -I/include -DUSE_NON_CONST  -I/usr/local/staden-2.0.0b4-src/./gap5 -I/usr/local/staden-2.0.0b4-src/./Misc -I/usr/local/staden-2.0.0b4-src/./tgap -I"/usr/include/tcl8.4/tk-private/generic" -I"/usr/include/tcl8.4/tk-private/unix" -I"/usr/include/tcl8.4/tcl-private/generic" -I"/usr/include/tcl8.4/tcl-private/unix" -I/usr/local/include -I/usr/local/staden-2.0.0b4-src/./tk_utils -I/usr/local/staden-2.0.0b4-src/./seq_utils  -I/usr/local/staden-2.0.0b4-src  -fPIC  -o tg_index_common.o -c tg_index_common.c
    In file included from /usr/local/staden-2.0.0b4-src/./tgap/zfio.h:5,
                     from tg_index_common.c:15:
    /usr/include/zlib.h:1374: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gzseek64’
    /usr/include/zlib.h:1375: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gztell64’
    /usr/include/zlib.h:1376: error: expected declaration specifiers or ‘…’ before ‘off64_t’
    /usr/include/zlib.h:1377: error: expected declaration specifiers or ‘…’ before ‘off64_t’
    tg_index_common.c: In function ‘bttmp_file_store’:
    tg_index_common.c:80: warning: field precision should have type ‘int’, but argument 3 has type ‘size_t’
    tg_index_common.c: In function ‘bttmp_file_sort’:
    tg_index_common.c:88: warning: ignoring return value of ‘tmpnam’, declared with attribute warn_unused_result
    tg_index_common.c:94: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
    tg_index_common.c: In function ‘parse_data_type’:
    tg_index_common.c:487: warning: field precision should have type ‘int’, but argument 3 has type ‘long unsigned int’
    make: ***  Error 1
    make: Leaving directory `/usr/local/staden-2.0.0b4-src/gap5'
    make: ***  Error 2

    I have an updated ubuntu Karmic distro, I do not know if I installed or I missed some component that caused the problem.

     
  • Sorry, I did it on the wrong file…. I changed the config.log instead of staden_config.h.

    I changed now the staden_config.h and I had a new error at this line

    gcc -shared -g -O2  -I/include -I/include -I/include -DUSE_NON_CONST  -I/usr/local/staden-2.0.0b4-src/./gap5 -I/usr/local/staden-2.0.0b4-src/./Misc -I/usr/local/staden-2.0.0b4-src/./tgap -I"/usr/include/tcl8.4/tk-private/generic" -I"/usr/include/tcl8.4/tk-private/unix" -I"/usr/include/tcl8.4/tcl-private/generic" -I"/usr/include/tcl8.4/tcl-private/unix" -I/usr/local/include -I/usr/local/staden-2.0.0b4-src/./tk_utils -I/usr/local/staden-2.0.0b4-src/./seq_utils  -I/usr/local/staden-2.0.0b4-src  -fPIC  -g -O2  -I/include -I/include -I/include -DUSE_NON_CONST  -I/usr/local/staden-2.0.0b4-src/./gap5 -I/usr/local/staden-2.0.0b4-src/./Misc -I/usr/local/staden-2.0.0b4-src/./tgap -I"/usr/include/tcl8.4/tk-private/generic" -I"/usr/include/tcl8.4/tk-private/unix" -I"/usr/include/tcl8.4/tcl-private/generic" -I"/usr/include/tcl8.4/tcl-private/unix" -I/usr/local/include -I/usr/local/staden-2.0.0b4-src/./tk_utils -I/usr/local/staden-2.0.0b4-src/./seq_utils  -I/usr/local/staden-2.0.0b4-src  -fPIC -L/usr/local/staden-2.0.0b4-src/lib  -L/lib -Wl,-export-dynamic  -o /usr/local/staden-2.0.0b4-src/lib/libgap5.so  -L/usr/local/staden-2.0.0b4-src/lib newgap5_cmds.o gap4_compat.o actf.o gap_hash.o hash_lib.o qual.o qualIO.o gap_globals.o tagdb.o init.o notedb.o active_tags.o list_proc.o gap-error.o stack_dump.o tk-io-reg.o tkAppInit.o consen.o contig_selector.o cs-object.o find_repeats.o consensus.o read_depth.o template_display.o template_draw.o fij.o do_fij.o break_contig.o export_contigs.o find_oligo.o editor_view.o editor_join.o editor_search.o tkEdNames.o tkEditor.o tman_interface.o tman_display.o tg_index_common.o baf.o maq.o maqmap.o sam_index.o ace.o depad_seq_tree.o -L/usr/local/lib -lstaden-read  -lm   -lcurl -lz  -lseq_utils   -ltk_utils  -L/usr/lib -ltk8.4 -L/usr/lib -ltcl8.4 -ltgap  -lmisc   -lseq_utils  
    LD_LIBRARY_PATH=/usr/local/staden-2.0.0b4-src/lib:$LD_LIBRARY_PATH gcc  -g -L/usr/local/staden-2.0.0b4-src/lib  -o tg_index  tg_index.o  -ltgap -lgap5  -lmisc  -lz  -ltk_utils   -lseq_utils  -L/usr/lib -ltcl8.4   -lm  -ldl
    /usr/local/staden-2.0.0b4-src/lib/libtgap.so: undefined reference to `lzma_easy_buffer_encode'
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: Leaving directory `/usr/local/staden-2.0.0b4-src/gap5'
    make: ***  Error 2

    I am sorry to bother you again.

    Giuseppe

     
  • James Bonfield
    James Bonfield
    2010-01-25

    So it looks like commenting out the _LARGEFILE64_SOURCE definition solved the first problem for you. I believe we have a fix to prevent it auto-detecting that incorrectly now.

    The second issue is due to missing xz utils (aka liblzma) on your system. This isn't required though and isn't used unless the configure script detects it exists.

    Could you please email me (to jkb at sanger . ac . uk) the complete contents of your config.log and staden_config.h files?

     
  • Hi, I met the same problem when I try to install the staden-2.0.0b4 on Ubuntu 9.1 64 bit.
    I want to know whether there is a solution now? thanks

     
  • I'm preparing to release the next beta (one day I'll write the gap5 documentation and release 2.0 for real, but not this time).

    This should have the fixes necessary. You could also extract the current version from the svn tree and build from there, although you will need autoconf to generate the configure script. This fixes the above issue and many more.

     
  • I know you said above that you have a fix ready for the next release, I thought I'd just chime in with a "me too!". Though I'm on a 32bit machine, running ubuntu 9.10

    G

     
  • I just produced some prebuilt binary distributions, which I'm in the process of testing on various platforms before I upload to sourceforge.

    However if you want, take a look in ftp://ftp.sanger.ac.uk/pub/jkb/ and see the staden-2.0.0b5-<machine>.tar.gz files.

    I'll release a source tarball on SF for 2.0.0b5 too in the next few days I hope.

    James