Bug #1687 Compile problems on AIX with MySQL 4.0.16
Submitted: 28 Oct 2003 3:54 Modified: 19 Nov 2003 5:30
Reporter: Richard van Denzel Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.0.16 OS:IBM AIX (AIX 5.2 ML2)
Assigned to: Lenz Grimmer CPU Architecture:Any

[28 Oct 2003 3:54] Richard van Denzel
Description:
Using gcc 3.2.3

CFLAGS="-O2 -mcpu=powerpc -Wa,-many"
CXX=gcc
CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-
rtti"
./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --with-serve
r-suffix="-pro" --enable-threads-safe-client --enable-local-infile --with-named-
z-libs=no --disable-shared

source='mysql.cc' object='mysql.o' libtool=no \
depfile='.deps/mysql.Po' tmpdepfile='.deps/mysql.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DUNDEF_THREADS_HACK -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I
..     -O3 -DDBUG_OFF   -fno-implicit-templates -fno-exceptions -fno-rtti -c -o 
mysql.o `test -f mysql.cc || echo './'`mysql.cc
In file included from mysql.cc:54:
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:2031: decla
ration
   of C function `int mvwprintw(WINDOW*, int, int, ...)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:401: previo
us
   declaration `int mvwprintw(WINDOW*, int, int, char*, ...)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:2032: decla
ration
   of C function `int mvwscanw(WINDOW*, int, int, ...)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:402: previo
us
   declaration `int mvwscanw(WINDOW*, int, int, char*, ...)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:2034: decla
ration
   of C function `int overwrite(WINDOW*, WINDOW*)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:1293: previ
ous
   declaration `int overwrite(const WINDOW*, WINDOW*)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:2037: decla
ration
   of C function `int waddstr(WINDOW*, char*)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:1299: previ
ous
   declaration `int waddstr(WINDOW*, const char*)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:2047: decla
ration
   of C function `int wprintw(WINDOW*, ...)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:404: previo
us
   declaration `int wprintw(WINDOW*, char*, ...)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:2049: decla
ration
   of C function `int wscanw(WINDOW*, ...)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.2.3/include/curses.h:404: previo
us
   declaration `int wscanw(WINDOW*, char*, ...)' here

How to repeat:
Running make again
[4 Nov 2003 4:26] Richard van Denzel
I've tried to compile it with GCC 3.3.2, but the results are the same.
[19 Nov 2003 5:30] Lenz Grimmer
Sorry, I currently don't have access to a AIX 5.2 system to be able to
reproduce this. To me this looks like a gcc installation problem. Are you
able to compile other applications with this compiler?

We do compile MySQL with gcc-3.3.2 on both AIX 4.3.2 and 5.1.0 without problems.

Is this the only curses.h file you can use? AFAIK AIX ships with its own version of libcurses - have you tried to use that one?
[3 Dec 2003 2:50] Richard van Denzel
I've configured it with:

--includedir=/usr/include

--inlcudedir=/usr/include --oldincludedir=/usr/include

--oldincludedir=/usr/include

but none of them made any difference. It keeps complaining about the gcc curses.h file.
[24 Dec 2003 2:57] Richard van Denzel
The same problems occurs when compiling 4.0.17.
[9 Jun 2004 15:20] Björn Wiberg
I'm having exactly the same problems with MySQL 4.0.20 on AIX 5.2.0.0 with gcc 3.3.2. If anyone knows of a solution to (or workaround for) this problem, please let me know.

Best regards,
Björn
[16 Jun 2004 12:09] Björn Wiberg
A workaround seems to be to install libncurses from IBM's AIX Toolbox for Linux Applications, specify --with-named-curses-libs=/usr/lib/libncurses.a, and to make sure that CPPFLAGS=-I/opt/freeware/include/ncurses <rest of line here> in the Makefile, i.e., making sure that it will find the ncurses version of "curses.h" before the libcurses one.

Best regards,
Björn