Bug 22834 - Bind source doesn't compile under Redhat 7.0, Make is not stop on errors as it should.
Bind source doesn't compile under Redhat 7.0, Make is not stop on errors as i...
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: bind (Show other bugs)
7.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-12-26 01:50 EST by Need Real Name
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-12-27 05:56:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2000-12-26 01:50:19 EST
Apply the following patch.

                Save this email as 'message'.
                Then in the directory where you untared the src tree
                run 'patch < message'.

        You should also complain to Redhat as the make they are
        shipping does not always stop on errors as it should.  If
        it did you would have seen the original error, not the
        later one as it attemped to link the executable.

        Mark

Index: src/lib/irs/irpmarshall.c
===================================================================
RCS file: /proj/cvs/isc/bind8/src/lib/irs/irpmarshall.c,v
retrieving revision 8.5
retrieving revision 8.5.2.1
diff -u -r8.5 -r8.5.2.1
--- irpmarshall.c       1999/10/13 17:11:19     8.5
+++ irpmarshall.c       2000/12/11 19:17:28     8.5.2.1
@@ -90,7 +90,10 @@
 #include "port_after.h"
 
 
+#ifndef HAVE_STRNDUP
 static char    *strndup(const char *str, size_t len);
+#endif
+
 static char   **splitarray(const char *buffer, const char *buffend, char delim);
 static int     joinarray(char * const * argv, char *buffer, char delim);
 static char    *getfield(char **res, size_t reslen, char **buffer, char delim);
@@ -1862,6 +1865,7 @@
 
 
 
+#ifndef HAVE_STRNDUP
 /*
  * static char * strndup(const char *str, size_t len)
  *
@@ -1886,6 +1890,7 @@
        p[len] = 0x0;
        return (p);
 }
+#endif
 
 #if WANT_MAIN
 
Index: src/port/linux/include/port_after.h
===================================================================
RCS file: /proj/cvs/isc/bind8/src/port/linux/include/port_after.h,v
retrieving revision 1.22
retrieving revision 1.22.4.1
diff -u -r1.22 -r1.22.4.1
--- port_after.h        1999/05/14 17:28:55     1.22
+++ port_after.h        2000/12/11 19:17:29     1.22.4.1
@@ -85,4 +85,12 @@
        u_int32_t       sin6_scope_id;  /* set of interfaces for a scope */
 };
 #endif /* HAS_INET6_STRUCTS */
+
+/*
+ * glibc 2.2 #defines strndup to __strndup, which allows this to work.
+ */
+#ifdef strndup
+#define HAVE_STRNDUP
+#endif
+
 #endif /* ! PORT_AFTER_H */
> Hi-
> 
> I thinks I got a bug to report.  I was following the steps in the howto
> for chroot and bind.
> 
> http://www.redhat.com/mirrors/LDP/HOWTO/Chroot-BIND-HOWTO.html
> 
> I got it working w/ Redhat 6.2 but with Redhat 7.0, I'm getting the
> following compiling errors w/ the lastest 8.2.2 from your site...
> 
> 
> /usr/local/src/bin/nslookup
> make[2]: Entering directory `/usr/local/src/bin/nslookup'
> gcc -D_GNU_SOURCE  -O -g -I../../port/linux/include -I../../include
> -D_PATH_HELPFILE=\"/usr/local/lib/nslookup.help\"  -c main.c
> gcc -D_GNU_SOURCE  -O -g -I../../port/linux/include -I../../include
> -D_PATH_HELPFILE=\"/usr/local/lib/nslookup.help\"  -c getinfo.c
> gcc -D_GNU_SOURCE  -O -g -I../../port/linux/include -I../../include
> -D_PATH_HELPFILE=\"/usr/local/lib/nslookup.help\"  -c debug.c
> gcc -D_GNU_SOURCE  -O -g -I../../port/linux/include -I../../include
> -D_PATH_HELPFILE=\"/usr/local/lib/nslookup.help\"  -c send.c
> gcc -D_GNU_SOURCE  -O -g -I../../port/linux/include -I../../include
> -D_PATH_HELPFILE=\"/usr/local/lib/nslookup.help\"  -c skip.c
> gcc -D_GNU_SOURCE  -O -g -I../../port/linux/include -I../../include
> -D_PATH_HELPFILE=\"/usr/local/lib/nslookup.help\"  -c list.c
> gcc -D_GNU_SOURCE  -O -g -I../../port/linux/include -I../../include
> -D_PATH_HELPFILE=\"/usr/local/lib/nslookup.help\"  -c subr.c
> gcc -D_GNU_SOURCE  -O -g -I../../port/linux/include -I../../include
> -D_PATH_HELPFILE=\"/usr/local/lib/nslookup.help\"  -c commands.c
> gcc -D_GNU_SOURCE -O -g   -o nslookup main.o getinfo.o debug.o send.o
> skip.o list.o subr.o commands.o \
>         ../../lib/libbind.a -lfl
> ../../lib/libbind.a(herror.o): In function `herror':
> /usr/local/src/lib/resolv/herror.c:102: undefined reference to
> `__h_errno'
> ../../lib/libbind.a(res_data.o): In function `__res_mkquery':
> /usr/local/src/lib/resolv/res_data.c:154: undefined reference to
> `__h_errno_set'../../lib/libbind.a(res_data.o): In function
> `__res_mkupdate':
> /usr/local/src/lib/resolv/res_data.c:165: undefined reference to
> `__h_errno_set'../../lib/libbind.a(res_data.o): In function
> `__res_query':
> /usr/local/src/lib/resolv/res_data.c:179: undefined reference to
> `__h_errno_set'../../lib/libbind.a(res_data.o): In function
> `__res_update':
> /usr/local/src/lib/resolv/res_data.c:230: undefined reference to
> `__h_errno_set'../../lib/libbind.a(res_data.o): In function
> `__res_search':
> /usr/local/src/lib/resolv/res_data.c:244: undefined reference to
> `__h_errno_set'../../lib/libbind.a(res_data.o):/usr/local/src/lib/resolv/res_
> data.c:259:
> more undefined references to `__h_errno_set' follow
> collect2: ld returned 1 exit status
> make[2]: *** [nslookup] Error 1
> make[2]: Leaving directory `/usr/local/src/bin/nslookup'
> make[1]: *** [nslookup] Error 2
> make[1]: Leaving directory `/usr/local/src/bin'
> make: *** [all] Error 2
> 
> 
> Anyone else report this problem?
> 
> Melvin
> 
--
Comment 1 Bernhard Rosenkraenzer 2001-01-04 09:27:24 EST
The version of bind we're shipping does not have this problem.

Note You need to log in before you can comment on or make changes to this bug.