* cyclades.h in 2.6.9 use __iomem but don't include compiler.h
@ 2004-10-25 15:46 Andrei A. Voropaev
[not found] ` <20041025195342.GC23133@logos.cnet>
0 siblings, 1 reply; 3+ messages in thread
From: Andrei A. Voropaev @ 2004-10-25 15:46 UTC (permalink / raw)
To: linux-kernel
Hi!
I'm not sure if this is a bug or a feature. But in 2.6.9 cyclades.h have
different definition for struct cyclades_card. This definition uses
__iomem attribute which is defined in linux/compiler.h. This is not
included in cyclades.h, which leads to compilation problems for
util-linux package.
Andrei
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <20041025195342.GC23133@logos.cnet>]
* Re: cyclades.h in 2.6.9 use __iomem but don't include compiler.h [not found] ` <20041025195342.GC23133@logos.cnet> @ 2004-10-26 6:32 ` Andrei A. Voropaev 2004-10-26 8:32 ` Marcelo Tosatti 0 siblings, 1 reply; 3+ messages in thread From: Andrei A. Voropaev @ 2004-10-26 6:32 UTC (permalink / raw) To: Marcelo Tosatti; +Cc: linux-kernel On Mon, Oct 25, 2004 at 05:53:43PM -0200, Marcelo Tosatti wrote: > On Mon, Oct 25, 2004 at 05:46:45PM +0200, Andrei A. Voropaev wrote: > > Hi! > > > > I'm not sure if this is a bug or a feature. But in 2.6.9 cyclades.h have > > different definition for struct cyclades_card. This definition uses > > __iomem attribute which is defined in linux/compiler.h. This is not > > included in cyclades.h, which leads to compilation problems for > > util-linux package. > > Hi Andrei, > > cyclades.h should not do business with util-linux, only > the driver itself (cyclades.c) and the userspace configuration > utility (which now includes should linux/compiler.h accordingly > to define __iomem to NULL). Well. All I know is that util-linux has cytune utility that does not compile with 2.6.9 kernel headers. But compiles with older ones. > > What is the complete error message, and why is util-linux > including cyclades.h? > Here's the error message. cc -O2 -fomit-frame-pointer -I../lib -Wall -Wstrict-prototypes -DNCH=1 -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\" -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\" -DLOCALEDIR=\"/usr/share/locale\" -O2 -c cytune.c -o cytune.o cytune.c:58:86: linux/tqueue.h: No such file or directory In file included from cytune.c:61: /usr/include/linux/cyclades.h:514: error: variable or field `__iomem' declared void /usr/include/linux/cyclades.h:514: error: parse error before '*' token /usr/include/linux/cyclades.h:515: error: parse error before '*' token /usr/include/linux/cyclades.h:528: error: parse error before '}' token make[1]: *** [cytune.o] Error 1 make[1]: Leaving directory `/tools/src/util-linux-2.12b/sys-utils' make: *** [all] Error 1 The first problem with linux/tqueue.h happens because during config it tries to do it with only cyclades.h and fails on __iomem. So it decides to include tqueue.h. Only to make things worse. Here's the patch that I had to apply. diff -ur util-linux-2.12b/configure util-linux-2.12b-adj/configure --- util-linux-2.12b/configure 2004-08-25 02:32:19.000000000 +0200 +++ util-linux-2.12b-adj/configure 2004-10-25 19:43:29.259856848 +0200 @@ -367,6 +367,7 @@ # echo " #include <sys/types.h> +#include <linux/compiler.h> #include <linux/cyclades.h> int main(){ exit(0); } " > conftest.c diff -ur util-linux-2.12b/sys-utils/cytune.c util-linux-2.12b-adj/sys-utils/cytune.c --- util-linux-2.12b/sys-utils/cytune.c 2002-03-09 00:04:30.000000000 +0100 +++ util-linux-2.12b-adj/sys-utils/cytune.c 2004-10-25 19:44:27.892943264 +0200 @@ -58,6 +58,7 @@ #include <linux/tqueue.h> /* required for old kernels (for struct tq_struct) */ /* compilation errors on other kernels */ #endif +#include <linux/compiler.h> #include <linux/cyclades.h> #if 0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cyclades.h in 2.6.9 use __iomem but don't include compiler.h 2004-10-26 6:32 ` Andrei A. Voropaev @ 2004-10-26 8:32 ` Marcelo Tosatti 0 siblings, 0 replies; 3+ messages in thread From: Marcelo Tosatti @ 2004-10-26 8:32 UTC (permalink / raw) To: Andrei A. Voropaev; +Cc: linux-kernel On Tue, Oct 26, 2004 at 08:32:33AM +0200, Andrei A. Voropaev wrote: > On Mon, Oct 25, 2004 at 05:53:43PM -0200, Marcelo Tosatti wrote: > > On Mon, Oct 25, 2004 at 05:46:45PM +0200, Andrei A. Voropaev wrote: > > > Hi! > > > > > > I'm not sure if this is a bug or a feature. But in 2.6.9 cyclades.h have > > > different definition for struct cyclades_card. This definition uses > > > __iomem attribute which is defined in linux/compiler.h. This is not > > > included in cyclades.h, which leads to compilation problems for > > > util-linux package. > > > > Hi Andrei, > > > > cyclades.h should not do business with util-linux, only > > the driver itself (cyclades.c) and the userspace configuration > > utility (which now includes should linux/compiler.h accordingly > > to define __iomem to NULL). > > Well. All I know is that util-linux has cytune utility that does not > compile with 2.6.9 kernel headers. But compiles with older ones. Ah, that was news to me! I didnt knew the existant of such tool. Pardon me. > > What is the complete error message, and why is util-linux > > including cyclades.h? > > > > Here's the error message. > > cc -O2 -fomit-frame-pointer -I../lib -Wall -Wstrict-prototypes -DNCH=1 -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\" -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\" -DLOCALEDIR=\"/usr/share/locale\" -O2 -c cytune.c -o cytune.o > cytune.c:58:86: linux/tqueue.h: No such file or directory > In file included from cytune.c:61: > /usr/include/linux/cyclades.h:514: error: variable or field `__iomem' declared void > /usr/include/linux/cyclades.h:514: error: parse error before '*' token > /usr/include/linux/cyclades.h:515: error: parse error before '*' token > /usr/include/linux/cyclades.h:528: error: parse error before '}' token > make[1]: *** [cytune.o] Error 1 > make[1]: Leaving directory `/tools/src/util-linux-2.12b/sys-utils' > make: *** [all] Error 1 > > The first problem with linux/tqueue.h happens because during config it > tries to do it with only cyclades.h and fails on __iomem. So it decides > to include tqueue.h. Only to make things worse. > > Here's the patch that I had to apply. That works. Can you send this patch to the util-linux maintainer? > diff -ur util-linux-2.12b/configure util-linux-2.12b-adj/configure > --- util-linux-2.12b/configure 2004-08-25 02:32:19.000000000 +0200 > +++ util-linux-2.12b-adj/configure 2004-10-25 19:43:29.259856848 +0200 > @@ -367,6 +367,7 @@ > # > echo " > #include <sys/types.h> > +#include <linux/compiler.h> > #include <linux/cyclades.h> > int main(){ exit(0); } > " > conftest.c > diff -ur util-linux-2.12b/sys-utils/cytune.c util-linux-2.12b-adj/sys-utils/cytune.c > --- util-linux-2.12b/sys-utils/cytune.c 2002-03-09 00:04:30.000000000 +0100 > +++ util-linux-2.12b-adj/sys-utils/cytune.c 2004-10-25 19:44:27.892943264 +0200 > @@ -58,6 +58,7 @@ > #include <linux/tqueue.h> /* required for old kernels (for struct tq_struct) */ > /* compilation errors on other kernels */ > #endif > +#include <linux/compiler.h> > #include <linux/cyclades.h> > > #if 0 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-26 11:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-25 15:46 cyclades.h in 2.6.9 use __iomem but don't include compiler.h Andrei A. Voropaev
[not found] ` <20041025195342.GC23133@logos.cnet>
2004-10-26 6:32 ` Andrei A. Voropaev
2004-10-26 8:32 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox