Subject: Re: Errors While Building MySQL4-Server
To: J. Alexander Jacocks <jjacocks@mac.com>
From: Pierre Bourgin <pierre.bourgin@pcotech.fr>
List: tech-pkg
Date: 04/06/2004 06:11:57
Hello,

It had the same kind of problem while building MySQL-server 3.23.58 
under Solaris 8 / gcc-3.3.2 ...

Since I did not had time to find what was really happening, I made this 
horrible hack to achieve build. Since it, MySQL is running fine for me.

% gdiff -bu work/mysql-3.23.58/sql/mysqld.cc.orig \
             work/mysql-3.23.58/sql/mysqld.cc
--- work/mysql-3.23.58/sql/mysqld.cc.orig  2003-09-11 13:49:19.000000000 
+++ work/mysql-3.23.58/sql/mysqld.cc    2004-02-09 19:56:38.460030000
@@ -93,9 +93,9 @@
     int deny_severity = LOG_WARNING;

     #ifdef __STDC__
-#define my_fromhost(A)    fromhost(A)
-#define my_hosts_access(A) hosts_access(A)
-#define my_eval_client(A)  eval_client(A)
+#define my_fromhost(A)    fromhost()
+#define my_hosts_access(A) hosts_access()
+#define my_eval_client(A)  eval_client()
  #else
  #define my_fromhost(A)    fromhost()
  #define my_hosts_access(A) hosts_access()


Hope this help you,

Regards,

Pierre Bourgin

J. Alexander Jacocks a écrit:
> I have run into more trouble while building packages using pkgsrc  
> (current) on Solaris 8 (sparc64).  MySQL4-server builds fine, until it  
> seems to have trouble including tcpd.h (TCP wrappers).  Here are the  
> errors:
> 
> g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/local/pkg\""  
> -DDATADIR="\"/local/pkg/mysql\""  
> -DSHAREDIR="\"/local/pkg/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I..  
> -I../innobase/include -I./../include -I./../regex -I. -I../include -I.  
> -I/usr/local/include  -Dunix -I/local/pkg/include  -O3 -DDBUG_OFF -O  
> -DHAVE_CURSES_H -I/local/pkg/include -DHAVE_CURSES_H   
> -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_RWLOCK_T -c -o  
> mysqld.o `test -f 'mysqld.cc' || echo './'`mysqld.cc
> /local/pkg/pkgsrc/databases/mysql4-server/work/.buildlink/include/ 
> tcpd.h: In
>    function `void* handle_connections_sockets(void*)':
> /local/pkg/pkgsrc/databases/mysql4-server/work/.buildlink/include/ 
> tcpd.h:210: error: too
>    many arguments to function `void sock_host()'
> mysqld.cc:2973: error: at this point in file
> /local/pkg/pkgsrc/databases/mysql4-server/work/.buildlink/include/ 
> tcpd.h:140: error: too
>    many arguments to function `int hosts_access()'
> mysqld.cc:2974: error: at this point in file
> /local/pkg/pkgsrc/databases/mysql4-server/work/.buildlink/include/ 
> tcpd.h:203: error: too
>    many arguments to function `char* eval_client()'
> mysqld.cc:2982: error: at this point in file
> gmake[4]: *** [mysqld.o] Error 1
> 
> I'm building using the following tools:
> 
> ajacocks@olympus[~]$ pkg_info | grep gmake
> gmake-3.80nb3       GNU version of 'make' utility
> ajacocks@olympus[~]$ pkg_info | grep gcc
> gcc3-c-3.3.3        GNU Compiler Collection, v3 - C compiler
> gcc3-c++-3.3.3      GNU Compiler Collection, v3 - C++ compiler
> gcc3-f77-3.3.3      GNU Compiler Collection, v3 - F77 compiler
> 
> Thanks for any help!
> 
>