Bug #3890 Build problems under AIX 5.2 with xlc
Submitted: 26 May 2004 0:59 Modified: 29 May 2004 6:23
Reporter: Evan Rempel Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.0.20 OS:IBM AIX (AIX 5.2)
Assigned to: Matthew Lord CPU Architecture:Any

[26 May 2004 0:59] Evan Rempel
Description:
When attempting to reproduce the build method that was used in the distributed binaries for AIX 5.2, I get the following;

"my_gethostbyname.c", line 74.5: 1506-068 (S) Operation between types "struct hostent*" and "int" is not allowed.

How to repeat:
> CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" \
  CXX=xlC_r CXXFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" \
  ./configure --prefix=/usr/local/mysql \
  --localstatedir=/usr/local/mysql/data \
  --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex \
  --enable-thread-safe-client --enable-local-infile \
  --with-named-z-libs=no --disable-shared --with-embedded-server \
  --with-innodb

[snip]

Making all in libmysql_r

source='my_gethostbyname.c' object='my_gethostbyname.lo' libtool=yes  depfile='.deps/my_gethostbyname.Plo' tmpdepfile='.deps/my_gethostbyname.TPlo'  depmode=none /bin/sh ../depcomp  /bin/sh ../libtool --preserve-dup-deps --mode=compile xlc_r -DDEFAULT_CHARSET_HOME="\"/usr/local/mysql-4.0.20\""  -DDATADIR="\"/home1l/mysql/data\""  -DSHAREDIR="\"/usr/local/mysql-4.0.20/share/mysql\"" -DDONT_USE_RAID  -I. -I. -I..  -I./../include -I../include  -I./.. -I.. -I.. -I/usr/local/ssl/include    -O -DDBUG_OFF -I/usr/vac/include -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192  -c -o my_gethostbyname.lo `test -f 'my_gethostbyname.c' || echo './'`my_gethostbyname.c

xlc_r -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql-4.0.20\" -DDATADIR=\"/home1l/mysql/data\" -DSHAREDIR=\"/usr/local/mysql-4.0.20/share/mysql\" -DDONT_USE_RAID -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I.. -I/usr/local/ssl/include -O -DDBUG_OFF -I/usr/vac/include -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192 -c my_gethostbyname.c

"/usr/include/alloca.h", line 34.1: 1506-224 (I) Incorrect pragma ignored.

"./../include/my_sys.h", line 168.1: 1506-224 (I) Incorrect pragma ignored.

"my_gethostbyname.c", line 74.5: 1506-068 (S) Operation between types "struct hostent*" and "int" is not allowed.

make: 1254-004 The error code from the last command is 1.

Stop.
make: 1254-004 The error code from the last command is 1.

Stop.
make: 1254-004 The error code from the last command is 2.

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

I'm baffled. The only other clue I get is that there is no xlC_r executable on any of my paths. Is it a requirement? Obviously suggestions are welcomed :-)
[29 May 2004 5:42] Matthew Lord
trying to verify...
[29 May 2004 6:23] Matthew Lord
I could not repeat the problem.  I was able to build it successfuly and run make test w/o any failures.  I 
did this using bash with the following env variables:

AUTHSTATE=compat
ODMDIR=/etc/objrepos
LOCPATH=/usr/lib/nls/loc
LC__FASTMSG=true
SHLVL=1
SHELL=/usr/bin/bash
PATH=/usr/vacpp/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/mysqldev/bin:/usr/bin/X11:/sbin:.
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat

Also, xlC_r was located in:
/usr/vacpp/bin/xlC_r
[15 Jun 2004 0:29] Evan Rempel
This problem was caused by having Visual Age C installed, but not having the Visual Age C++ environment installed.

After Visual Age C++ was intalled, the problem went away.