All of lore.kernel.org
 help / color / mirror / Atom feed
* iproute2 not compiling anymore
@ 2003-10-05 12:42 Marcelo Tosatti
  2003-10-05 13:00 ` Willy TARREAU
  2003-10-05 19:59 ` Erik Andersen
  0 siblings, 2 replies; 13+ messages in thread
From: Marcelo Tosatti @ 2003-10-05 12:42 UTC (permalink / raw)
  To: andersen; +Cc: linux-kernel, davem


Hi Erik, 

In previous messages you said iproute used to compile on "olders" 2.4.x 
kernel but doesnt compile anymore on recent 2.4. Is that information 
correct ? 

Can you tell me in more detail what is failing?

Interfaces should not change in a stable kernel. 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-05 12:42 iproute2 not compiling anymore Marcelo Tosatti
@ 2003-10-05 13:00 ` Willy TARREAU
  2003-10-05 14:11   ` David S. Miller
  2003-10-09 13:52   ` Marcelo Tosatti
  2003-10-05 19:59 ` Erik Andersen
  1 sibling, 2 replies; 13+ messages in thread
From: Willy TARREAU @ 2003-10-05 13:00 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: andersen, linux-kernel, davem

Hi Marcelo, all,

On Sun, Oct 05, 2003 at 09:42:30AM -0300, Marcelo Tosatti wrote:
> In previous messages you said iproute used to compile on "olders" 2.4.x 
> kernel but doesnt compile anymore on recent 2.4. Is that information 
> correct ? 
> 
> Can you tell me in more detail what is failing?

Just tested, and I confirm this too :

gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -I../include-glibc -I/usr/include/db3 -include ../include-glibc/glibc-bugs.h -I/
sr/src/linux/include -I../include -DRESOLVE_HOSTNAMES   -c -o ip.o ip.c
In file included from ../include-glibc/netinet/in.h:7,
                 from ip.c:23:
/usr/src/linux/include/linux/in.h:141: field `gr_group' has incomplete type
/usr/src/linux/include/linux/in.h:147: field `gsr_group' has incomplete type
/usr/src/linux/include/linux/in.h:148: field `gsr_source' has incomplete type
/usr/src/linux/include/linux/in.h:154: field `gf_group' has incomplete type
/usr/src/linux/include/linux/in.h:157: field `gf_slist' has incomplete type
make[1]: *** [ip.o] Error 1
make[1]: Leaving directory `/data/src/net/ip-routing/iproute2-2.4.7-020116/ip'
make: *** [all] Error 2

These fields are of type 'struct sockaddr_storage' :

struct group_source_req
{
        __u32                   gsr_interface;  /* interface index */
        struct sockaddr_storage gsr_group;      /* group address */
        struct sockaddr_storage gsr_source;     /* source address */
};

But sockaddr_storage is defined in socket.h within such a #if :

#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)

So it is clear that compiling with such headers on a recent libc outside the
kernel may fail. I don't know what changed exactly, the #if or
sockaddr_storage declaration.

BTW, wouldn't it be interesting to have some sort of way to bypass these
checks when we know that we want to compile against kernel headers ? I
encountered the case for arptables a few weeks ago. I find it very dirty to
add -D__KERNEL__ to user-space makefiles, and I don't find it logical to rebuild
a libc with pre-release kernel headers either.

So perhaps something like this would be useful for a limited set of userspace
programs :
  #if defined(__KERNEL__) || defined(REALLY_USE_KHDR) || !defined(__GLIBC__)...

Then, the affected programs could simply add a '#define REALLY_USE_KHDR' line
before including particular headers.

Any ideas ?
Willy


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-05 13:00 ` Willy TARREAU
@ 2003-10-05 14:11   ` David S. Miller
  2003-10-05 14:30     ` Mr. James W. Laferriere
  2003-10-24  3:34     ` YOSHIFUJI Hideaki / 吉藤英明
  2003-10-09 13:52   ` Marcelo Tosatti
  1 sibling, 2 replies; 13+ messages in thread
From: David S. Miller @ 2003-10-05 14:11 UTC (permalink / raw)
  To: Willy TARREAU; +Cc: marcelo.tosatti, andersen, linux-kernel

On Sun, 5 Oct 2003 15:00:44 +0200
Willy TARREAU <willy@w.ods.org> wrote:

> /usr/src/linux/include/linux/in.h:147: field `gsr_group' has incomplete type

