Issue 2763 - BIND 9 compile issue
Summary: BIND 9 compile issue
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-10 00:37 UTC by jtownsend@opendarwin.org
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jtownsend@opendarwin.org 2003-10-10 00:37:25 UTC
Full_Name: Jason Townsend
Version: OpenLDAP 2.2 (HEAD)
OS: Mac OS X 10.3
URL: http://homepage.mac.com/townsend/openldap-patches/libraries-libldap.patch
Submission from: (NULL) (17.221.43.149)


There are some small changes necessary to compile with BIND 9, which is now the
default on Mac OS X 10.3 (Panther). I have made a patch of the changes which
allow things to compile on Mac OS X. This probably needs some modification to be
workable across the various platforms OpenLDAP supports.

The patch is available here:

http://homepage.mac.com/townsend/openldap-patches/libraries-libldap.patch

Comment 1 Howard Chu 2003-10-10 00:57:09 UTC
> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> jtownsend@apple.com

> Full_Name: Jason Townsend
> Version: OpenLDAP 2.2 (HEAD)
> OS: Mac OS X 10.3
> URL:
> http://homepage.mac.com/townsend/openldap-patches/libraries-li
> bldap.patch
> Submission from: (NULL) (17.221.43.149)
>
>
> There are some small changes necessary to compile with BIND
> 9, which is now the
> default on Mac OS X 10.3 (Panther). I have made a patch of
> the changes which
> allow things to compile on Mac OS X. This probably needs some
> modification to be
> workable across the various platforms OpenLDAP supports.
>
> The patch is available here:
>
> http://homepage.mac.com/townsend/openldap-patches/libraries-li
bldap.patch

The makefile portion of this patch will not be accepted. Any additional
libraries like libresolv should be added to the LIBS environment variable
before running configure, as documented in the OpenLDAP "INSTALL" document.

The remainder of the patch needs to be #ifdef'd if it is going to break
compatibility with older versions of the resolver library.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

Comment 2 jtownsend@opendarwin.org 2003-10-10 19:48:53 UTC
I will work on making this properly cross platform. It seems it is 
possible to #define BIND_8_COMPAT before including <resolv.h> in order 
to use the old API, perhaps that would be a better approach.

-Jason

On Oct 9, 2003, at 5:57 PM, Howard Chu wrote:
> The makefile portion of this patch will not be accepted. Any additional
> libraries like libresolv should be added to the LIBS environment 
> variable
> before running configure, as documented in the OpenLDAP "INSTALL" 
> document.
>
> The remainder of the patch needs to be #ifdef'd if it is going to break
> compatibility with older versions of the resolver library.

Comment 3 Kurt Zeilenga 2003-10-11 21:13:21 UTC
moved from Incoming to Build
Comment 4 jtownsend@opendarwin.org 2003-10-15 01:10:09 UTC
On Oct 9, 2003, at 5:57 PM, Howard Chu wrote:
> The remainder of the patch needs to be #ifdef'd if it is going to break
> compatibility with older versions of the resolver library.

I have updated the patch file here:

http://homepage.mac.com/townsend/openldap-patches/libraries- 
libldap.patch

It now ifdefs based on _RESOLV_9_H_ to determine whether to use the new  
API or not.

One disadvantage of having to add -lresolv to the LIBS environment  
variable is that it requires that library be linked to by everything  
that is built rather than just libldap. It's certainly easy enough to  
put that into our wrapper Makefile or set it up when running configure.  
This loses a bit of the point of autoconfigure, but I'm not sure how we  
can automatically detect that this library is available or necessary.  
That seems like the better way to go if it is possible.

-Jason

Comment 5 Kurt Zeilenga 2003-10-15 01:45:59 UTC
I did some digging.  The changes you suggest actually are compatible
with BIND8 and BIND9.  The 2.1 code is actually using BIND4 resolver
interfaces (provided in <arpa/nameser_compat.h>).  I not aware of
any current system providing BIND4 resolver interfaces, I've just
updated the code.  If so, the old code is needed by someone it can
be included:
  #if __RES
        BIND8/9 code
  #else
        BIND4
  #endif

Kurt

At 06:08 PM 10/14/2003, jtownsend@apple.com wrote:
>On Oct 9, 2003, at 5:57 PM, Howard Chu wrote:
>> The remainder of the patch needs to be #ifdef'd if it is going to break
>> compatibility with older versions of the resolver library.
>
>I have updated the patch file here:
>
>http://homepage.mac.com/townsend/openldap-patches/libraries- 
>libldap.patch
>
>It now ifdefs based on _RESOLV_9_H_ to determine whether to use the new  
>API or not.
>
>One disadvantage of having to add -lresolv to the LIBS environment  
>variable is that it requires that library be linked to by everything  
>that is built rather than just libldap. It's certainly easy enough to  
>put that into our wrapper Makefile or set it up when running configure.  
>This loses a bit of the point of autoconfigure, but I'm not sure how we  
>can automatically detect that this library is available or necessary.  
>That seems like the better way to go if it is possible.
>
>-Jason

Comment 6 Kurt Zeilenga 2003-10-15 01:50:36 UTC
changed notes
changed state Open to Test
Comment 7 Howard Chu 2003-11-18 03:50:42 UTC
Apparently NetBSD 1.5 and 1.6 still use the old BIND 4 API. fyi...

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support 

Comment 8 Kurt Zeilenga 2003-12-01 02:40:05 UTC
changed state Test to Closed
Comment 9 Kurt Zeilenga 2004-01-26 16:32:52 UTC
changed notes
changed state Closed to Release
Comment 10 Kurt Zeilenga 2004-02-25 04:04:47 UTC
changed notes
changed state Release to Closed
Comment 11 Howard Chu 2009-02-17 04:42:26 UTC
moved from Build to Archive.Build
Comment 12 OpenLDAP project 2014-08-01 21:05:09 UTC
Fixed in HEAD and re22
now applied to re21