Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

errors compiling io_lib on Windows

2011-03-26
2013-04-18
  • Matt Neilson
    Matt Neilson
    2011-03-26

    Hi,

    I'm trying to compile io_lib on Windows (XP, 32-bit) using MinGW/MSYS, and I'm running into the following error:

    if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..    -g -O2 -MT libstaden_read_la-ctfCompress.lo -MD -MP -MF ".deps/libstaden_read_la-ctfCompress.Tpo" -c -o libstaden_read_la-ctfCompress.lo `test -f 'ctfCompress.c' || echo './'`ctfCompress.c; \
            then mv -f ".deps/libstaden_read_la-ctfCompress.Tpo" ".deps/libstaden_read_la-ctfCompress.Plo"; else rm -f ".deps/libstaden_read_la-ctfCompress.Tpo"; exit 1; fi
     gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -g -O2 -MT libstaden_read_la-ctfCompress.lo -MD -MP -MF .deps/libstaden_read_la-ctfCompress.Tpo -c ctfCompress.c  -DDLL_EXPORT -DPIC -o .libs/libstaden_read_la-ctfCompress.o
    In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/stdio.h:534:0,
                     from ../io_lib/scf.h:28,
                     from ../io_lib/Read.h:44,
                     from ../io_lib/seqIOCTF.h:4,
                     from ctfCompress.c:12:
    c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/sys/types.h:55:16: error: two or more data types in declaration spe
    cifiers
    make[2]: *** [libstaden_read_la-ctfCompress.lo] Error 1
    make[2]: Leaving directory `/c/Documents and Settings/Matt/My Documents/Downloads/io_lib-1.12.5/io_lib'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/c/Documents and Settings/Matt/My Documents/Downloads/io_lib-1.12.5'
    make: *** [all] Error 2
    
     
  • Hi,

    I thought we had fixed that error.  Are you using the latest version?

    Andrew

     
  • Matt Neilson
    Matt Neilson
    2011-04-22

    Yes, I am using the latest versions of both io_lib and MINGW/MSYS.

     
  • Having begged a Windows machine to compile on, I can also attest that the latest mingw/msys and the latest io_lib from svn gives me the following:

    In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
    stdio.h:534:0,
                     from ../io_lib/scf.h:28,
                     from ../io_lib/Read.h:44,
                     from ../io_lib/seqIOCTF.h:4,
                     from ctfCompress.c:12:
    c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/sys/types.h:55:16: err
    or: two or more data types in declaration specifiers
    make[2]: *** [libstaden_read_la-ctfCompress.lo] Error 1
    make[2]: Leaving directory `/home/JNash/io_lib/io_lib'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/JNash/io_lib'
    make: *** [all] Error 2
    

    I say this often when faced with Windows.  "I HATE WINDOWS".

     
  • John Nash
    John Nash
    2011-05-02

    The fix for io_lib is as follows.  I haven't programmed in C/C++ for about 15 years so I may be off base, but the following changes allowed io_lib to compile.

    In ctfCompress.c

    Change from:

    #ifdef HAVE_CONFIG_H
    #include "io_lib_config.h"
    #endif
    #include <stdlib.h>
    #include <string.h>
    #include "io_lib/seqIOCTF.h"
    #include "io_lib/stdio_hack.h"
    

    To:

    #include <stdlib.h>
    #include <string.h>
    #ifdef HAVE_CONFIG_H
    #include "io_lib_config.h"
    #endif
    #include "io_lib/stdio_hack.h"
    #include "io_lib/seqIOCTF.h"
    

    In misc.h

    Change from:

    #ifndef _misc_h
    #define _misc_h
    #include "io_lib/os.h"
    #include <stdio.h>
    #include <stdarg.h>  /* varargs needed for v*printf() prototypes */
    #include <sys/types.h>
    #include "io_lib/xalloc.h"
    

    to:

    #ifndef _misc_h
    #define _misc_h
    #include <stdio.h>
    #include <stdarg.h>  /* varargs needed for v*printf() prototypes */
    #include <sys/types.h>
    #include "io_lib/os.h"
    #include "io_lib/xalloc.h"
    
     
  • John Nash
    John Nash
    2011-05-04

    Also, you may have to add:

    #<include stdio.h> 

    at the top of ctfCompress.c - one version of mingw made me have to do that to get io_lib to compile.