I'll happily fix this, thanks for reporting this.

Can you please in the future report such things on the networking
development list netdev@oss.sgi.com?  Thanks.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-05 14:11   ` David S. Miller
@ 2003-10-05 14:30     ` Mr. James W. Laferriere
  2003-10-05 14:37       ` David S. Miller
  2003-10-24  3:34     ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 1 reply; 13+ messages in thread
From: Mr. James W. Laferriere @ 2003-10-05 14:30 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Kernel Maillist

	Hello Dave ,

On Sun, 5 Oct 2003, David S. Miller wrote:
> On Sun, 5 Oct 2003 15:00:44 +0200
> Willy TARREAU <willy@w.ods.org> wrote:
> > /usr/src/linux/include/linux/in.h:147: field `gsr_group' has incomplete type
> I'll happily fix this, thanks for reporting this.
> Can you please in the future report such things on the networking
> development list netdev@oss.sgi.com?  Thanks.
	What has happened to linux-net ?
	One more maillist I and others have to watch for exploding
	pieces .  JimL

-- 
       +------------------------------------------------------------------+
       | James   W.   Laferriere | System    Techniques | Give me VMS     |
       | Network        Engineer |     P.O. Box 854     |  Give me Linux  |
       | babydr@baby-dragons.com | Coudersport PA 16915 |   only  on  AXP |
       +------------------------------------------------------------------+

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-05 14:30     ` Mr. James W. Laferriere
@ 2003-10-05 14:37       ` David S. Miller
  2003-10-05 14:41         ` Mr. James W. Laferriere
  0 siblings, 1 reply; 13+ messages in thread
From: David S. Miller @ 2003-10-05 14:37 UTC (permalink / raw)
  To: Mr. James W. Laferriere; +Cc: linux-kernel

On Sun, 5 Oct 2003 10:30:10 -0400 (EDT)
"Mr. James W. Laferriere" <babydr@baby-dragons.com> wrote:

> On Sun, 5 Oct 2003, David S. Miller wrote:
> > Can you please in the future report such things on the networking
> > development list netdev@oss.sgi.com?  Thanks.
> 	What has happened to linux-net ?

It's where users typically discuss user side configuration issues
not kernel development.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-05 14:37       ` David S. Miller
@ 2003-10-05 14:41         ` Mr. James W. Laferriere
  0 siblings, 0 replies; 13+ messages in thread
From: Mr. James W. Laferriere @ 2003-10-05 14:41 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel

	Hello Dave ,

On Sun, 5 Oct 2003, David S. Miller wrote:
> On Sun, 5 Oct 2003 10:30:10 -0400 (EDT)
> "Mr. James W. Laferriere" <babydr@baby-dragons.com> wrote:
> > On Sun, 5 Oct 2003, David S. Miller wrote:
> > > Can you please in the future report such things on the networking
> > > development list netdev@oss.sgi.com?  Thanks.
> > 	What has happened to linux-net ?
>
> It's where users typically discuss user side configuration issues
> not kernel development.
	netdev then is for Network Developement IN the Kernel ?
	iproute is a userland tool .
	Shouldn't conversations concerning it be in linux-net ?
	Above are quisitives ,  Not disparagements .  JimL
-- 
       +------------------------------------------------------------------+
       | James   W.   Laferriere | System    Techniques | Give me VMS     |
       | Network        Engineer |     P.O. Box 854     |  Give me Linux  |
       | babydr@baby-dragons.com | Coudersport PA 16915 |   only  on  AXP |
       +------------------------------------------------------------------+

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-05 12:42 iproute2 not compiling anymore Marcelo Tosatti
  2003-10-05 13:00 ` Willy TARREAU
