bug-ncurses
[Top][All Lists]
Advanced

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

Re: Compile ncurses-5.7 failed because of can't identify "make an error"


From: Roumen Petrov
Subject: Re: Compile ncurses-5.7 failed because of can't identify "make an error" symbol
Date: Thu, 25 Nov 2010 01:12:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101031 SeaMonkey/2.0.10

Thomas Dickey wrote:
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).

The check for mbXXX functions is in block for wide character support (ref to configure script). I guess that the case is with two builds in same directory as second one with --enable-widec without to clean files from previous build. I cannot reproduce build failure in cross build linux -> mingw with and without --enable-widec configure argument.

Roumen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]