Bug 64449 - ports dns/bind8, dns/bind84: PORT_REPLACES_BASE_BIND8 replaces header files
Summary: ports dns/bind8, dns/bind84: PORT_REPLACES_BASE_BIND8 replaces header files
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Doug Barton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-19 09:30 UTC by Oliver Eikemeier
Modified: 2004-03-20 22:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Eikemeier 2004-03-19 09:30:15 UTC
The dns/bind8 and dns/bind84 ports have an option PORT_REPLACES_BASE_BIND8. 
When installed with this option, they replace /usr/include/netdb.h, but not 
the referenced libraries (since gethostbyname et al are in /usr/lib/libc.so). 
This causes ports that compile with -D_REENTRANT to fail, since h_errno is 
redefined to __h_errno, but are not linked against the respective libraries.

Fix: 

Set
INCLUDE_PATH=   include/bind
when PORT_REPLACES_BASE_BIND8. It is not apparent what the advantage or 
replacing the headers is anyway, since the bind9 ports does not do this.

Linking with libbind seems not to be an options, since it is a) hard to 
determine when this should be done, and b) not easy to insure against getting 
h_errno and gethostbyname from different libraries.
How-To-Repeat: 
Try to compile the following program with -D_REENTRANT when bind-base-8.3.* or 
bind84-base-8.4.* is installed:

#include <netdb.h>
int main() {h_errno = 0; return 0;}

> gcc -D_REENTRANT a.c
[...] undefined reference to `__h_errno'
Comment 1 Oliver Eikemeier freebsd_committer freebsd_triage 2004-03-19 09:30:15 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dOUgb

Over to maintainer
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2004-03-19 22:29:54 UTC
Responsible Changed
From-To: dOUgb->DougB

Make the assignment field match what is in the Makefile.
Comment 3 Doug Barton freebsd_committer freebsd_triage 2004-03-19 22:39:21 UTC
State Changed
From-To: open->analyzed


Argh. The problems this is causing now outweigh the benefits 
from the people who requested that includes be overwritten so 
that they could use the newly built libbind. I'll work on a 
compromise this weekend. 


Comment 4 Doug Barton freebsd_committer freebsd_triage 2004-03-19 22:39:21 UTC
Responsible Changed
From-To: DougB->dougb


canonicalize the capitalization
Comment 5 Doug Barton freebsd_committer freebsd_triage 2004-03-20 22:16:11 UTC
State Changed
From-To: analyzed->closed


I just committed a fix for this, thanks.