NetBSD Problem Report #32069

From carl@rollcage2.bl.echidna.id.au  Mon Nov 14 07:20:46 2005
Return-Path: <carl@rollcage2.bl.echidna.id.au>
Received: from rollcage2.bl.echidna.id.au (rollcage.bl.echidna.id.au [203.6.241.134])
	by narn.netbsd.org (Postfix) with ESMTP id 5FEE063B8CA
	for <gnats-bugs@gnats.netbsd.org>; Mon, 14 Nov 2005 07:20:45 +0000 (UTC)
Message-Id: <200511140720.jAE7KbSj006015@rollcage2.bl.echidna.id.au>
Date: Mon, 14 Nov 2005 18:20:37 +1100 (EST)
From: Carl Brewer <carl@rollcage2.bl.echidna.id.au>
Reply-To: carl@rollcage2.bl.echidna.id.au
To: gnats-bugs@netbsd.org
Subject: errors compiling openldap
X-Send-Pr-Version: 3.95

>Number:         32069
>Category:       pkg
>Synopsis:       errors compiling openldap
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jlam
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 14 07:21:01 +0000 2005
>Closed-Date:    Wed Dec 21 03:59:32 +0000 2005
>Last-Modified:  Wed Dec 21 03:59:32 +0000 2005
>Originator:     Carl Brewer
>Release:        NetBSD 1.6.2
>Organization:

>Environment:


System: NetBSD rollcage2.bl.echidna.id.au 1.6.2 NetBSD 1.6.2 (rollcage) #1: Fri Apr 23 00:50:50 EST 2004 carl@rollcage2.bl.echidna.id.au:/usr/src/sys/arch/i386/compile/rollcage i386
Architecture: i386
Machine: i386
>Description:
	building opendlap from current CVS :

  Entering subdirectory libldap_r
rm -f version.c
../../build/mkversion -v "2.3.11" libldap_r.la > version.c
/bin/sh ../..//libtool  --mode=compile  cc -O2 -I/usr/pkg/include/db4 -I/usr/include -I/usr/pkg/include  -D_REENTRANT -I../../include -I../../include  -DLDAP_R_COMPILE -I./../libldap -I/usr/pkg/include/db4 -I/usr/include -I/usr/pkg/include  -DLDAP_LIBRARY -c threads.c
mkdir .libs
 cc -O2 -I/usr/pkgsrc/databases/openldap/work/.buildlink/include/db4 -I/usr/pkgsrc/databases/openldap/work/.buildlink/include -D_REENTRANT -I../../include -DLDAP_R_COMPILE -I./../libldap -DLDAP_LIBRARY -c threads.c  -fPIC -DPIC -o .libs/threads.o
In file included from ../../include/ldap_int_thread.h:102,
                 from ../../include/ldap_pvt_thread.h:21,
                 from threads.c:25:
/usr/pkgsrc/databases/openldap/work/.buildlink/include/pth.h:94: #error "FD_SETSIZE is larger than what GNU Pth can handle."
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/databases/openldap/work/openldap-2.3.11/libraries/libldap_r
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/databases/openldap/work/openldap-2.3.11/libraries
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/databases/openldap/work/openldap-2.3.11
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/databases/openldap
===>
===> There was an error during the ``build'' phase.
===> Please investigate the following for more information:
===>      * log of the build
===>      * /usr/pkgsrc/databases/openldap/work/.work.log
===>
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/databases/openldap

>How-To-Repeat:
	download current CVS of pkgsrc, make clean; cd database/openldap, make
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->jlam
Responsible-Changed-By: rillig@netbsd.org
Responsible-Changed-When: Sat, 19 Nov 2005 14:07:54 +0000
Responsible-Changed-Why:

Over to maintainer.

Johnny, can you please investigate why openldap needs FD_SETSIZE set to
4096? For one, it is defined by POSIX and should not really be changed
by an application (see include/ac/fdset.h). I don't know openldap good
enough to decide on this.


