vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I'm trying to compile NTP-4.2.0 on OpenBSD 3.3. The make process stops almost immediately with redefinition errors. Here's what it looks like: source='systime.c' object='systime.o' libtool=no depfile='.deps/systime.Po' tmpdepfile='.deps/systime.TPo' depmode=gcc /bin/sh ../depcomp gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -I/usr/include -g -O2 -Wall -Wcast-qual -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -c `test -f 'systime.c' || echo './'`systime.c In file included from ../include/ntp_fp.h:10, from systime.c:8: .../include/ntp_rfc2553.h:177: redefinition of `struct sockaddr_storage' In file included from /usr/include/netinet/in.h:506, from ../include/ntp_fp.h:11, from systime.c:8: /usr/include/netinet6/in6.h:120: redefinition of `struct in6_addr' /usr/include/netinet6/in6.h:143: redefinition of `struct sockaddr_in6' *** Error code 1 Stop in /home/roy/ntp-4.2.0/libntp. *** Error code 1 Stop in /home/roy/ntp-4.2.0 (line 321 of Makefile). *** Error code 1 Stop in /home/roy/ntp-4.2.0 (line 260 of Makefile). I was able to compile NTP-4.1.2 with only minor changes, but this one is beyond my current skills. Is anyone else trying to use this release? Any suggestions on how to fix it? TIA, roy -- The suespammers.org mail server is located in California. Please do not send unsolicited bulk e-mail or unsolicited commercial e-mail to my suespammers.org address or any of my other addresses. These are my opinions, not necessarily my employer's. |
| |||
| In the referenced article, roy@suespammers.org (Roy) writes: >I'm trying to compile NTP-4.2.0 on OpenBSD 3.3. The make process >stops almost immediately with redefinition errors. Here's what it >looks like: > >source='systime.c' object='systime.o' libtool=no >depfile='.deps/systime.Po' tmpdepfile='.deps/systime.TPo' depmode=gcc >/bin/sh ../depcomp gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include >-I../include -I/usr/include -g -O2 -Wall -Wcast-qual >-Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -c >`test -f 'systime.c' || echo './'`systime.c >In file included from ../include/ntp_fp.h:10, > from systime.c:8: >../include/ntp_rfc2553.h:177: redefinition of `struct >sockaddr_storage' >In file included from /usr/include/netinet/in.h:506, > from ../include/ntp_fp.h:11, > from systime.c:8: >/usr/include/netinet6/in6.h:120: redefinition of `struct in6_addr' >/usr/include/netinet6/in6.h:143: redefinition of `struct sockaddr_in6' >*** Error code 1 > >Stop in /home/roy/ntp-4.2.0/libntp. >*** Error code 1 > >Stop in /home/roy/ntp-4.2.0 (line 321 of Makefile). >*** Error code 1 > >Stop in /home/roy/ntp-4.2.0 (line 260 of Makefile). > >I was able to compile NTP-4.1.2 with only minor changes, but this one >is beyond my current skills. Is anyone else trying to use this release? >Any suggestions on how to fix it? As pointed out by Danny Mayer in the comp.protocols.time.ntp Newsgroup, it's the expansion of include/ntp_rfc2553.h that's causing the problem. That attempts to detect whether IP6 is already available and skips various definitions if it is. It looks like the test: #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) #define HAVE_IPV6 #else isn't right for OpenBSD. I'm not sure of the "correct" way to fix this. We don't use IP6 yet. However the following bodge should get it compiled. Haven't tried running the resulting binary, so your guarantee has just expired! *** include/ntp_rfc2553.h.orig Thu Jul 17 11:27:16 2003 --- include/ntp_rfc2553.h Wed Oct 29 11:16:08 2003 *************** *** 68,74 **** #ifndef _NTP_RFC2553_H_ #define _NTP_RFC2553_H_ ! #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) #define HAVE_IPV6 #else --- 68,74 ---- #ifndef _NTP_RFC2553_H_ #define _NTP_RFC2553_H_ ! # if 1 #define HAVE_IPV6 #else -- Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK D.H.Davis@bath.ac.uk |
| |||
| ccsdhd@bath.ac.uk (Dennis Davis) wrote in message news:<HnIny6.H1L.B.hinault@bath.ac.uk>... [snip] > As pointed out by Danny Mayer in the comp.protocols.time.ntp > Newsgroup, it's the expansion of include/ntp_rfc2553.h that's > causing the problem. That attempts to detect whether IP6 is already > available and skips various definitions if it is. > > It looks like the test: > > #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) > #define HAVE_IPV6 > #else > > isn't right for OpenBSD. > > I'm not sure of the "correct" way to fix this. We don't use IP6 yet. > However the following bodge should get it compiled. Haven't tried > running the resulting binary, so your guarantee has just expired! > > > *** include/ntp_rfc2553.h.orig Thu Jul 17 11:27:16 2003 > --- include/ntp_rfc2553.h Wed Oct 29 11:16:08 2003 > *************** > *** 68,74 **** > #ifndef _NTP_RFC2553_H_ > #define _NTP_RFC2553_H_ > > ! #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) > #define HAVE_IPV6 > #else > > --- 68,74 ---- > #ifndef _NTP_RFC2553_H_ > #define _NTP_RFC2553_H_ > > ! # if 1 > #define HAVE_IPV6 > #else Hi Dennis, I had read Danny's reply on the NTP newsgroup. When I posted here I was primarily trying to find out if anyone more familiar with OpenBSD was working on the problem. The "bodge" you provided does allow ntp to compile, but obviously it needs more work before it is a real patch! Thank you, roy -- The suespammers.org mail server is located in California. Please do not send unsolicited bulk e-mail or unsolicited commercial e-mail to my suespammers.org address or any of my other addresses. These are my opinions, not necessarily my employer's. |
| |||
| [Posted to both comp.unix.bsd.openbsd.misc and comp.protocols.time.ntp. Please adjust any replies as appropriate.] In the referenced article, roy@suespammers.org (Roy) writes: >ccsdhd@bath.ac.uk (Dennis Davis) wrote in message news:<HnIny6.H1L.B.hinault@bath.ac.uk>... >[snip] >> As pointed out by Danny Mayer in the comp.protocols.time.ntp >> Newsgroup, it's the expansion of include/ntp_rfc2553.h that's >> causing the problem. That attempts to detect whether IP6 is already >> available and skips various definitions if it is. >> >> It looks like the test: >> >> #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) >> #define HAVE_IPV6 >> #else >> >> isn't right for OpenBSD. >> >> I'm not sure of the "correct" way to fix this. We don't use IP6 yet. >> However the following bodge should get it compiled. Haven't tried >> running the resulting binary, so your guarantee has just expired! >> >> >> *** include/ntp_rfc2553.h.orig Thu Jul 17 11:27:16 2003 >> --- include/ntp_rfc2553.h Wed Oct 29 11:16:08 2003 >> *************** >> *** 68,74 **** >> #ifndef _NTP_RFC2553_H_ >> #define _NTP_RFC2553_H_ >> >> ! #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) >> #define HAVE_IPV6 >> #else >> >> --- 68,74 ---- >> #ifndef _NTP_RFC2553_H_ >> #define _NTP_RFC2553_H_ >> >> ! # if 1 >> #define HAVE_IPV6 >> #else > >Hi Dennis, > >I had read Danny's reply on the NTP newsgroup. When I posted here I >was primarily trying to find out if anyone more familiar with OpenBSD >was working on the problem. The "bodge" you provided does allow ntp >to compile, but obviously it needs more work before it is a real >patch! Well, I'm totally fearless of my ignorance so I'll press on :-( OpenBSD, along with other versions of Unix, uses the IPv6 stack from the KAME project: http://www.kame.net/ so it might be a good idea to see if that is in use. The patch appended below might be a starting point for doing this. Certainly works on OpenBSD, although I've not tried it on any other operating system. As usual, my ignorance probably means I've missed a far easier and succinct way of doing this :-( *** ntp_rfc2553.h.orig Thu Jul 17 11:27:16 2003 --- ntp_rfc2553.h Wed Oct 29 16:42:46 2003 *************** *** 68,74 **** #ifndef _NTP_RFC2553_H_ #define _NTP_RFC2553_H_ ! #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) #define HAVE_IPV6 #else --- 68,79 ---- #ifndef _NTP_RFC2553_H_ #define _NTP_RFC2553_H_ ! #include "config.h" ! ! #ifdef HAVE_NETINET_IN_H ! #include <netinet/in.h> ! #endif /* HAVE_NETINET_IN_H */ ! #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) || defined(__KAME__) #define HAVE_IPV6 #else -- Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK D.H.Davis@bath.ac.uk |
| |||
| ccsdhd@bath.ac.uk (Dennis Davis) wrote in message news:<HnJ3vK.J6x.B.hinault@bath.ac.uk>... > [Posted to both comp.unix.bsd.openbsd.misc and > comp.protocols.time.ntp. Please adjust any replies as appropriate.] > > In the referenced article, roy@suespammers.org (Roy) writes: > >ccsdhd@bath.ac.uk (Dennis Davis) wrote in message news:<HnIny6.H1L.B.hinault@bath.ac.uk>... > >[snip] > >> As pointed out by Danny Mayer in the comp.protocols.time.ntp > >> Newsgroup, it's the expansion of include/ntp_rfc2553.h that's > >> causing the problem. That attempts to detect whether IP6 is already > >> available and skips various definitions if it is. > >> > >> It looks like the test: > >> > >> #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) > >> #define HAVE_IPV6 > >> #else > >> > >> isn't right for OpenBSD. > >> I can't imagine that just checking for these two variables is sufficient to decide whether or not it supports IPv6. A macro needs to be defined in config.h if it supports IPv6 and that belongs in the autoconf stuff. Harlan, you should take a look at what we did in BIND 9's autoconfig to decide on whether or not includes will support IPv6. Danny |
| ||||
| (Danny Mayer) wrote in message news:<3a2a0492.0310291444.1c05be9c@posting.google. com>... > > >> > > >> It looks like the test: > > >> > > >> #if defined(_SS_MAXSIZE) || defined(_SS_SIZE) > > >> #define HAVE_IPV6 > > >> #else > > >> > > >> isn't right for OpenBSD. > > >> > > I can't imagine that just checking for these two variables is sufficient > to decide whether or not it supports IPv6. A macro needs to be defined > in config.h if it supports IPv6 and that belongs in the autoconf stuff. > Hi Danny, I took a look at RFC2553 and I agree that checking for these two variables is NOT a generally valid test to determine if the RFC is implemented. Neither one of these variables is required for compliance with the RFC. I changed the test to use a variable that does appear to be required. The following test apparently works: #if defined(IN6ADDR_ANY_INIT) (Minor changes are required in both ../include/ntp_stdlib.h and .../libntp/ntp_rfc2553.c to include <netinet/in.h> before "ntp_rfc2553.h".) Have a great time, roy -- The suespammers.org mail server is located in California. Please do not send unsolicited bulk e-mail or unsolicited commercial e-mail to my suespammers.org address or any of my other addresses. These are my opinions, not necessarily my employer's. |