Bug #13136 NdbTCP.cpp compile failure on OS X 10.2
Submitted: 13 Sep 2005 11:22 Modified: 15 Sep 2005 18:45
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.13-pre OS:MacOS (Mac OS X 10.2.8)
Assigned to: Stewart Smith CPU Architecture:Any

[13 Sep 2005 11:22] Lenz Grimmer
Description:
NDB fails to compile on Mac OS X 10.2.8 with the following error:

Making all in portlib
if /bin/sh ../../../../libtool --preserve-dup-deps --mode=compile ccache gcc -DHAVE_CONFIG_H -DNDEBUG   -I. -I. -I../../../..  -I. -I../../../../include -I../../../../ndb/include -I../../../../ndb/include/util -I../../../../ndb/include/portlib -I../../../../ndb/include/logger    -O3 -DDBUG_OFF -fno-common   -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH   -MT NdbTCP.lo -MD -MP -MF ".deps/NdbTCP.Tpo" -c -o NdbTCP.lo NdbTCP.cpp; \
then mv -f ".deps/NdbTCP.Tpo" ".deps/NdbTCP.Plo"; else rm -f ".deps/NdbTCP.Tpo"; exit 1; fi
 ccache gcc -DHAVE_CONFIG_H -DNDEBUG -I. -I. -I../../../.. -I. -I../../../../include -I../../../../ndb/include -I../../../../ndb/include/util -I../../../../ndb/include/portlib -I../../../../ndb/include/logger -O3 -DDBUG_OFF -fno-common -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH -MT NdbTCP.lo -MD -MP -MF .deps/NdbTCP.Tpo -c NdbTCP.cpp -o NdbTCP.o
NdbTCP.cpp: In function `int Ndb_check_socket_hup(int)':
NdbTCP.cpp:89: error: elements of array `pollfd pfd[1]' have incomplete type
NdbTCP.cpp:89: error: storage size of `pfd' isn't known
NdbTCP.cpp:93: error: `POLLHUP' undeclared (first use this function)
NdbTCP.cpp:93: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
NdbTCP.cpp:93: error: `POLLIN' undeclared (first use this function)
NdbTCP.cpp:93: error: `POLLOUT' undeclared (first use this function)
NdbTCP.cpp:93: error: `POLLNVAL' undeclared (first use this function)
NdbTCP.cpp:95: error: `poll' undeclared (first use this function)
NdbTCP.cpp:96: error: `POLLERR' undeclared (first use this function)
make[5]: *** [NdbTCP.lo] Error 1

How to repeat:
Compile the current 5.0 source tree with the following options:

CC="gcc" CXX="gcc" CFLAGS="-fno-common" CXXFLAGS="-fno-common"  ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex--enable-thread-safe-client --enable-local-infile  --disable-shared --with-big-tables --with-readline --with-archive-storage-engine --with-blackhole-storage-engine --with-ndbcluster --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-innodb
[14 Sep 2005 14:21] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/29845
[14 Sep 2005 14:33] Stewart Smith
pushed to 5.0.13

I don't think there are any other (remotely modern) systems that would be affected by this. If there are systems without poll(2) (that aren't win32), this would fix the build there too.
[15 Sep 2005 18:45] Paul DuBois
No changelog entry needed.