From: Roland Illig <rillig@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/32069
Date: Wed, 23 Nov 2005 07:12:34 +0100

 This is a multi-part message in MIME format.
 --------------010603020308010605060506
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit

 This patch fixes the problem, but I don't know about the side effects 
 that it may have.

 Roland

 --------------010603020308010605060506
 Content-Type: text/plain;
  name="patch-ao"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-ao"

 $NetBSD$

 The GNU pthreads library cannot handle FD_SIZE > 1024, but openldap
 overrides that constant. I don't know even why any application should be
 allowed to override FD_SETSIZE.

 --- include/ac/fdset.h.orig	Wed Nov 23 07:07:40 2005
 +++ include/ac/fdset.h	Wed Nov 23 07:07:29 2005
 @@ -23,7 +23,7 @@
  #define _AC_FDSET_H

  #if !defined( OPENLDAP_FD_SETSIZE ) && !defined( FD_SETSIZE )
 -#  define OPENLDAP_FD_SETSIZE 4096
 +#  define OPENLDAP_FD_SETSIZE 1024
  #endif

  #ifdef OPENLDAP_FD_SETSIZE

 --------------010603020308010605060506--

From: joerg@britannica.bec.de
To: gnats-bugs@netbsd.org
Cc: jlam@netbsd.org
Subject: Re: pkg/32069
Date: Wed, 23 Nov 2005 10:37:46 +0100

 On Wed, Nov 23, 2005 at 06:13:02AM +0000, Roland Illig wrote:
 >  
 >  This patch fixes the problem, but I don't know about the side effects 
 >  that it may have.

 It hacks around the problem. Please do not commit this until all the
 consequences are understood.

 >  --------------010603020308010605060506
 >  Content-Type: text/plain;
 >   name="patch-ao"
 >  Content-Transfer-Encoding: 7bit
 >  Content-Disposition: inline;
 >   filename="patch-ao"
 >  
 >  $NetBSD$
 >  
 >  The GNU pthreads library cannot handle FD_SIZE > 1024, but openldap
 >  overrides that constant. I don't know even why any application should be
 >  allowed to override FD_SETSIZE.

 Because it wants to support more than the default descriptors when using
 select. That's a documented procedure and ignoring the O(n^2) nature of
 select, it is valid programming. Actually, the incorrectness is most
 likely in pth.

 Joerg

From: Roland Illig <rillig@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: Joerg Sonnenberger <joerg@britannica.bec.de>
Subject: Re: pkg/32069
Date: Wed, 23 Nov 2005 19:15:40 +0100

 joerg@britannica.bec.de wrote:
 > The following reply was made to PR pkg/32069; it has been noted by GNATS.
 > 
 > From: joerg@britannica.bec.de
 > To: gnats-bugs@netbsd.org
 > Cc: jlam@netbsd.org
 > Subject: Re: pkg/32069
 > Date: Wed, 23 Nov 2005 10:37:46 +0100
 > 
 >  On Wed, Nov 23, 2005 at 06:13:02AM +0000, Roland Illig wrote:
 >  >  
 >  >  This patch fixes the problem, but I don't know about the side effects 
 >  >  that it may have.
 >  
 >  It hacks around the problem. Please do not commit this until all the
 >  consequences are understood.

 Sorry for the wrong wording. :)

 Roland

From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/32069 CVS commit: pkgsrc/databases/openldap
Date: Wed, 21 Dec 2005 03:54:23 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jlam
 Date:		Wed Dec 21 03:54:23 UTC 2005

 Modified Files:
 	pkgsrc/databases/openldap: Makefile

 Log Message:
 Fix PR pkg/32069 by limiting the FD_SETSIZE used by OpenLDAP to the
 maximum value supported by GNU Pth when building against GNU Pth.


 To generate a diff of this commit:
 cvs rdiff -r1.105 -r1.106 pkgsrc/databases/openldap/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: jlam@netbsd.org
State-Changed-When: Wed, 21 Dec 2005 03:59:32 +0000
State-Changed-Why:
The OpenLDAP build now limits FD_SETSIZE to the maximum allowed by GNU Pth
if we build against GNU Pth.  Thanks for the PR!


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