On Wed, 24 Nov 2010, xufeng zhang wrote:
Hi,
I'm using ncurses-5.7, but I can't compile ncurses successful,
here is the compile error:
------------------------------------------------------------------
i686-target-linux-gnu-gcc -DHAVE_CONFIG_H -I../ncurses
-I../../ncurses -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -I.
-I../include -I../../ncurses/../include -g -march=pentium4 -mmmx
-msse -msse2 -mfpmath=sse -O2 -fomit-frame-pointer -pipe --param
max-inline-insns-single=1200 -fPIC -c
.../../ncurses/widechar/lib_get_wch.c -o ../obj_s/lib_get_wch.o
.../../ncurses/widechar/lib_get_wch.c:57: error: expected '=', ',',
';', 'asm' or '__attribute__' before 'an'
Makefile:1928: *** [../obj_s/lib_get_wch.o] Error 1
-----------------------------------------------------------------
I found lib_get_wch.c:57 is : make an error, so I think it is because
ncurses can't identify "make an error" symbol,
but I don't know what lead to this problem.
The configure script was not able to find the functions it's looking for.
In context, lib_get_wch.c has
#if HAVE_MBTOWC && HAVE_MBLEN
#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
#define count_mbytes(buffer,length,state) mblen(buffer,length)
#define check_mbytes(wch,buffer,length,state) \
(int) mbtowc(&wch, buffer, length)
#define state_unused
#elif HAVE_MBRTOWC && HAVE_MBRLEN
#define reset_mbytes(state) init_mb(state)
#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
#define check_mbytes(wch,buffer,length,state) \
(int) mbrtowc(&wch, buffer, length, &state)
#else
make an error
#endif
So it's missing one or both parts of one of the first #if/#elif checks.
Your command-line suggests you're cross-compiling; perhaps those
functions
are not found in the corresponding library (or else there's some issue
with the configure script). Current code probably will configure the
same for this slice - I don't recall changing it recently except to
move the ifdef's here up a level (as part of last year's refactoring).