Bug #10675 MySQL fails to build with --openssl on Mac OS X 10.4
Submitted: 16 May 2005 18:40 Modified: 10 Jun 2005 19:54
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.1.12 OS:MacOS (Mac OS X 10.4)
Assigned to: Sergey Vojtovich CPU Architecture:Any

[16 May 2005 18:40] [ name withheld ]
Description:
An attempt to build MySQL 4.1.12 with --openssl fails on Mac OS X 10.4 due to missing definition of crypt:

...
if g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr\"" -DDATADIR="\"/var/mysql\"" -DSHAREDIR="\"/usr/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I../include -I../regex -I.     -O3 -DDBUG_OFF -O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -arch i386 -arch ppc -pipe   -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -MT item_strfunc.o -MD -MP -MF ".deps/item_strfunc.Tpo" -c -o item_strfunc.o item_strfunc.cc; \
then mv -f ".deps/item_strfunc.Tpo" ".deps/item_strfunc.Po"; else rm -f ".deps/item_strfunc.Tpo"; exit 1; fi
In file included from mysql_priv.h:17,
                 from item_strfunc.cc:27:
../include/my_global.h:1157:1: warning: "floatstore" redefined
../include/my_global.h:986:1: warning: this is the location of the previous definition
item_strfunc.cc: In member function `virtual String* 
   Item_func_encrypt::val_str(String*)':
item_strfunc.cc:1460: error: `crypt' undeclared (first use this function)
item_strfunc.cc:1460: error: (Each undeclared identifier is reported only once 
   for each function it appears in.)

Excerpts from the configure script output:

checking crypt.h usability... no
checking crypt.h presence... no
checking for crypt.h... no
checking for crypt in -lcrypt... no
checking for crypt... yes

Note that crypt is defined in /usr/include/unistd.h:

checking for unistd.h... yes

This does not appear to be specific to version 4.1.12; it was seen with earlier 4.1.x versions. Also note similar problem http://bugs.mysql.com/bug.php?id=295

How to repeat:
Include "--openssl" among configure options; try to build MySQL 4.1.12 on Mac OS X 10.4.
[2 Jun 2005 0:08] Matthew Lord
I verified the problem on our xserve box:
Darwin xserve.lenoxway.net 8.1.0 Darwin Kernel Version 8.1.0: Tue May 10 18:16:08 PDT 2005; root:xnu-792.1.5.obj~4/RELEASE_PPC Power Macintosh powerpc

It's a problem with all of our major versions, 4.0, 4.1 and 5.0.
[10 Jun 2005 7:47] Sergey Vojtovich
Fixed in 4.0.25, 4.1.13, 5.0.8.
ChangeSet 1.2116
[10 Jun 2005 19:54] Paul DuBois
Noted in 4.0.25, 4.1.13, 5.0.8 changelogs.