@ 2003-10-05 19:59 ` Erik Andersen
  1 sibling, 0 replies; 13+ messages in thread
From: Erik Andersen @ 2003-10-05 19:59 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel, davem

On Sun Oct 05, 2003 at 09:42:30AM -0300, Marcelo Tosatti wrote:
> 
> Hi Erik, 
> 
> In previous messages you said iproute used to compile on "olders" 2.4.x 
> kernel but doesnt compile anymore on recent 2.4. Is that information 
> correct ? 
> 
> Can you tell me in more detail what is failing?
> 
> Interfaces should not change in a stable kernel. 

What Willy said covers it....

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-05 13:00 ` Willy TARREAU
  2003-10-05 14:11   ` David S. Miller
@ 2003-10-09 13:52   ` Marcelo Tosatti
  2003-10-10  0:13     ` Willy TARREAU
  1 sibling, 1 reply; 13+ messages in thread
From: Marcelo Tosatti @ 2003-10-09 13:52 UTC (permalink / raw)
  To: Willy TARREAU; +Cc: Marcelo Tosatti, andersen, linux-kernel, davem



On Sun, 5 Oct 2003, Willy TARREAU wrote:

> Hi Marcelo, all,
> 
> On Sun, Oct 05, 2003 at 09:42:30AM -0300, Marcelo Tosatti wrote:
> > In previous messages you said iproute used to compile on "olders" 2.4.x 
> > kernel but doesnt compile anymore on recent 2.4. Is that information 
> > correct ? 
> > 
> > Can you tell me in more detail what is failing?
> 
> Just tested, and I confirm this too :

Willy,

David seems to have fixed it. Mind trying to again with the latest BK 
tree?

Danke


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-09 13:52   ` Marcelo Tosatti
@ 2003-10-10  0:13     ` Willy TARREAU
  2003-10-10  5:45       ` David S. Miller
  0 siblings, 1 reply; 13+ messages in thread
From: Willy TARREAU @ 2003-10-10  0:13 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Willy TARREAU, andersen, linux-kernel, davem

Hi Marcelo,

On Thu, Oct 09, 2003 at 10:52:05AM -0300, Marcelo Tosatti wrote:
 
> David seems to have fixed it. Mind trying to again with the latest BK 
> tree?

I have just checked, but I still get the errors, although the patch looks fine
at first glance. I wondered whether I was doing something wrong, so I rechecked
and it compiles cleanly with 2.4.21, and does not since 2.4.22. Unfortunately,
I'm too tired to investigate more, so I should do it tomorrow. Here is the
compilation output, just in case it helps David. Please ask for .config if
needed, but I don't think so.

Cheers,
Willy

$ make KERNEL_INCLUDE=/usr/src/linux-2.4.23-pre6-20031009/include
make[1]: Entering directory `/data/src/net/ip-routing/iproute2-2.4.7-020116/lib'
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -I../include-glibc -I/usr/include/db3 -include ../include-glibc/glibc-bugs.h -I/usr/src/linux-2.4.23-pre6-20031009/include -I../include -DRESOLVE_HOSTNAMES   -c -o ll_map.o ll_map.c
In file included from ../include-glibc/netinet/in.h:7,
                 from ll_map.c:19:
/usr/src/linux-2.4.23-pre6-20031009/include/linux/in.h:141: field `gr_group' has incomplete type
/usr/src/linux-2.4.23-pre6-20031009/include/linux/in.h:147: field `gsr_group' has incomplete type
/usr/src/linux-2.4.23-pre6-20031009/include/linux/in.h:148: field `gsr_source' has incomplete type
/usr/src/linux-2.4.23-pre6-20031009/include/linux/in.h:154: field `gf_group' has incomplete type
/usr/src/linux-2.4.23-pre6-20031009/include/linux/in.h:157: field `gf_slist' has incomplete type
make[1]: *** [ll_map.o] Error 1
make[1]: Leaving directory `/data/src/net/ip-routing/iproute2-2.4.7-020116/lib'
make: *** [all] Error 2
$

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-10  0:13     ` Willy TARREAU
@ 2003-10-10  5:45       ` David S. Miller
  2003-10-10  6:50         ` Willy Tarreau
  0 siblings, 1 reply; 13+ messages in thread
From: David S. Miller @ 2003-10-10  5:45 UTC (permalink / raw)
  To: Willy TARREAU; +Cc: marcelo.tosatti, willy, andersen, linux-kernel

On Fri, 10 Oct 2003 02:13:52 +0200
Willy TARREAU <willy@w.ods.org> wrote:

> I'm too tired to investigate more, so I should do it tomorrow. Here is the
> compilation output, just in case it helps David. Please ask for .config if
> needed, but I don't think so.

I know what's wrong, linux/in.h needs to include linux/socket.h
Duh, I'll fix this up.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-10  5:45       ` David S. Miller
@ 2003-10-10  6:50         ` Willy Tarreau
  0 siblings, 0 replies; 13+ messages in thread
From: Willy Tarreau @ 2003-10-10  6:50 UTC (permalink / raw)
  To: David S. Miller; +Cc: Willy TARREAU, marcelo.tosatti, andersen, linux-kernel

Hi David,

On Thu, Oct 09, 2003 at 10:45:35PM -0700, David S. Miller wrote:
> On Fri, 10 Oct 2003 02:13:52 +0200
> Willy TARREAU <willy@w.ods.org> wrote:
> 
> > I'm too tired to investigate more, so I should do it tomorrow. Here is the
> > compilation output, just in case it helps David. Please ask for .config if
> > needed, but I don't think so.
> 
> I know what's wrong, linux/in.h needs to include linux/socket.h
> Duh, I'll fix this up.

You're right, it now compiles. Here's the patch :

diff -urN linux-2.4.23-pre7/include/linux/in.h linux-2.4.23-pre7-fix/include/linux/in.h
--- linux-2.4.23-pre7/include/linux/in.h	Fri Oct 10 08:47:15 2003
+++ linux-2.4.23-pre7-fix/include/linux/in.h	Fri Oct 10 08:49:20 2003
@@ -19,6 +19,7 @@
 #define _LINUX_IN_H
 
 #include <linux/types.h>
+#include <linux/socket.h>
 
 /* Standard well-defined IP protocols.  */
 enum {

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-05 14:11   ` David S. Miller
  2003-10-05 14:30     ` Mr. James W. Laferriere
@ 2003-10-24  3:34     ` YOSHIFUJI Hideaki / 吉藤英明
  2003-10-24 11:33       ` David S. Miller
  1 sibling, 1 reply; 13+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-10-24  3:34 UTC (permalink / raw)
  To: davem; +Cc: yoshfuji, netdev

In article <20031005071152.49c35297.davem@redhat.com> (at Sun, 5 Oct 2003 07:11:52 -0700), "David S. Miller" <davem@redhat.com> says:

> On Sun, 5 Oct 2003 15:00:44 +0200
> Willy TARREAU <willy@w.ods.org> wrote:
> 
> > /usr/src/linux/include/linux/in.h:147: field `gsr_group' has incomplete type
> 
> I'll happily fix this, thanks for reporting this.
> 
> Can you please in the future report such things on the networking
> development list netdev@oss.sgi.com?  Thanks.

I believe that 2.6 also needs this fix:

D: [NET]: Fix userland iproute2 build problems introduced by mcast changes.

===== include/linux/in.h 1.7 vs edited =====
--- 1.7/include/linux/in.h	Wed Apr 16 17:45:42 2003
+++ edited/include/linux/in.h	Fri Oct 24 11:39:37 2003
@@ -140,29 +140,29 @@
 
 struct group_req
 {
-	__u32			gr_interface;	/* interface index */
-	struct sockaddr_storage	gr_group;	/* group address */
+	__u32				 gr_interface;	/* interface index */
+	struct __kernel_sockaddr_storage gr_group;	/* group address */
 };
 
 struct group_source_req
 {
-	__u32			gsr_interface;	/* interface index */
-	struct sockaddr_storage	gsr_group;	/* group address */
-	struct sockaddr_storage	gsr_source;	/* source address */
+	__u32				 gsr_interface;	/* interface index */
+	struct __kernel_sockaddr_storage gsr_group;	/* group address */
+	struct __kernel_sockaddr_storage gsr_source;	/* source address */
 };
 
 struct group_filter
 {
-	__u32			gf_interface;	/* interface index */
-	struct sockaddr_storage	gf_group;	/* multicast address */
-	__u32			gf_fmode;	/* filter mode */
-	__u32			gf_numsrc;	/* number of sources */
-	struct sockaddr_storage	gf_slist[1];	/* interface index */
+	__u32				 gf_interface;	/* interface index */
+	struct __kernel_sockaddr_storage gf_group;	/* multicast address */
+	__u32				 gf_fmode;	/* filter mode */
+	__u32				 gf_numsrc;	/* number of sources */
+	struct __kernel_sockaddr_storage gf_slist[1];	/* interface index */
 };
 
 #define GROUP_FILTER_SIZE(numsrc) \
