List:General Discussion« Previous MessageNext Message »
From:R Blake Date:July 14 2002 3:25am
Subject:mysql-4.0.2-alpha BROKEN on OSX 10.1.4 Server; WORKAROUNDS incl.,
but need help with FIXes
View as plain text  
hi all,

three BUGS are reported here that have cropped up in mysql-4.0.2-alpha on 
OSX 10.1.4 Server

current system has a SUCCESSFUL install of:
>Server: /usr/local/mysql/bin/mysqladmin  Ver 8.23 Distrib 4.0.1-alpha, for
apple-darwin5.4 on powerpc

the 3 bugs:

(1) poll.h not present in BSD variants; HAVE_POLL set to #define
(2) "sizeof applied to an incomplete type" in libmysql/libmysql.c & 
libmysql/manager.c
(3) libtool chokes on a long command line argument during piecwise archive 
linking (no workaround yet ....)

Any thoughts/insights are MUCH appreciated .....

DL:
 http://mysql.he.net/Downloads/MySQL-4.0/mysql-4.0.2-alpha.tar.gz

ENV:
 setenv CFLAGS "-O3 -fno-omit-frame-pointer $myLIBS";\
 setenv CXXFLAGS "-O3 -fno-omit-frame-pointer -felide-constructors 
-fno-exceptions -fno-rtti $myINCLUDES";\
 setenv LDFLAGS "-flat_namespace -undefined suppress $myLIBS";\
 setenv LDDLFLAGS "-flat_namespace -undefined suppress $myLIBS";\
 setenv CPPFLAGS "$myINCLUDES";\
 setenv LD cc;\
 setenv CXX cc

@ SHELL:
gnutar zxf mysql-4.0.2-alpha.tar.gz
cd mysql-4.0.2-alpha

glibtoolize --force --copy

fix the obsoleted AC_PROG_RANLIB (for libtool 1.4d +)
==========================
(EDITOR) /usr/ports/mysql-4.0.2-alph/configure.in
(CHANGE)
AC_PROG_RANLIB
(TO)
AC_PROG_LIBTOOL
==========================

aclocal

./configure \
--disable-shared --enable-static \
--prefix=/usr/local/mysql \
--sysconfdir=/private/etc/mysql --datadir=/usr/local/var/mysql \
--localstatedir=/private/var/mysql --sharedstatedir=/private/com/mysql \
--mandir=/usr/local/man \
--enable-assembler \
--with-unix-socket-path=/usr/local/tmp/mysql.sock --with-mysqld-user=mysql 
--with-tcp-port=3306 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib \
--enable-thread-safe-client --with-libwrap --with-vio \
--with-openssl=/usr/local/ssl --with-innodb --enable-local-infile \
--with-extra-charsets=complex \
--with-named-z-libs=not-used

