Hi there,
          I need to use the mysql.h library in an AIX
version 5.2 machine.
First, I tried downloading the precompiled binaries
for AIX, but when I tried to compile a simple .c file,
I got the following errror:

cc mysql_test.c -o mysql_test
-I/usr/local/include/mysql -lmysqlclient

ld: 0711-317 ERROR: Undefined symbol: .mysql_connect


I imagined that the problem was that I was using a
compiler different than the one used for compiling the
library(C for AIX Compiler, Version 6).
So, I've downloaded the mysql source file
(mysql-4.1.7.tar.gz). I've uncompressed the file and
followed the mysql manual installation procedure:

shell> gunzip < mysql-4.1.7.tar.gz | tar -xvf -
shell> cd mysql-4.1.7
shell> ./configure --prefix=/usr/local/mysql
shell> make

but, I got the following error:


 cc -qlanglvl=ansi
-DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\"
-DDATADIR=\"/usr/local/mysql/var\"
-DSHAREDIR=\"/usr/local/mysql/share/mysql\"
-DUNDEF_THREADS_HACK -DDONT_USE_RAID -I. -I. -I..
-I../include -I../zlib -O -DDBUG_OFF -c
my_gethostbyname.c  -DPIC -o .libs/my_gethostbyname.o
"my_gethostbyname.c", line 73.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.


Finally, I followed the manual's aix notes:

export CC="xlc_r -ma -O3 -qstrict -qoptimize=3
-qmaxmem=8192 "
export CXX="xlC_r -ma -O3 -qstrict -qoptimize=3
-qmaxmem=8192"
export CFLAGS="-I /usr/local/include"
export LDFLAGS="-L /usr/local/lib"
export CPPFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS

./configure --prefix=/usr/local \
                --localstatedir=/var/mysql \
                --sbindir='/usr/local/bin' \
                --libexecdir='/usr/local/bin' \
                --enable-thread-safe-client \
                --enable-large-files

being carefull enough to change the paths with my
machine correct paths(also tried using cc compiler).
But, when I run the configure command I get the
following error message:

configure: error: C++ preprocessor "/lib/cpp" fails
sanity check
See `config.log' for more details.


Can anybody provide me with a mysql client library
compiled with cc compiler for AIX 5.2?
Or, at least, guide me on what procedure should I run
in order to succesfully compile the mysql source
files?

thanks in advance.
           Pablo Salinas














_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to