Errors compiling bind 8.2 on redhat6.0

Mark_Andrews at isc.org Mark_Andrews at isc.org
Tue Jun 1 22:22:44 UTC 1999


> In article <3748C318.54E13FE2 at linux1.org>,
>   brent verner <brent at linux1.org> wrote:
> > i `ar`ed a few .o files into libbind.a and compiled further,
> > but i think i've found *the problem*. eventlib.o is not
> > compiling, so libbind.a is never properly `ar`ed. if i get
> > this to compile, i'll post a patch.
> >
> > eventlib.c: In function `__evGetNext':
> > eventlib.c:296: structure has no member named `fds_bits'
> > eventlib.c:297: structure has no member named `fds_bits'
> > eventlib.c:298: structure has no member named `fds_bits'
> > make[2]: *** [eventlib.o] Error 1
> 
> 
> It is always good to see that someone else is having the same
> problems you are!
> 
> I think I got it.  First off, the function that needs these
> variables is just a debug type function anyways, so it could
> be safely removed...  I think.
> 
> Second, the problem is that they are using the wrong variable name.
> They need be getting __fds_bits, not fds_bits.  You can fix it by
> changing fds_bits to __fds_bits on 3 lines in eventlib.c and 6
> lines in ev_files.c, or just use the patch at the end.
> 
> The catch is that they would be using the right variable name
> on some systems, I think.  They are looking for fds_bits in fd_set
> and it is in there if __USE_XOPEN is defined, otherwise it is __fd_set.
> I'm not sure what is going on here, but it works now...
> 
> BTW, I had other problems and had to define HAS_INET6_STRUCTS in
> port/linux/include/port_after.h.
> 
> The following patch adds the HAS_INET6_STRUCTS and -O2 to CFLAGS
> if you are using linux. If you are not, this has no affect.  If you
> don't want this, just trim it off the end of the patch.  It also
> fixes the above variable name problem.  This should effect all
> systems, so only apply it if you are having problems.
> 
> 
> diff -u -r -N src/lib/isc/ev_files.c src.new/lib/isc/ev_files.c
> --- src/lib/isc/ev_files.c Fri Jan  8 14:25:26 1999
> +++ src.new/lib/isc/ev_files.c Sun May 30 12:33:14 1999
> @@ -140,9 +140,9 @@
>   evPrintf(ctx, 5,
>    "evSelectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n",
>     fd, eventmask,
> -   (u_long)ctx->rdNext.fds_bits[0],
> -   (u_long)ctx->wrNext.fds_bits[0],
> -   (u_long)ctx->exNext.fds_bits[0]);
> +   (u_long)ctx->rdNext.__fds_bits[0],
> +   (u_long)ctx->wrNext.__fds_bits[0],
> +   (u_long)ctx->exNext.__fds_bits[0]);
> 
>   return (0);
>  }
> @@ -251,9 +251,9 @@
>   evPrintf(ctx, 5,
>         "evDeselectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx
> 0x%lx\n",
>     del->fd, eventmask,
> -   (u_long)ctx->rdNext.fds_bits[0],
> -   (u_long)ctx->wrNext.fds_bits[0],
> -   (u_long)ctx->exNext.fds_bits[0]);
> +   (u_long)ctx->rdNext.__fds_bits[0],
> +   (u_long)ctx->wrNext.__fds_bits[0],
> +   (u_long)ctx->exNext.__fds_bits[0]);
> 
>   /* Couldn't free it before now since we were using fields out of it.
> */
>   FREE(del);
> diff -u -r -N src/lib/isc/eventlib.c src.new/lib/isc/eventlib.c
> --- src/lib/isc/eventlib.c Fri Jan  8 14:25:32 1999
> +++ src..new/lib/isc/eventlib.c Sun May 30 12:33:27 1999
> @@ -293,9 +293,9 @@
>     evPrintf(ctx, 4,
>      "pselect(%d, 0x%lx, 0x%lx, 0x%lx, %d.%09ld)\n",
>       ctx->fdMax+1,
> -     (u_long)ctx->rdLast.fds_bits[0],
> -     (u_long)ctx->wrLast.fds_bits[0],
> -     (u_long)ctx->exLast.fds_bits[0],
> +     (u_long)ctx->rdLast.__fds_bits[0],
> +     (u_long)ctx->wrLast.__fds_bits[0],
> +     (u_long)ctx->exLast.__fds_bits[0],
>       tp ? tp->tv_sec : -1,
>       tp ? tp->tv_nsec : -1);
> 
> diff -u -r -N src/port/linux/Makefile.set
> src.new/port/linux/Makefile.set
> --- src/port/linux/Makefile.set Sun Feb 21 21:48:02 1999
> +++ src.new/port/linux/Makefile.set Sun May 30 12:34:42 1999
> @@ -1,5 +1,5 @@
>  'CC=gcc'
> -'CDEBUG=-O -g'
> +'CDEBUG=-O2'
>  'DESTBIN=/usr/bin'
>  'DESTSBIN=/usr/sbin'
>  'DESTEXEC=/usr/sbin'
> diff -u -r -N src/port/linux/include/port_after.h
> src.new/port/linux/include/port_after.h
> --- src/port/linux/include/port_after.h Sat Feb 27 02:04:21 1999
> +++ src.new/port/linux/include/port_after.h Sun May 30 12:32:45 1999
> @@ -13,6 +13,7 @@
>  #define USE_LOG_CONS
>  #define HAVE_CHROOT
>  #define CAN_CHANGE_ID
> +#define HAS_INET6_STRUCTS
> 
>  #if __GLIBC__ >= 2
>  #  define dprintf bind_dprintf
> 
> 
> 

	I would recommend only doing one of these changes.

	For some strange reason the glibc developers decided to go a
	different way to the rest of the world and try to hide
	__fds_bits which worked previously and with all other OS's
	we are worried about.

	To get back to old behaviour #define _GNU_SOURCE in
	src/port/linux/include/port_before.h.  This will result in
	__USE_XOPEN being defined.

	Removing '-g' from CDEBUG makes remote support much more
	difficult and I would recommend against it.

	#define HAS_INET6_STRUCTS should only be applied if you have
	problems with multiple definitions of sockaddr_in6.  You may
	also need "#define in6_addr in_addr6" if you still have
	problems with getaddrinfo.o.  This last part is not need for
	RH 6.0.

	Mark
--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org



More information about the bind-users mailing list