[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: findutils-4.2.31 build failed on solaris 2.6
From: |
James Youngman |
Subject: |
Re: findutils-4.2.31 build failed on solaris 2.6 |
Date: |
Mon, 4 Jun 2007 11:52:47 +0100 |
On 6/4/07, Paul Lew <address@hidden> wrote:
Tried to build on solaris 2.6 and it failed. Previous version
(findutils-4.2.30) built with no such error:
> make
...
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../intl
-I/auto/insbu-cnstools/include -g -O2 -MT quotearg.o -MD -MP -MF
.deps/quotearg.Tpo -c -o quotearg.o quotearg.c
In file included from quotearg.c:57:
/usr/include/wctype.h:89: error: expected ')' before '+' token
/usr/include/wctype.h:89: error: expected ')' before '[' token
make[4]: *** [quotearg.o] Error 1
> n 57 gnulib/lib/quotearg.c
54 - # define mbsinit(ps) 1
55 - #endif
56 -
57 - #include <wctype.h>
58 -
59 - #ifndef SIZE_MAX
60 - # define SIZE_MAX ((size_t) -1)
> n 89 /usr/include/wctype.h
86 - extern int iswalnum(wint_t c);
87 - extern int iswspace(wint_t c);
88 - extern int iswpunct(wint_t c);
89 - extern int iswprint(wint_t c);
90 - extern int iswgraph(wint_t c);
91 - extern int iswcntrl(wint_t c);
92 -
This is caused by a bug in gnulib, as reported on address@hidden
by Bruno Haible:
<<
Hi Paul,
quotearg.c fails to compile with Sun C 5.0 on Solaris 2.5.1:
cc -O -DHAVE_CONFIG_H -I. -I.. -g -c quotearg.c
"///usr/include/wctype.h", line 83: syntax error before or at: +
"///usr/include/wctype.h", line 83: undefined or not a type: c
"///usr/include/wctype.h", line 83: cannot recover from previous errors
cc: acomp failed for quotearg.c
The reason is the definition of iswprint() as a macro in quotearg.c:48,
which messes up the declaration of the function iswprint in <wctype.h>.
The fix is simple: Include all system headers before defining such macros.
Here is a proposed patch.
2007-03-11 Bruno Haible <address@hidden>
* lib/quotearg.c: Include <wctype.h> early, before the definition of
the iswprint macro. Needed on Solaris 2.5.1.
*** lib/quotearg.c 16 Jan 2007 16:31:23 -0000 1.54
--- lib/quotearg.c 11 Mar 2007 22:42:17 -0000
***************
*** 32,37 ****
--- 32,38 ----
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
+ #include <wctype.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
***************
*** 54,61 ****
# define mbsinit(ps) 1
#endif
- #include <wctype.h>
-
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)
#endif
--- 55,60 ----
To fix this problem, you could either apply the patch above manually
or advance the gnulib version used by findutils. To do the latter,
edit the file import-gnulib.config to change gnulib_version from
2007-02-24 to 2007-03-16 (or any later value), then run
import-gnulib.sh. You will need a number of development tools (for
example Perl, autoconf, automake and GNU m4) to do the latter.
James.
Full build log attached.
-- Paul 06/03/07 04:58 PM --
_______________________________________________
Bug-findutils mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-findutils