Bug #18187 error when compiling mysql-5.0.19 on AIX 5.3 using xlC_r
Submitted: 13 Mar 2006 12:04 Modified: 20 Jul 2006 8:46
Reporter: Ionut AIVANESEI Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.19 OS:IBM AIX (AIX 5.3)
Assigned to: Kent Boortz CPU Architecture:Any

[13 Mar 2006 12:04] Ionut AIVANESEI
Description:
Hi,

I am trying to compile mysql-5.0.18 on a AIX 5.3 using xlC_r.
My environment looks like this:
----------------------------------------------------------------------
setenv AUTHSTATE compat
setenv ODMDIR /etc/objrepos
setenv LOCPATH /usr/lib/nls/loc
setenv LC__FASTMSG true
setenv SHLVL 1
setenv PATH ${PATH}:/usr/vacpp/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:.
setenv NLSPATH /usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat

export CC="xlc_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192 "
export CXX="xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192"
----------------------------------------------------------------------

How to repeat:
STEP 1
./configure --prefix=${HOME}/mysql

errors/warnings:
----------------------------------------------------------------------
...
checking whether xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192 accepts -g... yes
checking dependency style of xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192... aix
checking how to run the C preprocessor... xlc_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192  -E
xlc_r: 1501-216 command option -version is not recognized - passed to ld
xlc_r: 1501-224 fatal error in less: signal 13 received
checking "C Compiler version"... "xlc_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192    C for AIX Compiler, Version 6"
xlC_r: 1501-216 command option -version is not recognized - passed to ld
xlC_r: 1501-224 fatal error in less: signal 13 received
checking "C++ compiler version"... "xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192   C for AIX Compiler, Version 6"
checking for as... /bin/as
...
checking for sys/wait.h... (cached) yes
checking term.h usability... no
checking term.h presence... yes
configure: WARNING: term.h: present but cannot be compiled
configure: WARNING: term.h:     check for missing prerequisite headers?
configure: WARNING: term.h: see the Autoconf documentation
configure: WARNING: term.h:     section "Present But Cannot Be Compiled"
configure: WARNING: term.h: proceeding with the preprocessor's result
configure: WARNING: term.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING:     ## ------------------------------------------ ##
checking for term.h... yes
checking for unistd.h... (cached) yes
...
----------------------------------------------------------------------

STEP 2
make

errors/warnings:
----------------------------------------------------------------------
...
  xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192 -DMYSQL_SERVER  -DDEFAULT_MYSQL_HOME="\"/sviuser21.ep5703/crm/svi/eddys/web/mysql\""  -DDATADIR="\"/sviuser21.ep5703/crm/svi/eddys/web/mysql/var\""  -DSHAREDIR="\"/sviuser21.ep5703/crm/svi/eddys/web/mysql/share/mysql\""  -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib  -I../innobase/include   -I../include -I../include  -I../regex -I.        -O3 -DDBUG_OFF    -c -o table.o table.cc
"/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is specified.
"mysql_priv.h", line 1027.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
"mysql_priv.h", line 1035.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
        source='sql_select.cc' object='sql_select.o' libtool=no  depfile='.deps/sql_select.Po' tmpdepfile='.deps/sql_select.TPo'  depmode=aix /bin/sh ../depcomp  xlC_r -ma -O3 -qstrict -qoptimize=3 -qmaxmem=8192 -DMYSQL_SERVER  -DDEFAULT_MYSQL_HOME="\"/sviuser21.ep5703/crm/svi/eddys/web/mysql\""  -DDATADIR="\"/sviuser21.ep5703/crm/svi/eddys/web/mysql/var\""  -DSHAREDIR="\"/sviuser21.ep5703/crm/svi/eddys/web/mysql/share/mysql\""  -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib  -I../innobase/include   -I../include -I../include  -I../regex -I.        -O3 -DDBUG_OFF    -c -o sql_select.o sql_select.cc
"/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is specified.
"sql_select.cc", line 3885.13: 1540-0063 (S) The text "." is unexpected.
"mysql_priv.h", line 1027.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
"mysql_priv.h", line 1035.36: 1540-1281 (W) "offsetof" cannot be applied to "struct st_table_list".  It is not a POD (plain old data) type.
make: 1254-004 The error code from the last command is 1.

Stop.
----------------------------------------------------------------------

Thanks,
Ionutz
[13 Mar 2006 12:31] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat on a newer version, 5.0.19, and with the followinc compiler options:

CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192"

(the came for xlC_r), and inform about the results.
[13 Mar 2006 13:25] Ionut AIVANESEI
Hi Valeriy,

The same error with 5.0.19 and with:
export CC="xlc_r"
export CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192"

error from make:
----------------------------------------------------------------------
....
        source='sql_select.cc' object='sql_select.o' libtool=no  depfile='.deps/sql_select.Po' tmpdepfile='.deps/sql_select.TPo'  depmode=aix /bin/sh ../depcomp  xlC_r -DMYSQL_SERVER  -DDEFAULT_MYSQL_HOME="\"/sviuser21.ep5703/crm/svi/eddys/web/mysql\""  -DDATADIR="\"/sviuser21.ep5703/crm/svi/eddys/web/mysql/var\""  -DSHAREDIR="\"/sviuser21.ep5703/crm/svi/eddys/web/mysql/share/mysql\""  -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib  -I../innobase/include   -I../include -I../include  -I../regex -I.        -O3 -DDBUG_OFF    -c -o sql_select.o sql_select.cc
"/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is specified.
"sql_select.cc", line 3969.13: 1540-0063 (S) The text "." is unexpected.
make: 1254-004 The error code from the last command is 1.

Stop.
----------------------------------------------------------------------

Thanks,
Ionutz
[30 Mar 2006 16:55] Valeriy Kravchuk
The following commands:

CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" CXX=xlC_r CXXFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192"  ./configure --prefix=/home/mysqldev/valeriy/dbs/5.0

make

allowed me to build 5.0.19 without any problems on our aix 5.2 machine:

mysqldev@aix52:~/valeriy/mysql-5.0.19> uname -a
AIX aix52 2 5 00592F0F4C00

We have no AIX 5.3 yet, sorry. So, please, try with that additional variables settings and inform about the results.
[30 Mar 2006 17:34] Kent Boortz
The build on AIX 5.2 with the setting that works uses compiler versions

  % lslpp -L  | grep vac
  vac.C                     6.0.0.12    C     F    C for AIX Compiler
  .
  .
  vacpp.cmp.core            6.0.0.13    C     F    VisualAge C++ Compiler
  .
  .
[30 Apr 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".
[19 Jul 2006 13:54] Peter O'Gorman
The problem is simply that aix-5.3 has a #define rem_size in /usr/include/sys/xmem.h.

#define rem_size u2._subspace_id2

The solution is to rename the variable rem_size in sql/sql_select.cc. I renamed it to size_remain.
[20 Jul 2006 3:36] Peter O'Gorman
17648 looks like a duplicate of this bug
[20 Jul 2006 8:46] Kent Boortz
This is a duplicate of bug#17648