Bug #17648 Compilation error on AIX 5.3
Submitted: 22 Feb 2006 13:40 Modified: 15 Aug 2006 3:38
Reporter: Thomas Silvestre Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.18 OS:IBM AIX (AIX 5.3)
Assigned to: Kent Boortz CPU Architecture:Any

[22 Feb 2006 13:40] Thomas Silvestre
Description:
errors at the compilation of sql_select.cc

CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -frlide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler
...
...
(configure is ok and generate Makefiles)
...
make
...
make  all-recursive
make[1]: Entering directory `/tmp/mysql-5.0.18/sql'
Making all in share
make[2]: Entering directory `/tmp/mysql-5.0.18/sql/share'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/mysql-5.0.18/sql/share'
make[2]: Entering directory `/tmp/mysql-5.0.18/sql'
if g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I../include -I../include -I../regex -I.      -O3 -DDBUG_OFF    -fno-implicit-templates -fno-exceptions -fno-rtti -MT sql_select.o -MD -MP -MF ".deps/sql_select.Tpo" -c -o sql_select.o sql_select.cc; \
then mv -f ".deps/sql_select.Tpo" ".deps/sql_select.Po"; else rm -f ".deps/sql_select.Tpo"; exit 1; fi
sql_select.cc: In function `void greedy_search(JOIN*, long long unsigned int,
   unsigned int, unsigned int)':
sql_select.cc:3885: error: parse error before `.' token
sql_select.cc:3892: error: request for member `_subspace_id2' in `u2', which is
   of non-class type `uint'
sql_select.cc:3900: error: request for member `_subspace_id2' in `u2', which is
   of non-class type `uint'
sql_select.cc:3935: error: request for member `_subspace_id2' in `u2', which is
   of non-class type `uint'
make[2]: *** [sql_select.o] Error 1
make[2]: Leaving directory `/tmp/mysql-5.0.18/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/mysql-5.0.18/sql'
make: *** [all] Error 2

How to repeat:
just "make"

Suggested fix:
I have no idea how to resolve this one :-/
[22 Feb 2006 14:06] Valeriy Kravchuk
Thank you for a problem report. Can you, please, send the uname -a results, just to be sure.

We have no AIX 5.3 machine (4.3, 5.1, 5.2, but not 5.3) here, and we usually do not use gcc for compiling on AIX, so I am not sure I'll be able to help you with this problem. But can you, please, try to omit any additional configure options (besides --prefix) and gcc options, and rebuild once more. Inform about the results.
[22 Feb 2006 14:57] Thomas Silvestre
this is the output of uname -a:
AIX issrvprdfil03 3 5 0051C7FA4C00

I've make the following on the system:
unlogged
logged again (to avoid CLFAGS on so)
make clean
./configure --prefix=/usr/local/mysql
...
(everything's ok)
...
make
...
if g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I../include -I../include -I../regex -I.      -O3 -DDBUG_OFF    -fno-implicit-templates -fno-exceptions -fno-rtti -MT sql_select.o -MD -MP -MF ".deps/sql_select.Tpo" -c -o sql_select.o sql_select.cc; \
then mv -f ".deps/sql_select.Tpo" ".deps/sql_select.Po"; else rm -f ".deps/sql_select.Tpo"; exit 1; fi
sql_select.cc: In function `void greedy_search(JOIN*, long long unsigned int,
   unsigned int, unsigned int)':
sql_select.cc:3885: error: parse error before `.' token
sql_select.cc:3892: error: request for member `_subspace_id2' in `u2', which is
   of non-class type `uint'
sql_select.cc:3900: error: request for member `_subspace_id2' in `u2', which is
   of non-class type `uint'
sql_select.cc:3935: error: request for member `_subspace_id2' in `u2', which is
   of non-class type `uint'
make[4]: *** [sql_select.o] Error 1
make[4]: Leaving directory `/tmp/mysql-5.0.18/sql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/mysql-5.0.18/sql'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/mysql-5.0.18/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/mysql-5.0.18'
make: *** [all] Error 2

so it doesn't change anything
[12 Mar 2006 7:18] Ralf Becker
See http://bugs.mysql.com/bug.php?id=18151 for a quick fix
[13 Mar 2006 17:36] Valeriy Kravchuk
Please, check is it really a duplicate of http://bugs.mysql.com/bug.php?id=18151. We have no AIX 5.3 machine, so there is no good way for me to check that fix proposed.
[14 Mar 2006 8:22] Thomas Silvestre
The compilation process seems to go further with the "patch".

Now I've got a new problem, but I don't think it's related to mysql:

make[2]: Entering directory `/tmp/mysql-5.0.18/client'
if g++ -DUNDEF_THREADS_HACK -I. -I. -I.. -I../include -I../include -I../regex       -O3 -DDBUG_OFF    -fno-implicit-templates -fno-exceptions -fno-rtti -MT mysql.o -MD -MP -MF ".deps/mysql.Tpo" -c -o mysql.o 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:58:
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:2031: error: declaration
   of C function `int mvwprintw(WINDOW*, int, int, ...)' conflicts with
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:401: error: previous
   declaration `int mvwprintw(WINDOW*, int, int, char*, ...)' here
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:2032: error: declaration
   of C function `int mvwscanw(WINDOW*, int, int, ...)' conflicts with
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:402: error: previous
   declaration `int mvwscanw(WINDOW*, int, int, char*, ...)' here
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:2034: error: declaration
   of C function `int overwrite(WINDOW*, WINDOW*)' conflicts with
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:1293: error: previous
   declaration `int overwrite(const WINDOW*, WINDOW*)' here
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:2037: error: declaration
   of C function `int waddstr(WINDOW*, char*)' conflicts with
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:1299: error: previous
   declaration `int waddstr(WINDOW*, const char*)' here
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:2047: error: declaration
   of C function `int wprintw(WINDOW*, ...)' conflicts with
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:404: error: previous
   declaration `int wprintw(WINDOW*, char*, ...)' here
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/include/curses.h:2049: error: declaration
   of C function `int wscanw(WINDOW*, ...)' conflicts with
/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
make[2]: Leaving directory `/tmp/mysql-5.0.18/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/mysql-5.0.18'
make: *** [all] Error 2
[21 Apr 2006 14:13] Valeriy Kravchuk
Please, try to repeat with a newer version of MySQL (5.0.20) and all the patches mentioned in the bug report I quoted. It should be even in the manual now (http://dev.mysql.com/doc/refman/5.0/en/ibm-aix.html). Inform about the results.
[21 May 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[20 Jul 2006 8:50] Kent Boortz
This is an issue with non gcc compiles as well,
as shown by the duplicate reports bug#18151 and
bug#18187.
[28 Jul 2006 19:27] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/9732

ChangeSet@1.2213, 2006-07-28 21:26:46+02:00, kent@mysql.com +3 -0
  sql_select.cc:
    Renamed variable, to avoid name clash with macro "rem_size"
    on AIX 5.3 and "/usr/include/sys/xmem.h" (bug#17648)
  asn.cpp, asn.hpp:
    Avoid name clash with NAME_MAX
[11 Aug 2006 10:02] Kent Boortz
This change will be in 5.0.25 and 5.1.12
[15 Aug 2006 3:38] Paul DuBois
No changelog entry needed.