Bug #3525 Compiling error mysql-4.0.18 on Aix 5.2
Submitted: 21 Apr 2004 10:18 Modified: 28 Apr 2004 14:56
Reporter: jose Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:4.0.18 OS:IBM AIX (Aix 5.2 ML2)
Assigned to: Michael Widenius CPU Architecture:Any

[21 Apr 2004 10:18] jose
Description:
I'm trying to compile it, with gcc-3.3.2 on Aix 5.2 because i have several problems your binary version works with cyrus-sasl. 

I use this, like you say in your comments:
CC="gcc -pipe -mcpu=power -Wa,-many" \
CXX="gcc -pipe -mcpu=power -Wa,-many" \
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --with-low-memory

I get this error:
Making all in client
        if gcc -pipe -mcpu=power -Wa,-many -DUNDEF_THREADS_HACK -I. -I. -I.. -I./../include  -I../include -I./.. -I..  -I..      -O3 -DDBUG_OFF -felide-constructors -fno-exceptions -fno-rtti  -fno-implicit-templates -fno-exceptions -fno-rtti -MT mysql.o -MD -MP -MF ".deps/mysql.Tpo"  -c -o mysql.o `test -f 'mysql.cc' || echo './'`mysql.cc;  then mv -f ".deps/mysql.Tpo" ".deps/mysql.Po";  else rm -f ".deps/mysql.Tpo"; exit 1;  fi
In file included from mysql.cc:54:
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:2031: error: declaration
   of C function `int mvwprintw(WINDOW*, int, int, ...)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:401: error: previous
   declaration `int mvwprintw(WINDOW*, int, int, char*, ...)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:2032: error: declaration
   of C function `int mvwscanw(WINDOW*, int, int, ...)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:402: error: previous
   declaration `int mvwscanw(WINDOW*, int, int, char*, ...)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:2034: error: declaration
   of C function `int overwrite(WINDOW*, WINDOW*)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:1293: error: previous
   declaration `int overwrite(const WINDOW*, WINDOW*)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:2037: error: declaration
   of C function `int waddstr(WINDOW*, char*)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:1299: error: previous
   declaration `int waddstr(WINDOW*, const char*)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:2047: error: declaration
   of C function `int wprintw(WINDOW*, ...)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:404: error: previous
   declaration `int wprintw(WINDOW*, char*, ...)' here
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:2049: error: declaration
   of C function `int wscanw(WINDOW*, ...)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/curses.h:404: error: previous
   declaration `int wscanw(WINDOW*, char*, ...)' here
make: 1254-004 El código de error del último mandato es 1.

Any idea ?
Thanks.

How to repeat:
It can be repeat following that steps.
[23 Apr 2004 7:26] jose
I have discovered that mysqlclient.so file doesn't exists.
[23 Apr 2004 7:26] jose
I wanted to say in binary version.
[28 Apr 2004 14:56] Michael Widenius
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Additional info:

The error indicates that there is something wrong with your cursor.h include file and this is not a general MySQL problem.

As have been able to compile MySQL version on our AIX 5.2 machine without
the above problem I can't help you with your problem.

Please try to found out what the conflict is in cursor.h and if you can find a way to avoid it/fix it.

If there is a general fix for this, please suggest it to us and we will add it to the MySQL source tree.

Regards,
Monty
[9 Jun 2004 15:24] 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
[18 Jan 2009 16:07] ying hu
I use gcc3.3.2(IBM RPM) to compile mysql-5.1.11-beta,there is errors below ,what should i do?
---------------------------------------------------------------------------
...
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:404: error: previous
   declaration `int wscanw(WINDOW*, char*, ...)' here
make[2]: *** [mysql.o] Error 1
...
----------------------------------------------------------------------------
my e-mail is hushiying3721@126.com ,please tell me,thanks!
[4 Feb 2009 14:17] Joerg Bruehe
Ying,

there is absolutely no use in adding a new problem with a new MySQL version into a bug report for a different problem with a different MySQl version which is already set to "Can't repeat".

If you still have your problem, please check whether it is already reported. If not, then open a new bug report, and add the relevant information.
Especially, your entry here (2009-Jan-18) is incomplete:
It quotes where the compiler found the previous declaration, but does not show where it found the new (conflicting) declaration.

If both are in IBM- or gcc-provided files (what I assume, as MySQL will not provide system header files), then this looks more like a problem which you should report to the IBM or the gcc folks.