Re: unable to make libunicode-0.4



Newer glibc?  Glibc-2.1.3 is the newest on the mirror I use.  I have
also downloaded gcc-2.95.2 last night and will be installing it over the
next couple of days.

However I would like to know if any one could tell me why the following
happens.

[root frodo libunicode-0.4]# gcc -DHAVE_CONFIG_H -I. -I. -I. -W -Wall
-Wno-unused -D__restrict -c convert.c  -fPIC -DPIC -o .libs/convert.lo
In file included from convert.h:24,
                 from convert.c:28:
/usr/include/iconv.h:42: parse error before `1'

So I had a look at what the pre-processor did to the files.

[root frodo libunicode-0.4]# gcc -DHAVE_CONFIG_H -I. -I. -I. -W -Wall
-Wno-unused -D__restrict -c convert.c  -fPIC -DPIC -E |tr -s '\n' |tr -s
'\r'|uniq|less

The  pipes are to remove all the white space. Then I looked for the part
of the output that  came from /usr/include/iconv.h

# 24 "/usr/include/iconv.h" 2 3

typedef void *iconv_t;

extern iconv_t iconv_open  (__const char *__tocode,
                                __const char *__fromcode)  ;

extern size_t iconv  (iconv_t __cd,
                          __const char ** 1  __inbuf,
                          size_t * 1  __inbytesleft,
                          char ** 1  __outbuf,
                          size_t * 1  __outbytesleft)  ;

extern int iconv_close  (iconv_t __cd)  ;

The flag `-D__restrict' has tuned the word `__restrict' into a `1'!   I
do not think that this was what was wanted.

Phill

Jody Goldberg wrote:

On Sun, Oct 22, 2000 at 08:24:19AM -0400, Phillip J Shelton wrote:
glibc-2.1.3-21
egcs-1.1.2-30

    42      __const char **__restrict __inbuf,

Theres your problem.  That version of glibc is not getting along
well with that version of egcs.

from a newer glibc's /usr/include/sys/cdefs.h
    /* __restrict is known in EGCS 1.2 and above. */
    #if !__GNUC_PREREQ (2,92)
    # define __restrict     /* Ignore */
    #endif

You should be fine if you compile with 'CFLAGS=-D__restrict'
or update glibc or egcs.

Good Luck





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]