From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <98037883920622.tru64-unix-managers.marc@archive.invalid> From: "MacDonell, Dennis" Date: Wed, 24 Jan 2001 23:26:05 +0000 To: tru64-unix-managers Subject: Summary: mysql gurus - compile error: mini_client.cc:583: assignm ent X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=98037883920622 Hi, I got a couple of messages, one suggesting that I use only DEC compilers, the other suggesting I get the latest mysql because of a vulnerability with mysql-3.23.28-gamma. I took the second option and down loaded mysql-3.23.32, but still used gcc for all the compiles of apache/mysql/php which all worked fine. mysql is the only one that had to be fiddled with after the configure to (a) change a compile option in sql/Makefile to remove optimisation, (b) remove the _NO_PROTO define from somewhere else, and (c) the following. To clear my problem, which doesn't seem to have been documented anywhere, I removed the define for HAVE_GETHOSTBYNAME_R and for HAVE_GETHOSTBYADDR_R from config.h in the top level directory of mysql. From the man on gethostbyname it would appear that gethostbyname_r and gethostbyaddr_r are obsolete functions and are only included as part of Tru5.0A for compatibility reasons. Dennis Here is the original question for completeness: Hi, I've noticed a few mysql/php/apache messages on this list, and I think its the best place for these messages. Anyway, I have a DS20E/Tru5.0A with gcc-2.95.2, and a few of the other gnu bits (bison, flex, make, automake, autoconf). I've grabbed the following apache_1.3.14 mysql_3.23.28-gamma php-4.0.3pl1 For mysql I'm using CC=cc CFLAGS=-O CXX=gcc CXXFLAGS=-O3 ./configure --prefix= An abstract of the errant compile - gcc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I./../include -I./../regex -I. -I../include -I.. -I. -O0 -DDBUG_OFF -O3 -fno-implicit-templates -c mini_client.cc In file included from ../include/global.h:176, from mini_client.cc:30: /usr/include/alloca.h:68: warning: declaration of `void * alloca(int)' /usr/include/alloca.h:68: warning: conflicts with built-in declaration `void * alloca(long unsigned int)' mini_client.cc: In function `struct MYSQL * mc_mysql_connect(MYSQL *, const char *, const char *, const char *, const char *, unsigned int, const char *, unsigned int)': mini_client.cc:583: assignment to `hostent *' from `int' lacks a cast make[3]: *** [mini_client.o] Error 1 make[3]: Leaving directory `/jabba1/system/builds/mysql-3.23.28-gamma.OSF1/sql' >From what I can gather the program is calling either gethostbyname(Compaq) or my_gethostbyname (mysql) and something has gone awry with a variable/argument that has been declared as hostent somewhere and int somewhere else. Looking at line 583 in mini_client.cc, it would appear that the compile can be driven down different tracks. The track it has gone down appears to have the following set have_gethostbyname_r, reentrant and thread to get where it did. This assumes that the line numbers match the code in the file. Any ideas as to what to do. Dennis ###################################### Dennis Macdonell Systems Administrator AUSLIG mail: PO Box 2, Belconnen, ACT 2617 email: mcdonell@auslig.gov.au ph: 61 2 6201 4326 fax: 61 2 6201 4377 ######################################