BUG #1:
<sys/poll.h> does not seem to exist in BSD variants (cref: 
http://www.netsys.com/bsdi-users/2001-11/msg00093.html), but nonetheless, 
"./configure" sets HAVE_POLL as defined, causing make to fail with 
sys/poll.h "not found".

WORKAROUND:
==========================
(EDITOR) /usr/ports/mysql-4.0.2-alph/configure.in
(CHANGE)
	/* Define if you have the poll function.  */
	#define HAVE_POLL 1
(TO)
	/* Define if you have the poll function.  */
	/* #define HAVE_POLL 1 */
==========================


BUG #2:
a subsequent "make" fails with:

ar cru libreadline.a readline.o funmap.o keymaps.o vi_mode.o parens.o 
rltty.o complete.o bind.o isearch.o display.o signals.o util.o kill.o 
undo.o macro.o input.o callback.o terminal.o xmalloc.o history.o 
histsearch.o histexpand.o histfile.o nls.o search.o shell.o tilde.o
ranlib libreadline.a
make[2]: Leaving directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/readline'
Making all in pstack
make[2]: Entering directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/pstack'
Making all in aout
make[3]: Entering directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/pstack/aout'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/pstack/aout'
make[3]: Entering directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/pstack'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/pstack'
make[2]: Leaving directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/pstack'
Making all in libmysql
make[2]: Entering directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/libmysql'
/bin/sh ../libtool --mode=compile cc 
-DDEFAULT_CHARSET_HOME="\"/usr/local/mysql\"" 
-DDATADIR="\"/private/var/mysql\"" 
-DSHAREDIR="\"/usr/local/var/mysql/mysql\"" -DUNDEF_THREADS_HACK 
-DDONT_USE_RAID  -DMYSQL_CLIENT -I./../include -I../include -I./.. -I.. 
-I..   -I/System/Library/Frameworks -I/usr/include -I/usr/local/include 
-I/usr/X11R6/include -I/usr/local/BerkeleyDB/include -O -DDBUG_OFF -O3 
-fno-omit-frame-pointer -L/System/Library/Frameworks -L/usr/lib 
-L/usr/local/lib -L/usr/X11R6/lib -L/usr/local/BerkeleyDB/lib 
-traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE 
-DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH -c 
libmysql.c
cc -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\" 
-DDATADIR=\"/private/var/mysql\" -DSHAREDIR=\"/usr/local/var/mysql/mysql\" 
-DUNDEF_THREADS_HACK -DDONT_USE_RAID -DMYSQL_CLIENT -I./../include 
-I../include -I./.. -I.. -I.. -I/System/Library/Frameworks -I/usr/include 
-I/usr/local/include -I/usr/X11R6/include -I/usr/local/BerkeleyDB/include 
-O -DDBUG_OFF -O3 -fno-omit-frame-pointer -L/System/Library/Frameworks 
-L/usr/lib -L/usr/local/lib -L/usr/X11R6/lib -L/usr/local/BerkeleyDB/lib 
-traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE 
-DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH -c 
libmysql.c -o libmysql.o
libmysql.c: In function `mysql_real_connect':
libmysql.c:1663: sizeof applied to an incomplete type
make[2]: *** [libmysql.lo] Error 1
make[2]: Leaving directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Volumes/ServerSystem/ports/mysql-4.0.2-alpha'
make: *** [all-recursive-am] Error 2
[root@server]

i don't have a FIX, but commenting out the offending code (also in 
'manager.c') seems to do the trick ....

WORKAROUND:
==========================
(EDITOR) 1660:1664 
/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/libmysql/libmysql.c
(EDITOR) 121:134 
/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/libmysql/manager.c

	else
---	{ /*
+++	{ /*
		int tmp_errno;
		struct hostent tmp_hostent,*hp;
		char buff2[GETHOSTBYNAME_BUFF_SIZE];
		hp = my_gethostbyname_r(host,&tmp_hostent,buff2,sizeof(buff2),
		                        &tmp_errno);
		if (!hp)
		{
		con->last_errno=tmp_errno;
		sprintf(con->last_error,"Could not resolve host '%s'",host);
		my_gethostbyname_r_free();
		goto err;
		}
		memcpy(&sock_addr.sin_addr,hp->h_addr, (size_t) hp->h_length);
---		       my_gethostbyname_r_free(); */
+++		       my_gethostbyname_r_free(); */
	}
==========================

now, "make" gets a lot further, but fails at:

/bin/sh ../libtool --mode=link cc  -O -DDBUG_OFF -O3 
-fno-omit-frame-pointer -L/System/Library/Frameworks -L/usr/lib 
-L/usr/local/lib -L/usr/X11R6/lib -L/usr/local/BerkeleyDB/lib 
-traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE 
-DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH 
-flat_namespace -undefined suppress -L/System/Library/Frameworks -L/usr/lib 
-L/usr/local/lib -L/usr/X11R6/lib -L/usr/local/BerkeleyDB/lib -o 
libmysqlclient.la -rpath /usr/local/mysql/lib/mysql -version-info 11:0:0 
libmysql.lo net.lo password.lo manager.lo get_password.lo errmsg.lo 
my_init.lo my_static.lo my_malloc.lo my_realloc.lo           my_create.lo 
my_delete.lo mf_tempfile.lo my_open.lo .lo my_read.lo my_write.lo errors.lo 
my_error.lo my_getwd.lo my_div.lo                         mf_pack.lo 
my_messnc.lo mf_dirname.lo mf_fn_ext.lo f_format.lo mf_path.lo 
mf_unixpath.lo my_fopen.lo                       my_symlink.lo 
my_fstream.lo                       mf_loadpath.lo my_pthread.lo 
my_thr_init.lo y_compress.lo array.lo my_once.lo list.lo my_net.lo 
charset.lo hash.lo mf_iocache.lo                         mf_iocache2.lo 
my_seek.lo     my_pread.lo mf_cache.lo my_vsnprintf.lo md5.lo my_getopt.lo 
my_gethostbyname.lo my_lib.lo strmov.lo strxmov.lo strxnmov.lo strnmov.lo 
strmake.lo strend.lo nt2str.lo str2int.lo strinstr.lo strcont.lo 
strcend.lo bcmp.lo bchange.lo bmove.lo bmove_upp.lo longlong2str.lo 
strtoull.lo strtoll.lo llstr.lo                  ctype.lo ctype-big5.lo 
ctype-czech.lo ctype-euc_kr.lo ctype-gb2312.lo ctype-gbk.lo 
ctype-latin1_de.lo ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo  dbug.lo 
vio.lo viosocket.lo viossl.lo viosslfactories.lo -lm
using piecewise archive linking...
ar cru .libs/libmysqlclient.a libmysql.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a net.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a password.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a manager.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a get_password.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a errmsg.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_init.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_static.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_malloc.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_realloc.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_create.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_delete.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_tempfile.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_open.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_casecnv.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_read.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_write.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a errors.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_error.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_getwd.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_div.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_pack.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_messnc.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_dirname.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_fn_ext.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_wcomp.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a typelib.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a safemalloc.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_alloc.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_format.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_path.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_unixpath.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_fopen.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_symlink.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_fstream.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_loadpath.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_pthread.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_thr_init.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a thr_mutex.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mulalloc.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a string.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a default.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_compress.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a array.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_once.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a list.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_net.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a charset.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a hash.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_iocache.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_iocache2.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_seek.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_pread.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a mf_cache.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_vsnprintf.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a md5.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_getopt.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_gethostbyname.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a my_lib.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strmov.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strxmov.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strxnmov.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strnmov.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strmake.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strend.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strnlen.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strfill.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a is_prefix.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a int2str.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a str2int.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strinstr.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strcont.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strcend.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a bcmp.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a bchange.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a bmove.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a bmove_upp.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a longlong2str.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strtoull.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a strtoll.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a llstr.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype-big5.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype-czech.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype-euc_kr.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype-gb2312.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype-gbk.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype-latin1_de.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype-sjis.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype-tis620.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a ctype-ujis.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a dbug.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a vio.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a viosocket.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a viossl.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a viosslfactories.o
: .libs/libmysqlclient.a
ar cru .libs/libmysqlclient.a
ar: no archive members specified
usage:  ar -d [-TLv] archive file ...
        ar -m [-TLv] archive file ...
        ar -m [-abiTLv] position archive file ...
        ar -p [-TLv] archive [file ...]
        ar -q [-cTLv] archive file ...
        ar -r [-cuTLv] archive file ...
        ar -r [-abciuTLv] position archive file ...
        ar -t [-TLv] archive [file ...]
        ar -x [-ouTLv] archive [file ...]
make[2]: *** [libmysqlclient.la] Error 1
make[2]: Leaving directory 
`/Volumes/ServerSystem/ports/mysql-4.0.2-alpha/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Volumes/ServerSystem/ports/mysql-4.0.2-alpha'
make: *** [all-recursive-am] Error 2
[root@server]



--------------------------------------
R Blake
blakers <at> mac.com
http://homepage.mac.com/blakers
--------------------------------------

Thread
mysql-4.0.2-alpha BROKEN on OSX 10.1.4 Server; WORKAROUNDS incl.,but need help with FIXesR Blake14 Jul
  • Re: mysql-4.0.2-alpha BROKEN on OSX 10.1.4 Server; WORKAROUNDS incl., but need help with FIXesDan Nelson14 Jul
Re: mysql-4.0.2-alpha BROKEN on OSX 10.1.4 Server; WORKAROUNDSincl., but need help with FIXesR Blake14 Jul
  • Re: mysql-4.0.2-alpha BROKEN on OSX 10.1.4 Server; WORKAROUNDS incl., but need help with FIXesDan Nelson15 Jul
Re: mysql-4.0.2-alpha BROKEN on OSX 10.1.4 Server; WORKAROUNDSincl., but need help with FIXesR Blake15 Jul