List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 29 2000 11:23pm
Subject:Re: MySQL compile fails on Solaris
View as plain text  
At 1:16 AM +0200 2000-01-30, Michael Widenius wrote:
>  >>>>> "marek" == marek  <marek@stripped> writes:
>
>marek> Hi!
>marek> I have written about this several times , still seems no progress..
>
>marek> Description:
>marek>   Well, the problem itself is simple and solution is also simple:
>marek>    problem)  call gethostname is deprecated under solaris, it still
>marek>              exists in manpages but is no longer included in libraries.
>marek> How-To-Repeat:
>marek>	compile any vanilla mysql from source under solaris.
>marek> Fix:
>marek>  solution) patch the MYSQL_DIR/sql/mysqld.cc file with following lines
>
>marek>         #ifdef __sun__
>marek>         #include <sys/systeminfo.h>
>marek>         #define gethostname(x,y) sysinfo(SI_HOSTNAME,x,y)
>marek>         #endif
>
>marek>           And it will start working again as it is supposed.
>
>Just one question:
>
>I couldn't find anything in my Solaris 2.7 manual about gethostname()
>being deprecated.


I can't either.  Besides, it would be really bizarre to prefer a non-standard
call like sysinfo() to a standard one like gethostname().  That would require
patching not only mysqld.cc, but *any* program that uses gethostname(), which
would be an insane incompatibility for Sun to introduce.

I'm also curious about it not being in the Solaris libraries.  This is what
I get on my Solaris 2.7 system:

% cd /usr/lib
% ar t libc.a | grep gethostname
gethostname.o


>
>Anyway, the current MySQL 3.22.30 compiled cleanly on our Solaris
>2.5.1, 2.6 and 2.7 machines.
>
>configure should define the -DSOLARIS flag in configure which should
>have fixed this problem.  Can you check why the following configure
>test didn't work on your machine:
>
>   *solaris2.5.1*)
>     echo "Enabling getpass() workaround for Solaris 2.5.1"
>     CFLAGS="$CFLAGS -DHAVE_BROKEN_GETPASS -DSOLARIS -DHAVE_RWLOCK_T";
>     CXXFLAGS="$CXXFLAGS -DHAVE_RWLOCK_T"
>
>Regards,
>Monty


-- 
Paul DuBois, paul@stripped
Thread
MySQL compile fails on Solarismarek28 Jan
  • MySQL compile fails on SolarisMichael Widenius30 Jan
    • Re: MySQL compile fails on SolarisPaul DuBois30 Jan
Re: MySQL compile fails on SolarisChristopher R. Jones30 Jan
  • Other MySQL Problems Compiling on SolarisJim Boelter30 Jan
    • Re: Other MySQL Problems Compiling on Solarissinisa31 Jan
    • Re: Other MySQL Problems Compiling on Solarissasha31 Jan
    • Re: Other MySQL Problems Compiling on SolarisJim Boelter1 Feb