-	(sizeof(struct group_filter) - sizeof(struct sockaddr_storage) \
-	+ (numsrc) * sizeof(struct sockaddr_storage))
+	(sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \
+	+ (numsrc) * sizeof(struct __kernel_sockaddr_storage))
 
 struct in_pktinfo
 {
===== include/linux/socket.h 1.9 vs edited =====
--- 1.9/include/linux/socket.h	Tue May 13 06:35:19 2003
+++ edited/include/linux/socket.h	Fri Oct 24 11:42:52 2003
@@ -1,6 +1,21 @@
 #ifndef _LINUX_SOCKET_H
 #define _LINUX_SOCKET_H
 
+/*
+ * Desired design of maximum size and alignment (see RFC2553)
+ */
+#define _K_SS_MAXSIZE	128	/* Implementation specific max size */
+#define _K_SS_ALIGNSIZE	(__alignof__ (struct sockaddr *))
+				/* Implementation specific desired alignment */
+
+struct __kernel_sockaddr_storage {
+	unsigned short	ss_family;		/* address family */
+	/* Following field(s) are implementation specific */
+	char		__data[_K_SS_MAXSIZE - sizeof(unsigned short)];
+				/* space to achieve desired size, */
+				/* _SS_MAXSIZE value minus size of ss_family */
+} __attribute__ ((aligned(_K_SS_ALIGNSIZE)));	/* force desired alignment */
+
 #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
 
 #include <linux/config.h>		/* for CONFIG_COMPAT */
@@ -27,20 +42,7 @@
 	int		l_linger;	/* How long to linger for	*/
 };
 
-/*
- * Desired design of maximum size and alignment (see RFC2553)
- */
-#define _SS_MAXSIZE	128	/* Implementation specific max size */
-#define _SS_ALIGNSIZE	(__alignof__ (struct sockaddr *))
-				/* Implementation specific desired alignment */
-
-struct sockaddr_storage {
-	sa_family_t	ss_family;		/* address family */
-	/* Following field(s) are implementation specific */
-	char		__data[_SS_MAXSIZE - sizeof(sa_family_t)];
-				/* space to achieve desired size, */
-				/* _SS_MAXSIZE value minus size of ss_family */
-} __attribute__ ((aligned(_SS_ALIGNSIZE)));	/* force desired alignment */
+#define sockaddr_storage __kernel_sockaddr_storage
 
 /*
  *	As we do 4.4BSD message passing we use a 4.4BSD message passing

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: iproute2 not compiling anymore
  2003-10-24  3:34     ` YOSHIFUJI Hideaki / 吉藤英明
@ 2003-10-24 11:33       ` David S. Miller
  0 siblings, 0 replies; 13+ messages in thread
From: David S. Miller @ 2003-10-24 11:33 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki / _$B5HF#1QL@; +Cc: yoshfuji, netdev

On Fri, 24 Oct 2003 12:34:01 +0900 (JST)
YOSHIFUJI Hideaki / _$B5HF#1QL@ <yoshfuji@linux-ipv6.org> wrote:

> I believe that 2.6 also needs this fix:

Ok, applied.

Thanks.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-10-24 11:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-05 12:42 iproute2 not compiling anymore Marcelo Tosatti
2003-10-05 13:00 ` Willy TARREAU
2003-10-05 14:11   ` David S. Miller
2003-10-05 14:30     ` Mr. James W. Laferriere
2003-10-05 14:37       ` David S. Miller
2003-10-05 14:41         ` Mr. James W. Laferriere
2003-10-24  3:34     ` YOSHIFUJI Hideaki / 吉藤英明
2003-10-24 11:33       ` David S. Miller
2003-10-09 13:52   ` Marcelo Tosatti
2003-10-10  0:13     ` Willy TARREAU
2003-10-10  5:45       ` David S. Miller
2003-10-10  6:50         ` Willy Tarreau
2003-10-05 19:59 ` Erik Andersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.