>>>>> "Ernie" == Ernie Oporto <eoporto@stripped> writes:
Ernie> Any idea what would cause the following when building 3.22.26a on a Solaris
Ernie> 2.5.1 building with gcc-2.95.1 and the latest binutils (2.7.2, I think). I
Ernie> was able to build 3.22.25 with gcc-2.7 and was hoping to get a new and
Ernie> better set of compilers in place to make the newer mysql.
Ernie> c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local\"
Ernie> " -DDATADIR="\"/usr/local/var\"" -DSHAREDIR="\"/usr/local
Ernie> /share/mysql\"" -DHAVE_CONFIG_H -I./../include
Ernie> -I./../regex -I. -I../include -I.. -I. -O
Ernie> -fno-implicit-templates -DDBUG_OFF -c mysqld.cc
Ernie> mysqld.cc: In function `int main(int, char **)':
Ernie> mysqld.cc:1034: implicit declaration of function `int gethostname(...)'
Ernie> make[3]: *** [mysqld.o] Error 1
Ernie> make[3]: Leaving directory `/nb/local/src/mysql-3.22.26a/sql'
Ernie> make[2]: *** [all-recursive] Error 1
Ernie> make[2]: Leaving directory `/nb/local/src/mysql-3.22.26a/sql'
Ernie> make[1]: *** [all-recursive] Error 1
Ernie> make[1]: Leaving directory `/nb/local/src/mysql-3.22.26a'
Ernie> make: *** [all-recursive-am] Error 2
Ernie> http://www.shokk.com
Ernie> ICQ-17933910 Ernie "Shokk" Oporto
Fix:
Add the -DSOLARIS option to the above compile line or configure with:
CXXFLAGS=-DSOLARIS ./configure
The problem is that Solaris 2.5.1 doesn't declare gethostname() in any
include files. (This is a bug in Solaris 2.5.1)
Regards,
Monty