>Description:
Note: Thanks to Mr. Chakarat Skawratananond Technical Consultant,
Rapid Port Team, IBM Server Group in Austin, TX USA for his
invaluable help in diagnosing these problems.
make fails because the _AIX32_CURSES symbol is defined before
including curses.h for the mysql.cc compile
Here's the error:
-----------------
-----------------------------------------------------------
Target "all" is up to date.
Making all in client
xlC -ma -O3 -qstrict -qoptimize=3 -qmaxmem=10240 -DUNDEF_THREADS_HACK
-I./../include -I../include -I./.. -I..
-I.. -O3 -DDBUG_OFF -Wa,-many -DUNDEF_HAVE_INITGROUPS
-DSIGNALS_DONT_BREAK_READ -c mysql.cc
"/usr/include/curses.h", line 1751.14: 1540-0063 (S) The text "bool" is
unexpected.
make: 1254-004 The error code from the last command is 1.
-----------------------------------------------------------
Once this is fixed (by commenting out the #define's in the
global.h and my_global.h files -- see below for patch), the
link of client/.libs/mysqlbinlog from client/mysqlbinlog.o
fails. This failure is owing to an undefined symbol:
._my_b_write .
Here's the error:
-----------------
-----------------------------------------------------------
creating mysqltest
xlC -ma -O3 -qstrict -qoptimize=3 -qmaxmem=10240 -DUNDEF_THREADS_HACK
-I./../include -I../include -I./.. -I..
-I.. -O3 -DDBUG_OFF -Wa,-many -DUNDEF_HAVE_INITGROUPS
-DSIGNALS_DONT_BREAK_READ -c mysqlbinlog.cc
/bin/sh ../libtool --mode=link xlC -ma -O3 -qstrict -qoptimize=3
-qmaxmem=10240 -O3 -DDBUG_OFF -Wa,-many -DUNDEF_HAVE_INITGROUPS
-DSIGNALS_DONT_BREAK_READ -o mysqlbinlog mysqlbinlog.o ../libmysql/libmysqlclient.la
-lcrypt -lm
xlC -ma -O3 -qstrict -qoptimize=3 -qmaxmem=10240 -O3 -DDBUG_OFF -Wa,-many
-DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ -o .libs/mysqlbinlog mysqlbinlog.o
-L../libmysql/.libs -lmysqlclient -lcrypt -lm -lcrypt -lm -b nolibpath -b
libpath:/usr/local/lib/mysql:/usr/lib:/lib
ld: 0711-224 WARNING: Duplicate symbol: p_xargc
ld: 0711-224 WARNING: Duplicate symbol: p_xargv
ld: 0711-224 WARNING: Duplicate symbol: p_xrcfg
ld: 0711-224 WARNING: Duplicate symbol: p_xrc
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: ._my_b_write
make: 1254-004 The error code from the last command is 8.
-----------------------------------------------------------
This failure is because the mysqlclient library was linked with
the -bexpall option. The manual page for ld has this to say about
-bexpall:
expall Exports all global symbols, except imported symbols,
unreferenced symbols defined in archive members, and symbols
beginning with an underscore (_). You may export additional symbols
by listing them in an export file. This option does not affect
symbols exported by the autoexp option. This option only applies to
AIX Version 4.2 or later.
Since the linking of mysqlbinlog requires symbols beginning with
underscore, the -bexpall option is inappropriate. The correct
option is -qmkshrobj .
Correcting this (see patch below) allows make to complete.
>How-To-Repeat:
$ CC="xlc -ma -O3 -qstrict -qoptimize=3 -qmaxmem=10240" \
CXX="xlC -ma -O3 -qstrict -qoptimize=3 -qmaxmem=10240" \
./configure --localstatedir=/usr/local/mysql/var \
--prefix=/usr/local --enable-thread-safe-client \
--enable-large-files
$ make
--- this will fail as described above ---
$ perl -i -pe 's!^(#define _AIX32_CURSES)!/* $1 */!' include/global.h
$ perl -i -pe 's!^(#define _AIX32_CURSES)!/* $1 */!' include/my_global.h
$ make
--- this will fail as described above ---
$ make clean
$ rm config.cache
$ perl -i -pe 's!(archive_cmds=.*)bexpall!$1qmkshrobj!' ltconfig
$ CC="xlc -ma -O3 -qstrict -qoptimize=3 -qmaxmem=10240" \
CXX="xlC -ma -O3 -qstrict -qoptimize=3 -qmaxmem=10240" \
./configure --localstatedir=/usr/local/mysql/var \
--prefix=/usr/local --enable-thread-safe-client \
--enable-large-files
$ make
>Fix:
I fixed the faulty header defines this way:
$ perl -i -pe 's!^(#define _AIX32_CURSES)!/* $1 */!' include/global.h
$ perl -i -pe 's!^(#define _AIX32_CURSES)!/* $1 */!' include/my_global.h
I fixed the faulty shared library links by patching the ltconfig
file this way:
$ perl -i -pe 's!(archive_cmds=.*)bexpall!$1qmkshrobj!' ltconfig
(I didn't bother to do patch files since all of these changes
match exactly one line in each file.)
>Submitter-Id: <submitter ID>
>Originator: Garry Williams
>Organization:
Zvolve Systems, Inc.
1050 Crown Pointe Parkway
Suite 300
Atlanta, GA 30338
USA
+1 770 551-4504
>MySQL support: none
>Synopsis: make fails on AIX 4.3.3 using the IBM xlc/xlC compiler
>Severity: critical
>Priority: high
>Category: mysql
>Class: sw-bug
>Release: mysql-3.23.43 (Source distribution)
>Environment:
IBM RS6000 M80
System: AIX zaix 3 4 0009011F4C00
Some paths: /usr/local/bin/perl /bin/make /usr/local/bin/gmake /bin/xlc /bin/xlC
xlc: VisualAge C++ Professional / C for AIX Compiler, Version 5
Compilation info: CC='xlc -ma -O3 -qstrict -qoptimize=3 -qmaxmem=10240' CFLAGS=''
CXX='xlC -ma -O3 -qstrict -qoptimize=3 -qmaxmem=10240' CXXFLAGS='' LDFLAGS=''
LIBC:
lrwxrwxrwx 1 bin bin 19 Jun 05 18:02 /lib/libc.a ->
/usr/ccs/lib/libc.a
lrwxrwxrwx 1 bin bin 19 Jun 05 18:02 /usr/lib/libc.a ->
/usr/ccs/lib/libc.a
Configure command: ./configure --localstatedir=/usr/local/mysql/var
--prefix=/usr/local --enable-thread-safe-client --enable-large-files
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php