Hi all!

I'm having trouble building the latest stable on AIX 5.1.  My env is as follows:

Relevant GNU tools:

autoconf-2.58-1.aix5.1.noarch.rpm
automake-1.7.9-1.aix5.1.noarch.rpm
binutils-2.14-3.aix5.1.ppc.rpm
bison-1.875-2.aix5.1.ppc.rpm
flex-2.5.4a-6.aix4.3.ppc.rpm
gcc-3.3.2-4.aix5.1.ppc.rpm
libtool-1.5-2.aix5.1.ppc.rpm
m4-1.4.1-1.aix5.1.ppc.rpm
make-3.80-1.aix5.1.ppc.rpm
patch-2.5.4-4.aix4.3.ppc.rpm
zlib-1.2.1-2.aix5.1.ppc.rpm
zlib-devel-1.2.1-2.aix5.1.ppc.rpm

PATH:

/opt/freeware/bin:/usr/local/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr1/acct/jonathan/bin:/usr/bin/X11:/sbin:.

Compiler Flags:

CC=gcc
CFLAGS="-mcpu=powerpc -Wa,-many"
CXX=gcc
CXXFLAGS="-mcpu=powerpc -Wa,-many  -felide-constructors -fno-exceptions
-fno-rtti"
export CC CXX CFLAGS CXXFLAGS

Configure directives:

./configure \
--prefix=/usr2/tools/mysql \
--enable-assembler \
--with-big-tables \
--with-low-memory \
--with-openssl=/usr2/tools/openssl \
--without-extra-tools \
--without-docs \
--without-bench \
--enable-local-infile

Results in the following error:

...
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
...

config.log has this to say on that:

...
configure:22525: checking term.h usability
configure:22537: gcc -c -mcpu=powerpc -Wa,-many    conftest.c >&5
In file included from conftest.c:90:
/usr/include/term.h:1194: error: parse error before "bool"
/usr/include/term.h:1225: error: parse error before "SGTTY"
/usr/include/term.h:1242: error: parse error before "sgr_mode"
/usr/include/term.h:1243: error: parse error before "sgr_faked"
/usr/include/term.h:1254: error: parse error before "funckeystarter"
/usr/include/term.h:1255: error: parse error before "_fl_rawmode"
/usr/include/term.h:1265: error: parse error before '*' token
/usr/include/term.h:1267: error: parse error before "bit_vector"
/usr/include/term.h:1271: error: parse error before "check_turn_off"
/usr/include/term.h:1272: error: parse error before "_cur_pair"
/usr/include/term.h:1273: error: parse error before '*' token
/usr/include/term.h:1276: error: parse error before '}' token
...

If I search for ''bool'' in the include files referenced in the configure
test, I only get:

sys/types.h:typedef int             boolean_t;

Type bool does appear to be defined in curses.h, which is not used in the
term.h test.

Compiling stops with:

...
if gcc -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -DNO_KILL_INTR  -I. -I. -I../..
-I../../include -I./../.. -I..    -O3 -DDBUG_OFF -mcpu=powerpc -Wa,-many  
-MT term.o -MD -MP -MF ".deps/term.Tpo" -c -o term.o term.c; \
then mv -f ".deps/term.Tpo" ".deps/term.Po"; else rm -f ".deps/term.Tpo";
exit 1; fi
In file included from
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.2/include/curses.h:136,
                 from term.c:62:
/usr/include/term.h:1351: error: conflicting types for `tgetstr'
/usr/local/include/termcap.h:27: error: previous declaration of `tgetstr'
/usr/include/term.h:1355: error: conflicting types for `tgetflag'
/usr/local/include/termcap.h:26: error: previous declaration of `tgetflag'
/usr/include/term.h:1355: error: conflicting types for `tgetnum'
/usr/local/include/termcap.h:25: error: previous declaration of `tgetnum'
/usr/include/term.h:1357: error: conflicting types for `tputs'
/usr/local/include/termcap.h:31: error: previous declaration of `tputs'
term.c: In function `term_set':
term.c:941: warning: passing arg 1 of `tgetstr' discards qualifiers from
pointer target type
term.c: In function `term_echotc':
term.c:1445: warning: passing arg 1 of `tgetstr' discards qualifiers from
pointer target type
make[3]: *** [term.o] Error 1
make[3]: Leaving directory
`/usr1/acct/jonathan/ostk/build/mysql-4.1.11/cmd-line-utils/libedit'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/usr1/acct/jonathan/ostk/build/mysql-4.1.11/cmd-line-utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr1/acct/jonathan/ostk/build/mysql-4.1.11'
make: *** [all] Error 2

In config.h, HAVE_CURSES_H, HAVE_TERMCAP_H and HAVE_TERM_H are all defined
and set to 1.

I tried removing HAVE_TERM_H, but curses.h just includes it anyway.

If I #undef HAVE_TERMCAP_H and rerun make, then it stops at:

...
gcc: installation problem, cannot exec `cc1plus': No such file or directory
make[2]: *** [my_new.o] Error 1
make[2]: Leaving directory `/usr1/acct/jonathan/ostk/build/mysql-4.1.11/mysys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr1/acct/jonathan/ostk/build/mysql-4.1.11'
make: *** [all] Error 2

I then did a make distclean, changed CXX from gcc to g++, reran configure and
make.  This time I got as far as the link stage, where I got a rash of
undefined OpenSSL symbols.  I only have static openssl libs, plus they're
64-bit, so I'm currently a) rebuilding openssl to include shared libs and b)
adding the right option to build mysql in 64-bit mode.  I will see if I get
further.

As of now, I believe my Qs are:

1. What is the correct usage of curses, term and termcap?  Which do I need? 
And why don't the MySQL folks run into this problem - what's their AIX 5.1
environment like that gives them a smooth compilation?

2. The docs say that using CXX=gcc (to use gcc as a c++ compiler) is
preferable.  Why does it seem to fail for me, forcing me to using the true
g++ compiler?

Many thanks!
Jon

-- 
Jon Earle
Software Developer / Network Manager
Specialising in Open Source Software Solutions
http://kronos.honk.org/~earlej/

"Rocket science is a lot more fun when you actually have rockets."  -- US
Navy Ad


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

Reply via email to