[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation of findutils-4.4.0 with gcc-4.4.0-20090225 -- error with
From: |
Bruno Haible |
Subject: |
Re: compilation of findutils-4.4.0 with gcc-4.4.0-20090225 -- error with wctype.h in gnulib code |
Date: |
Sat, 28 Feb 2009 22:22:16 +0100 |
User-agent: |
KMail/1.9.9 |
Frank Erens wrote:
> > Please, on what system? You mentioned the compiler you are using, but the
> > platform (`uname -srm`) is also mandatory information.
> >
> Sorry, I didn't knew this was important:
> Linux 2.6.27-11-server i686
Thanks. Yes it's important so that we know at which copy of <wctype.h> to look
at.
Namely, the one from glibc. And for reproducing. Building findutils-4.4.0 on a
Linux 2.6.25.5 system with 4.3.1, there are no problems.
> I checked those lines, and they all seem to use a wint_t variable.
Yes, the syntax errors appear to be where 'wint_t' is used as a type.
> I've checked
> the preprocessed source code, and there was no typedef for wint_t in there.
> I tried compiling the following code:
> ---------------------------------------------------------
> #include <wchar.h>
> #include <wctype.h>
> void test(wint_t _wc) {}
> int main(void) {}
> ---------------------------------------------------------
> But that worked without problems. The prepocessed source code did contain
> the typedef.
So, you have three options:
- look at the <wchar.h> and <wctype.h> files for the conditions under which
wint_t is defined or not being defined. Also look at the wchar.h and
wctype.h files generated in the lib/ directory by gnulib.
- Reduce the source file mbchar.c, removing includes and code, as long as
it errs out while compiling. This will give you a hint.
- Try building with an older compiler. Since you say that it's the first
build that you are doing with this new, snapshot version of gcc.
> I've used the following quick hack to solve it, however, I'm still not
> certain what the causes of this bug were.
> ---------------------------------------------------------
> --- mbchar.h.orig 2009-02-28 18:37:45.000000000 +0000
> +++ mbchar.h 2009-02-28 18:40:03.000000000 +0000
> @@ -151,6 +151,10 @@
> <wchar.h>.
> BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
> <wchar.h>. */
> +
> +/* Quick fix for wint_t */
> +typedef unsigned int wint_t;
> +
> #include <stdio.h>
> #include <time.h>
> #include <wchar.h>
> ---------------------------------------------------------
Yes, but such quick hack can not be committed upstream. In other words, such
a quick hack helps you, but no one else who might encounter the same problem.
Bruno