Thread: ipv6 build error?
On FreeBSD/Alpha: gmake[3]: Entering directory `/home/chriskl/pgsql-head/src/backend/libpq' gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. /src/include -c -o be-fsstubs.o be-fsstubs.c -MMD gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. /src/include -c -o be-secure.o be-secure.c -MMD gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. /src/include -c -o auth.o auth.c -MMD gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. /src/include -c -o crypt.o crypt.c -MMD gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. /src/include -c -o hba.o hba.c -MMD gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. /src/include -c -o ip.o ip.c -MMD ip.c: In function `convSockAddr6to4': ip.c:368: structure has no member named `s6_addr32' gmake[3]: *** [ip.o] Error 1 gmake[3]: Leaving directory `/home/chriskl/pgsql-head/src/backend/libpq' gmake[2]: *** [libpq-recursive] Error 2 gmake[2]: Leaving directory `/home/chriskl/pgsql-head/src/backend' gmake[1]: *** [install] Error 2 gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src' gmake: *** [install] Error 2 I seem to remember seeing this before when we had some ipv6 code that we decided to remove in the end... Chris
Interesting. I see in BSD/OS /usr/include/netinet6/in6.h: struct in6_addr { union { u_int8_t __u6_addr8[16]; u_int16_t __u6_addr16[8]; u_int32_t __u6_addr32[4]; } __u6_addr; /* 128-bit IP6 address */};#define s6_addr __u6_addr.__u6_addr8#define s6_addr8 __u6_addr.__u6_addr8#define s6_addr16 __u6_addr.__u6_addr16#define s6_addr32 __u6_addr.__u6_addr32 and of course the line in ip.c that is causing the problem is: dst->in.sin_addr.s_addr = src->in6.sin6_addr.s6_addr32[3]; Do you see anything like that? Are you using the newest CVS? (I did make some CVS adjustments for Tom about 10 hours ago.) We did pull out IPv6 that was part of an SSL patch in the past because we didn't support IPv6 anyway. This patch does fully support IPv6 so we are going to have to adjust things so configure and the code properly detect and deal with all the IPv6 implementations out there. --------------------------------------------------------------------------- Christopher Kings-Lynne wrote: > On FreeBSD/Alpha: > > gmake[3]: Entering directory `/home/chriskl/pgsql-head/src/backend/libpq' > gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. > /src/include -c -o be-fsstubs.o be-fsstubs.c -MMD > gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. > /src/include -c -o be-secure.o be-secure.c -MMD > gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. > /src/include -c -o auth.o auth.c -MMD > gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. > /src/include -c -o crypt.o crypt.c -MMD > gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. > /src/include -c -o hba.o hba.c -MMD > gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../.. > /src/include -c -o ip.o ip.c -MMD > ip.c: In function `convSockAddr6to4': > ip.c:368: structure has no member named `s6_addr32' > gmake[3]: *** [ip.o] Error 1 > gmake[3]: Leaving directory `/home/chriskl/pgsql-head/src/backend/libpq' > gmake[2]: *** [libpq-recursive] Error 2 > gmake[2]: Leaving directory `/home/chriskl/pgsql-head/src/backend' > gmake[1]: *** [install] Error 2 > gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src' > gmake: *** [install] Error 2 > > I seem to remember seeing this before when we had some ipv6 code that we > decided to remove in the end... > > Chris > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
Hi Bruce, I seem to have this: struct in6_addr { union { u_int8_t __u6_addr8[16]; u_int16_t __u6_addr16[8]; u_int32_t __u6_addr32[4]; } __u6_addr; /* 128-bit IP6 address */ }; #define s6_addr __u6_addr.__u6_addr8 #ifdef _KERNEL /*XXX nonstandard*/ #define s6_addr8 __u6_addr.__u6_addr8 #define s6_addr16 __u6_addr.__u6_addr16 #define s6_addr32 __u6_addr.__u6_addr32 #endif #define INET6_ADDRSTRLEN 46 I've attached the full header file. ifconfig shows IPv6 addresses on the network interfaces, so I assume I have ipv6 built. It is a 4.4-stable box with GENERIC kernel. I just rebuilt from very latest CVS and it still failed. Chris > -----Original Message----- > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us] > Sent: Tuesday, 7 January 2003 12:01 AM > To: Christopher Kings-Lynne > Cc: Hackers > Subject: Re: [HACKERS] ipv6 build error? > > > > Interesting. > > I see in BSD/OS /usr/include/netinet6/in6.h: > > struct in6_addr { > union { > u_int8_t __u6_addr8[16]; > u_int16_t __u6_addr16[8]; > u_int32_t __u6_addr32[4]; > } __u6_addr; /* 128-bit IP6 address */ > }; > > #define s6_addr __u6_addr.__u6_addr8 > #define s6_addr8 __u6_addr.__u6_addr8 > #define s6_addr16 __u6_addr.__u6_addr16 > #define s6_addr32 __u6_addr.__u6_addr32 > > and of course the line in ip.c that is causing the problem is: > > dst->in.sin_addr.s_addr = src->in6.sin6_addr.s6_addr32[3]; > > Do you see anything like that? Are you using the newest CVS? (I did > make some CVS adjustments for Tom about 10 hours ago.) > > We did pull out IPv6 that was part of an SSL patch in the past because > we didn't support IPv6 anyway. This patch does fully support IPv6 so we > are going to have to adjust things so configure and the code properly > detect and deal with all the IPv6 implementations out there. > > ------------------------------------------------------------------ > --------- > > Christopher Kings-Lynne wrote: > > On FreeBSD/Alpha: > > > > gmake[3]: Entering directory > `/home/chriskl/pgsql-head/src/backend/libpq' > > gcc -pipe -O -g -Wall -Wmissing-prototypes > -Wmissing-declarations -I../../.. > > /src/include -c -o be-fsstubs.o be-fsstubs.c -MMD > > gcc -pipe -O -g -Wall -Wmissing-prototypes > -Wmissing-declarations -I../../.. > > /src/include -c -o be-secure.o be-secure.c -MMD > > gcc -pipe -O -g -Wall -Wmissing-prototypes > -Wmissing-declarations -I../../.. > > /src/include -c -o auth.o auth.c -MMD > > gcc -pipe -O -g -Wall -Wmissing-prototypes > -Wmissing-declarations -I../../.. > > /src/include -c -o crypt.o crypt.c -MMD > > gcc -pipe -O -g -Wall -Wmissing-prototypes > -Wmissing-declarations -I../../.. > > /src/include -c -o hba.o hba.c -MMD > > gcc -pipe -O -g -Wall -Wmissing-prototypes > -Wmissing-declarations -I../../.. > > /src/include -c -o ip.o ip.c -MMD > > ip.c: In function `convSockAddr6to4': > > ip.c:368: structure has no member named `s6_addr32' > > gmake[3]: *** [ip.o] Error 1 > > gmake[3]: Leaving directory `/home/chriskl/pgsql-head/src/backend/libpq' > > gmake[2]: *** [libpq-recursive] Error 2 > > gmake[2]: Leaving directory `/home/chriskl/pgsql-head/src/backend' > > gmake[1]: *** [install] Error 2 > > gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src' > > gmake: *** [install] Error 2 > > > > I seem to remember seeing this before when we had some ipv6 code that we > > decided to remove in the end... > > > > Chris > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 6: Have you searched our list archives? > > > > http://archives.postgresql.org > > > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 359-1001 > + If your life is a hard drive, | 13 Roberts Road > + Christ can be your backup. | Newtown Square, > Pennsylvania 19073 >
Attachment
OK, Christopher, how should we deal with this? I don't think defining _KERNEL is a good idea. The only thing I can think of, if only s6_addr is standard, is to change: dst->in.sin_addr.s_addr = src->in6.sin6_addr.s6_addr32[3]; into taking the last 4 array elements of s6_addr and doing a shift of 24/16/8 to get an unsigned int32 value. --------------------------------------------------------------------------- Christopher Kings-Lynne wrote: > Hi Bruce, > > I seem to have this: > > struct in6_addr { > union { > u_int8_t __u6_addr8[16]; > u_int16_t __u6_addr16[8]; > u_int32_t __u6_addr32[4]; > } __u6_addr; /* 128-bit IP6 address */ > }; > > #define s6_addr __u6_addr.__u6_addr8 > #ifdef _KERNEL /*XXX nonstandard*/ > #define s6_addr8 __u6_addr.__u6_addr8 > #define s6_addr16 __u6_addr.__u6_addr16 > #define s6_addr32 __u6_addr.__u6_addr32 > #endif > > #define INET6_ADDRSTRLEN 46 > > I've attached the full header file. > > ifconfig shows IPv6 addresses on the network interfaces, so I assume I have > ipv6 built. It is a 4.4-stable box with GENERIC kernel. I just rebuilt > from very latest CVS and it still failed. > > Chris > > > > -----Original Message----- > > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us] > > Sent: Tuesday, 7 January 2003 12:01 AM > > To: Christopher Kings-Lynne > > Cc: Hackers > > Subject: Re: [HACKERS] ipv6 build error? > > > > > > > > Interesting. > > > > I see in BSD/OS /usr/include/netinet6/in6.h: > > > > struct in6_addr { > > union { > > u_int8_t __u6_addr8[16]; > > u_int16_t __u6_addr16[8]; > > u_int32_t __u6_addr32[4]; > > } __u6_addr; /* 128-bit IP6 address */ > > }; > > > > #define s6_addr __u6_addr.__u6_addr8 > > #define s6_addr8 __u6_addr.__u6_addr8 > > #define s6_addr16 __u6_addr.__u6_addr16 > > #define s6_addr32 __u6_addr.__u6_addr32 > > > > and of course the line in ip.c that is causing the problem is: > > > > dst->in.sin_addr.s_addr = src->in6.sin6_addr.s6_addr32[3]; > > > > Do you see anything like that? Are you using the newest CVS? (I did > > make some CVS adjustments for Tom about 10 hours ago.) > > > > We did pull out IPv6 that was part of an SSL patch in the past because > > we didn't support IPv6 anyway. This patch does fully support IPv6 so we > > are going to have to adjust things so configure and the code properly > > detect and deal with all the IPv6 implementations out there. > > > > ------------------------------------------------------------------ > > --------- > > > > Christopher Kings-Lynne wrote: > > > On FreeBSD/Alpha: > > > > > > gmake[3]: Entering directory > > `/home/chriskl/pgsql-head/src/backend/libpq' > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > -Wmissing-declarations -I../../.. > > > /src/include -c -o be-fsstubs.o be-fsstubs.c -MMD > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > -Wmissing-declarations -I../../.. > > > /src/include -c -o be-secure.o be-secure.c -MMD > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > -Wmissing-declarations -I../../.. > > > /src/include -c -o auth.o auth.c -MMD > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > -Wmissing-declarations -I../../.. > > > /src/include -c -o crypt.o crypt.c -MMD > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > -Wmissing-declarations -I../../.. > > > /src/include -c -o hba.o hba.c -MMD > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > -Wmissing-declarations -I../../.. > > > /src/include -c -o ip.o ip.c -MMD > > > ip.c: In function `convSockAddr6to4': > > > ip.c:368: structure has no member named `s6_addr32' > > > gmake[3]: *** [ip.o] Error 1 > > > gmake[3]: Leaving directory `/home/chriskl/pgsql-head/src/backend/libpq' > > > gmake[2]: *** [libpq-recursive] Error 2 > > > gmake[2]: Leaving directory `/home/chriskl/pgsql-head/src/backend' > > > gmake[1]: *** [install] Error 2 > > > gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src' > > > gmake: *** [install] Error 2 > > > > > > I seem to remember seeing this before when we had some ipv6 code that we > > > decided to remove in the end... > > > > > > Chris > > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > > TIP 6: Have you searched our list archives? > > > > > > http://archives.postgresql.org > > > > > > > -- > > Bruce Momjian | http://candle.pha.pa.us > > pgman@candle.pha.pa.us | (610) 359-1001 > > + If your life is a hard drive, | 13 Roberts Road > > + Christ can be your backup. | Newtown Square, > > Pennsylvania 19073 > > [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
Actually, CVS HEAD now builds and compiles quite cleanly on the Alpha. I'm not sure what you did to fix it? Perhaps it's not compiling in ipv6 at all? If so, probably doesn't matter. Anyway, it's all fine now. Chris > -----Original Message----- > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us] > Sent: Thursday, 9 January 2003 9:16 AM > To: Christopher Kings-Lynne > Cc: Hackers > Subject: Re: [HACKERS] ipv6 build error? > > > > OK, Christopher, how should we deal with this? I don't think defining > _KERNEL is a good idea. The only thing I can think of, if only s6_addr > is standard, is to change: > > dst->in.sin_addr.s_addr = src->in6.sin6_addr.s6_addr32[3]; > > into taking the last 4 array elements of s6_addr and doing a shift of > 24/16/8 to get an unsigned int32 value. > > ------------------------------------------------------------------ > --------- > > Christopher Kings-Lynne wrote: > > Hi Bruce, > > > > I seem to have this: > > > > struct in6_addr { > > union { > > u_int8_t __u6_addr8[16]; > > u_int16_t __u6_addr16[8]; > > u_int32_t __u6_addr32[4]; > > } __u6_addr; /* 128-bit IP6 address */ > > }; > > > > #define s6_addr __u6_addr.__u6_addr8 > > #ifdef _KERNEL /*XXX nonstandard*/ > > #define s6_addr8 __u6_addr.__u6_addr8 > > #define s6_addr16 __u6_addr.__u6_addr16 > > #define s6_addr32 __u6_addr.__u6_addr32 > > #endif > > > > #define INET6_ADDRSTRLEN 46 > > > > I've attached the full header file. > > > > ifconfig shows IPv6 addresses on the network interfaces, so I > assume I have > > ipv6 built. It is a 4.4-stable box with GENERIC kernel. I just rebuilt > > from very latest CVS and it still failed. > > > > Chris > > > > > > > -----Original Message----- > > > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us] > > > Sent: Tuesday, 7 January 2003 12:01 AM > > > To: Christopher Kings-Lynne > > > Cc: Hackers > > > Subject: Re: [HACKERS] ipv6 build error? > > > > > > > > > > > > Interesting. > > > > > > I see in BSD/OS /usr/include/netinet6/in6.h: > > > > > > struct in6_addr { > > > union { > > > u_int8_t __u6_addr8[16]; > > > u_int16_t __u6_addr16[8]; > > > u_int32_t __u6_addr32[4]; > > > } __u6_addr; /* 128-bit IP6 address */ > > > }; > > > > > > #define s6_addr __u6_addr.__u6_addr8 > > > #define s6_addr8 __u6_addr.__u6_addr8 > > > #define s6_addr16 __u6_addr.__u6_addr16 > > > #define s6_addr32 __u6_addr.__u6_addr32 > > > > > > and of course the line in ip.c that is causing the problem is: > > > > > > dst->in.sin_addr.s_addr = src->in6.sin6_addr.s6_addr32[3]; > > > > > > Do you see anything like that? Are you using the newest CVS? (I did > > > make some CVS adjustments for Tom about 10 hours ago.) > > > > > > We did pull out IPv6 that was part of an SSL patch in the past because > > > we didn't support IPv6 anyway. This patch does fully support > IPv6 so we > > > are going to have to adjust things so configure and the code properly > > > detect and deal with all the IPv6 implementations out there. > > > > > > ------------------------------------------------------------------ > > > --------- > > > > > > Christopher Kings-Lynne wrote: > > > > On FreeBSD/Alpha: > > > > > > > > gmake[3]: Entering directory > > > `/home/chriskl/pgsql-head/src/backend/libpq' > > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > > -Wmissing-declarations -I../../.. > > > > /src/include -c -o be-fsstubs.o be-fsstubs.c -MMD > > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > > -Wmissing-declarations -I../../.. > > > > /src/include -c -o be-secure.o be-secure.c -MMD > > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > > -Wmissing-declarations -I../../.. > > > > /src/include -c -o auth.o auth.c -MMD > > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > > -Wmissing-declarations -I../../.. > > > > /src/include -c -o crypt.o crypt.c -MMD > > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > > -Wmissing-declarations -I../../.. > > > > /src/include -c -o hba.o hba.c -MMD > > > > gcc -pipe -O -g -Wall -Wmissing-prototypes > > > -Wmissing-declarations -I../../.. > > > > /src/include -c -o ip.o ip.c -MMD > > > > ip.c: In function `convSockAddr6to4': > > > > ip.c:368: structure has no member named `s6_addr32' > > > > gmake[3]: *** [ip.o] Error 1 > > > > gmake[3]: Leaving directory > `/home/chriskl/pgsql-head/src/backend/libpq' > > > > gmake[2]: *** [libpq-recursive] Error 2 > > > > gmake[2]: Leaving directory `/home/chriskl/pgsql-head/src/backend' > > > > gmake[1]: *** [install] Error 2 > > > > gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src' > > > > gmake: *** [install] Error 2 > > > > > > > > I seem to remember seeing this before when we had some ipv6 > code that we > > > > decided to remove in the end... > > > > > > > > Chris > > > > > > > > > > > > ---------------------------(end of > broadcast)--------------------------- > > > > TIP 6: Have you searched our list archives? > > > > > > > > http://archives.postgresql.org > > > > > > > > > > -- > > > Bruce Momjian | http://candle.pha.pa.us > > > pgman@candle.pha.pa.us | (610) 359-1001 > > > + If your life is a hard drive, | 13 Roberts Road > > > + Christ can be your backup. | Newtown Square, > > > Pennsylvania 19073 > > > > > [ Attachment, skipping... ] > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 359-1001 > + If your life is a hard drive, | 13 Roberts Road > + Christ can be your backup. | Newtown Square, > Pennsylvania 19073 >
Christopher Kings-Lynne wrote: > Actually, CVS HEAD now builds and compiles quite cleanly on the Alpha. I'm > not sure what you did to fix it? Perhaps it's not compiling in ipv6 at all? > If so, probably doesn't matter. > Yes, I think it is accurate that it isn't compiling at all. I modified the configure tests to check for sockaddr_in6, and that is more accurate. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073