Bug #10314 Compilation failure with gcc 4 on Mac OS X 10.4
Submitted: 2 May 2005 12:38 Modified: 5 May 2005 14:29
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1.10a OS:MacOS (Mac OS X 10.4.0)
Assigned to: CPU Architecture:Any

[2 May 2005 12:38] Lenz Grimmer
Description:
I received this report via my contact from Apple:

if gcc -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 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 mysqld.o -MD -MP -MF ".deps/mysqld.Tpo" -c -o mysqld.o mysqld.cc; \
then mv -f ".deps/mysqld.Tpo" ".deps/mysqld.Po"; else rm -f ".deps/mysqld.Tpo"; exit 1; fi
opt_range.h: In member function `bool SQL_SELECT::check_quick(THD*, bool, ha_rows)':
opt_range.h:146: warning: passing negative value '-0x00000000000000001' for converting 1 of
'Bitmap<64u>::Bitmap(uint)'
mysqld.cc: In function `int bootstrap(FILE*)':
mysqld.cc: 3305: warning: converting of negative value
'-0x00000000000000001' to 'ulong'
mysqld.cc: In function `void* handle_connections_sockets(void*)':
mysqld.cc: 3544: error: invalid conversion from 'size_socket*' to
'socklen_t*'
mysqld.cc:3544: error:   initializing argument 3 of 'int accept(int, sockaddr*, socklen_t*)'
mysqld.cc:3617: error: invalid conversion from 'size_socket*' to 'socklen_t*'
mysqld.cc:3617: error:   initializing argument 3 of 'int getsockname(int, sockaddr*,
socklen_t*)'
sql_list.h: At global scope:
sql_list.h:401: warning: inline function `base_ilist::~base_ilist()' used but never defined
make[5]: *** [mysqld.o] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [build] Error 2

How to repeat:
Compile MySQL 4.1.10a using gcc 4 on Mac OS X 10.4.0 "Tiger" using the following build options:

CFLAGS="-O3 -fno-omit-frame-pointer $$RC_CFLAGS" \
CXX=gcc \
CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -
fno-exceptions -fno-rtti $$RC_CFLAGS" \
LDFLAGS="$$RC_CFLAGS" \
./configure --infodir=/usr/share/info \
--with-extra-charsets=complex \
--with-low-memory \
--enable-thread-safe-client \
--enable-local-infile \
--mandir=/usr/share/man \
--localstatedir=/var/mysql  \
--sysconfdir=/etc \
--with-mysqld-user=mysql \
--without-bench \
--without-debug \
--disable-shared \
--with-unix-socket-path=/var/mysql/mysql.sock \

Suggested fix:
Investigate why "configure" fails to properly set SOCKET_SIZE_TYPE - this is most likely the cause of this error.
[5 May 2005 14:29] Jim Winstead
Reported as fixed by the original reporter.