Bug #7669 Compile failure for 'libedit': Declarations are missing
Submitted: 4 Jan 2005 18:35 Modified: 8 Jan 2005 20:22
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1.9 + 5.0.3-pre OS:Solaris (Solaris 2.10)
Assigned to: Jim Winstead CPU Architecture:Any

[4 Jan 2005 18:35] Joerg Bruehe
Description:
On host 'butch' (Sun Sparc running Solaris 2.10) the build of 'classic' (= commercial license) fails in the 'libedit' part with this error (for 32 bit):

chared.c: In function `ch_init':
chared.c:443: error: `ED_UNASSIGNED' undeclared (first use in this function)
chared.c:443: error: (Each undeclared identifier is reported only once
chared.c:443: error: for each function it appears in.)
chared.c: In function `ch_reset':
chared.c:495: error: `ED_UNASSIGNED' undeclared (first use in this function)
chared.c: In function `ch_end':
chared.c:604: error: `ED_UNASSIGNED' undeclared (first use in this function)

The same happens for a 64 bit build:

"chared.c", line 44: warning: syntax error:  empty declaration
"chared.c", line 443: undefined symbol: ED_UNASSIGNED
"chared.c", line 495: undefined symbol: ED_UNASSIGNED
"chared.c", line 604: undefined symbol: ED_UNASSIGNED

The error is specific for 'butch', other 'classic' builds succeeded.

I found that this is defined in 'cmd-line-utils/libedit/fcns.h' which seems to be generated at compile time. The build logs for 'butch-*-classic' (both 32 and 63 bit) contain a generation line, but still it fails.
I found the same symptoms in a 4.1 build from October 2004.

How to repeat:
Try to build using 'libedit' on 'butch'.
[7 Jan 2005 15:24] Joerg Bruehe
The effect is also observed in 4.1, was even in 4.1.8 (release) based on
  1.2169.1.4 04/12/14 15:58:30 bar@mysql.com +4 -0
  bug#6275 "client_test" fail in 4.1.7 make test
  bug#6911 resultset metadata always return client character set

It did not occur in 4.1.7 which is based on
  1.2029 04/10/23 10:24:59 bar@mysql.com +1 -0
  ctype-utf8.c:
    Char is unsigned by defeault on some platforms. Cast t to a signed type.
[8 Jan 2005 4:38] Jim Winstead
/usr/xpg4/bin/tr on Solaris 2.10 is dumb.
[11 Sep 2005 6:16] Brandon CS Sanders
I'm getting the same problem in 4.1.14 on x86 Linux for which makelist.sh has already been fixed to deal with a dumb tr program.  My source directory is /nimbleturtle/ws/sources/mysql-4.1.14 and my build directory is /nimbleturtle/ws/build/mysql-4.1.14.  I ran configure from the build directory with prefix=/ws

make[3]: Entering directory `/nimbleturtle/ws/build/mysql-4.1.14/cmd-line-utils/libedit'
if gcc -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -DNO_KILL_INTR  -I. -I../../../../sources/mysql-4.1.14/cmd-line-utils/libedit -I../.. -I../../include -I../../../../sources/mysql-4.1.14/include -I../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/../.. -I..    -O3 -DDBUG_OFF    -MT chared.o -MD -MP -MF ".deps/chared.Tpo" -c -o chared.o ../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/chared.c; \
then mv -f ".deps/chared.Tpo" ".deps/chared.Po"; else rm -f ".deps/chared.Tpo"; exit 1; fi
../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/chared.c: In function `ch_init':
../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/chared.c:462: `ED_UNASSIGNED' undeclared (first use in this function)
../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/chared.c:462: (Each undeclared identifier is reported only once
../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/chared.c:462: for each function it appears in.)
../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/chared.c: In function `ch_reset':
../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/chared.c:514: `ED_UNASSIGNED' undeclared (first use in this function)
../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/chared.c: In function `ch_end':
../../../../sources/mysql-4.1.14/cmd-line-utils/libedit/chared.c:623: `ED_UNASSIGNED' undeclared (first use in this function)
make[3]: *** [chared.o] Error 1
make[3]: Leaving directory `/nimbleturtle/ws/build/mysql-4.1.14/cmd-line-utils/libedit'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/nimbleturtle/ws/build/mysql-4.1.14/cmd-line-utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/nimbleturtle/ws/build/mysql-4.1.14'
make: *** [all] Error 2