Subject: libiconv compilation problem on mandrake 8
From: Jared Davis (aiken@clan11.com)
Date: Tue Jun 19 2001 - 20:06:27 CDT
Caveat: I am very new to this so I'm not sure if this is the right place to
send this, or if it's been reported or etc.
I recently downloaded abiword source via cvs and went to make libiconv.
Iconv's configure script executed fine, but when I ran 'make' I received the
following error message:
    [root@kinowin libiconv]# make
    cd src; make -r all
    make[1]: Entering directory `/home/jared/abidev/libiconv/src'
    /bin/sh ../libtool --mode=compile
gcc -O  -I. -I. -I../include -I./../include -c ./iconv.c
    gcc -O -I. -I. -I../include -I./../include -c ./iconv.c  -fPIC -DPIC -o
iconv.lo
    In file included from ./iconv.c:19:
    ../include/libiconv.h:64: parse error before `iconv_open'
    ../include/libiconv.h:64: warning: data definition has no type or
storage class
    ../include/libiconv.h:74: parse error before `cd'
    ../include/libiconv.h:80: parse error before `cd'
    ./iconv.c:89: parse error before `iconv_open'
    ./iconv.c: In function `iconv_open':
    ./iconv.c:100: `iconv_t' undeclared (first use in this function)
    ./iconv.c:100: (Each undeclared identifier is reported only once
    ./iconv.c:100: for each function it appears in.)
    ./iconv.c:150: parse error before `cd'
    ./iconv.c: At top level:
    ./iconv.c:156: parse error before `icd'
    ./iconv.c: In function `iconv':
    ./iconv.c:160: `icd' undeclared (first use in this function)
    ./iconv.c:161: `inbuf' undeclared (first use in this function)
    ./iconv.c:162: `outbuf' undeclared (first use in this function)
    ./iconv.c:169: `outbytesleft' undeclared (first use in this function)
    ./iconv.c:183: `inbytesleft' undeclared (first use in this function)
    ./iconv.c: At top level:
    ./iconv.c:376: parse error before `icd'
    ./iconv.c: In function `iconv_close':
    ./iconv.c:378: `icd' undeclared (first use in this function)
    make[1]: *** [iconv.lo] Error 1
    make[1]: Leaving directory `/home/jared/abidev/libiconv/src'
    make: *** [all] Error 2
I investigated and was able to get a clean compile by adding the following
line before the iconv_open prototype.
    typedef void* iconv_t;
It seems that the following section of code is not working correctly on my
system:
    #if !(defined(LIBICONV_PLUG) && 1)
    /* Define iconv_t ourselves. */
    #undef iconv_t
    #define iconv_t libiconv_t
    typedef void* iconv_t;
    #endif
I do not know enough to come up with a workaround for this, and am not sure
what will break on other systems.
Perhaps the problem can be replicated by others.  My system is mandrake 8.0.
    [root@kinowin libiconv]# uname -a
    Linux kinowin 2.4.3-20mdk #1 Sun Apr 15 23:03:10 CEST 2001 i686 unknown
    [root@kinowin libiconv]# gcc -v
    Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.96/specs
    gcc version 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)
I can try to provide any additional information if it will help.
Thanks,
    Jared Davis
This archive was generated by hypermail 2b25 : Tue Jun 19 2001 - 20:06:33 CDT