NetBSD Problem Report #30396

From www@netbsd.org  Thu Jun  2 01:37:20 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id E86A663B104; Thu,  2 Jun 2005 01:37:20 +0000 (UTC)
Message-Id: <20050602013720.E86A663B104@narn.netbsd.org>
Date: Thu,  2 Jun 2005 01:37:20 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@netbsd.org
Subject: sysutils/fam build failure on MacOS X 10.2.8
X-Send-Pr-Version: www-1.0

>Number:         30396
>Category:       pkg
>Synopsis:       sysutils/fam build failure on MacOS X 10.2.8
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    schmonz
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 02 01:38:00 +0000 2005
>Closed-Date:    Thu Nov 04 05:17:00 +0000 2010
>Last-Modified:  Thu Nov 04 05:17:00 +0000 2010
>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.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->darwin-pkg-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Thu, 02 Jun 2005 08:49:42 +0000
Responsible-Changed-Why:
Darwin pkgsrc problem.


From: Yuji Yamano <yyamano@kt.rim.or.jp>
To: gnats-bugs@NetBSD.org, jdbaker@mylinuxisp.com
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org,
	pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/30396: sysutils/fam build failure on MacOS X 10.2.8
Date: Fri, 03 Jun 2005 23:04:19 +0900 (JST)

 Hi John!

 On Thu,  2 Jun 2005 01:38:00 +0000 (UTC), jdbaker@mylinuxisp.com wrote:

 > 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:

 Could you try the following patch? I don't have Mac OS X 10.2.8.

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/sysutils/fam/Makefile,v
 retrieving revision 1.25
 diff -u -r1.25 Makefile
 --- Makefile	22 May 2005 20:08:32 -0000	1.25
 +++ Makefile	3 Jun 2005 14:01:04 -0000
 @@ -57,6 +57,10 @@
  .endif

  CPPFLAGS.Darwin+=	-DNDEBUG
 +.if ${OPSYS} == "Darwin" && (OS_VERSION:M[0-6]\.*)
 +CPPFLAGS+=      -D_BSD_SOCKLEN_T_="unsigned int"
 +.endif
 +
  LDFLAGS.SunOS+=		-lsocket -lnsl

  .if ${OPSYS} == "SunOS"

 -- 
 Yuji Yamano

Responsible-Changed-From-To: darwin-pkg-people->schmonz
Responsible-Changed-By: schmonz@netbsd.org
Responsible-Changed-When: Wed, 30 May 2007 09:57:05 +0000
Responsible-Changed-Why:
I'll handle this one.


State-Changed-From-To: open->feedback
State-Changed-By: schmonz@netbsd.org
State-Changed-When: Wed, 30 May 2007 09:57:05 +0000
State-Changed-Why:
Awaiting feedback.


From: Amitai Schlair <schmonz@mkgsrc.org>
To: "John D.Baker" <jdbaker@mylinuxisp.com>, gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/30396
Date: Wed, 30 May 2007 05:56:40 -0400

 fam builds for me on 10.4.9 (Intel). Is this still an issue?

From: John D.Baker <jdbaker@mylinuxisp.com>
To: gnats-bugs@netbsd.org
Cc: John D.Baker <jdbaker@mylinuxisp.com>, schmonz@mkgsrc.org
Subject: Re: pkg/30396
Date: Tue, 12 Jun 2007 18:04:47 -0500

 As of pkgsrc-current, the problems described in this PR still exist.
 The workaround for the first problem is slightly different, however.
 One should now modify "work/fam-2.7.0/config.h.in" after patching and
 before configuring to make 'socklen_t' usable.

 --
 John D. Baker                            NetBSD     Darwin/MacOS X
 http://mylinuxisp(dot)com/(tilde)jdbaker/     OpenBSD            FreeBSD
 BSD.  It just sits there and _works_.
 GPG fingerprint = D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

State-Changed-From-To: feedback->open
State-Changed-By: rillig@netbsd.org
State-Changed-When: Tue, 01 Jan 2008 22:05:51 +0000
State-Changed-Why:
Feedback provided.


State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 04 Nov 2010 05:17:00 +0000
State-Changed-Why:
macos 10.2 is no longer supported


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.