Bug #12548 mysqld.cc:3193: error: invalid conversion from 'size_socket*' to 'socklen_t*'
Submitted: 12 Aug 2005 11:02 Modified: 18 Aug 2005 23:36
Reporter: Eric Wittle Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.0.25 OS:MacOS (OS X 10.4.2)
Assigned to: Jim Winstead CPU Architecture:Any

[12 Aug 2005 11:02] Eric Wittle
Description:
Compile error above is hopefully sufficiently descriptive. See steps to repeat below.

How to repeat:
I was trying to build from source since there isn't a pre-built binary for 10.4. I took the following steps:

1) Downloaded source, unzipped and untarred it:

2) Ran this configure script:

./configure --prefix=/usr/local/mysql 
--with-unix-socket-path=/usr/local/mysql/run/mysql_socket 
--with-mysqld-user=mysql --with-comment --with-debug

3) Ran make

Make ended with:

make[4]: *** [mysqld.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

The only errors/warnings that hadn't scrolled off of the terminal history were:

mysqld.cc: In function `int bootstrap(FILE*)':
mysqld.cc:2964: warning: converting of negative value '-0x00000000000000001' to 'ulong'
mysqld.cc: In function `void* handle_connections_sockets(void*)':
mysqld.cc:3193: error: invalid conversion from 'size_socket*' to 'socklen_t*'
mysqld.cc:3193: error:   initializing argument 3 of 'int accept(int, sockaddr*, socklen_t*)'
mysqld.cc:3266: error: invalid conversion from 'size_socket*' to 'socklen_t*'
mysqld.cc:3266: error:   initializing argument 3 of 'int getsockname(int, sockaddr*, socklen_t*)'
sql_list.h: At global scope:
sql_list.h:425: warning: inline function `base_ilist::~base_ilist()' used but never defined
[12 Aug 2005 17:05] Jorge del Conde
Thanks for your bug report.
[12 Aug 2005 17:08] Jorge del Conde
verified w/gcc 3:

Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
[18 Aug 2005 23:36] Jim Winstead
I was unable to reproduce this on a machine running 10.4.2:

$ /usr/bin/sw_vers 
ProductName:    Mac OS X Server
ProductVersion: 10.4.2
BuildVersion:   8C47

$ gcc -v
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5026.obj~19/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 (Apple Computer, Inc. build 5026)

I was also unable to reproduce on a machine running 10.3.9:

$ /usr/bin/sw_vers 
ProductName:    Mac OS X
ProductVersion: 10.3.9
BuildVersion:   7W98

$ gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1671)

Note that the binaries of 4.0 provided for Mac OS X 10.3 will likely work just fine on 10.4, too.
[22 Jun 2008 17:27] Nico R.
This bug is triggered by ‘-pedantic’ in CFLAGS when compiling with gcc.

I am able to reproduce it with gcc-4.3.1, CFLAGS containing "-pedantic -Wno-long-long" for mysql-5.0.54.
[23 Jun 2008 12:58] Nico R.
Please ignore my last comment, it was wrong.

It seems that this bug is triggered by broken/missing removal of flags from CXXFLAGS in configure.in and config/ac-macros/misc.m4. This is detailed in bug #37582.

Please verify this and close this bug as a duplicate of bug #37582 if appropriate. Thanks.