Subject: pkg/30396: sysutils/fam build failure on MacOS X 10.2.8
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <jdbaker@mylinuxisp.com>
List: pkgsrc-bugs
Date: 06/02/2005 01:38:00
>Number: 30396
>Category: pkg
>Synopsis: sysutils/fam build failure on MacOS X 10.2.8
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 02 01:38:00 +0000 2005
>Originator: John D. Baker
>Release: Mac OS X 10.2.8
>Organization:
>Environment:
Darwin pm8500.technoskunk.fur 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC Power Macintosh powerpc
>Description:
Building sysutils/fam fails on MacOX X 10.2.8 as follows:
First:
[...]
source='Listener.c++' object='Listener.o' libtool=no \
depfile='.deps/Listener.Po' tmpdepfile='.deps/Listener.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DFAM_CONF=\"/usr/pkg/etc/fam.conf\" -DNDEBUG -no-cpp-precomp -O2 -c -o Listener.o `test -f 'Listener.c++' || echo './'`Listener.c++
Listener.c++: In static member function `static void
Listener::accept_client(int, void*)':
Listener.c++:159: error: `socklen_t' undeclared (first use this function)
Listener.c++:159: error: (Each undeclared identifier is reported only once for
each function it appears in.)
Listener.c++:159: error: parse error before `=' token
Listener.c++:160: error: `addrlen' undeclared (first use this function)
Listener.c++: In static member function `static void
Listener::accept_localclient(int, void*)':
Listener.c++:294: error: `socklen_t' undeclared (first use this function)
Listener.c++:294: error: parse error before `=' token
Listener.c++:295: error: `sunlen' undeclared (first use this function)
Listener.c++: In static member function `static void
Listener::accept_ugly_hack(int, void*)':
Listener.c++:426: error: parse error before `=' token
gnumake[2]: *** [Listener.o] Error 1
gnumake[1]: *** [all-recursive] Error 1
gnumake: *** [all] Error 2
*** Error code 2
Stop.
bmake: stopped in /usr/pkgsrc/sysutils/fam
[...]
Second:
[...]
source='RPC_TCP_Connector.c++' object='RPC_TCP_Connector.o' libtool=no \
depfile='.deps/RPC_TCP_Connector.Po' tmpdepfile='.deps/RPC_TCP_Connector.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DFAM_CONF=\"/usr/pkg/etc/fam.conf\" -DNDEBUG -no-cpp-precomp -O2 -c -o RPC_TCP_Connector.o `test -f 'RPC_TCP_Connector.c++' || echo './'`RPC_TCP_Connector.c++
RPC_TCP_Connector.c++: In static member function `static void
RPC_TCP_Connector::write_handler(int, void*)':
RPC_TCP_Connector.c++:164: error: too many arguments to function
RPC_TCP_Connector.c++:167: error: too many arguments to function
gnumake[2]: *** [RPC_TCP_Connector.o] Error 1
gnumake[1]: *** [all-recursive] Error 1
gnumake: *** [all] Error 2
*** Error code 2
Stop.
bmake: stopped in /usr/pkgsrc/sysutils/fam
[...]
>How-To-Repeat:
Assuming pkgsrc bootstrapped on MacOS X 10.2.8 and prior dependencies
built:
cd .../pkgsrc/sysutils/fam
bmake
>Fix:
The first failure has a simple workaround. MacOS X 10.2.8 does not
define "socklen_t" unless the macro _BSD_SOCKLEN_T_ is defined as the
appropriate scalar type. This is usually 'int'. So a workaround is:
cd .../pkgsrc/sysutils/fam
bmake configure
Modify work/fam-2.7.0/config.h as follows:
--- work/fam-2.7.0/config.h.orig Wed Jun 1 18:22:29 2005
+++ work/fam-2.7.0/config.h Wed Jun 1 18:23:51 2005
@@ -60,7 +60,8 @@
/* #undef HAVE_UNSETENV */
/* Define to 1 if the system has the type `socklen_t'. */
-/* #undef HAVE_SOCKLEN_T */
+#define _BSD_SOCKLEN_T_ int
+#define HAVE_SOCKLEN_T 1
/* Define to 1 if stdbool.h conforms to C99. */
/* #undef HAVE_STDBOOL_H */
It is not clear at this time what the solution to the second failure
might be.