The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Issues with linux-2.6.2
@ 2004-02-06 21:21 Alex Davis
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Davis @ 2004-02-06 21:21 UTC (permalink / raw)
  To: linux-kernel

 
 

=====
I code, therefore I am

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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

* Issues with linux-2.6.2
@ 2004-02-06 21:22 Alex Davis
  2004-02-06 21:35 ` Valdis.Kletnieks
  2004-02-06 21:37 ` Andries Brouwer
  0 siblings, 2 replies; 8+ messages in thread
From: Alex Davis @ 2004-02-06 21:22 UTC (permalink / raw)
  To: linux-kernel

I have a few issues with 2.6.2. Ths first issue is when upgrading from 2.4, I had to create 
the symlinks:

   ln -s /usr/include/asm /usr/src/linux/include/asm-i386
   ln -s /usr/include/asm-generic /usr/src/linux/include/asm-generic

This requirement was not mentioned in any documentation I could find.

The second issue is when trying to build util-linux-2.11z I get the following error:

cc -pipe -O2 -mcpu=i486 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes
-Wstrict-prototypes -I/usr/include/ncurses -DNCH=0   -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\"
-DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\"
-DLOCALEDIR=\"/usr/share/locale\" -O2  -s  blockdev.c   -o blockdev
blockdev.c:70: error: parse error before '[' token
blockdev.c:70: error: initializer element is not constant
blockdev.c:70: error: (near initialization for `bdcms[4].ioc')
blockdev.c:70: error: initializer element is not constant
blockdev.c:70: error: (near initialization for `bdcms[4]')
blockdev.c:73: error: parse error before '[' token
blockdev.c:73: error: initializer element is not constant
blockdev.c:73: error: (near initialization for `bdcms[5].ioc')
blockdev.c:73: error: initializer element is not constant
blockdev.c:73: error: (near initialization for `bdcms[5]')
blockdev.c:76: error: initializer element is not constant
blockdev.c:76: error: (near initialization for `bdcms[6]')
blockdev.c:79: error: initializer element is not constant
blockdev.c:79: error: (near initialization for `bdcms[7]')
blockdev.c:82: error: initializer element is not constant
blockdev.c:82: error: (near initialization for `bdcms[8]')
blockdev.c:85: error: initializer element is not constant
blockdev.c:85: error: (near initialization for `bdcms[9]')
blockdev.c:89: error: initializer element is not constant
blockdev.c:89: error: (near initialization for `bdcms[10]')
blockdev.c: In function `report_device':
blockdev.c:331: error: parse error before '[' token
make: *** [blockdev] Error 1

It seems there is a problem with the BLKBSZGET and the BLKBSZSET macros defined in
linux/include/linux/fs.h.
They both indirectly call the _IOC_TYPECHECK macro, which is defined in
linux/include/asm-386/ioctl.h thusly:

#define _IOC_TYPECHECK(t) \
	((sizeof(t) == sizeof(t[1]) && \
	  sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
	  sizeof(t) : __invalid_size_argument_for_IOC)


The problem is that _IOC_TYPECHECK is being called with a constant value (size_t), making the 
array indexing attempt illegal. Using gcc -E, BLKBSZGET expands to:
(((2U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((112)) << 0) | (((((sizeof(sizeof(int)) == 
sizeof(sizeof(int)[1]) && sizeof(sizeof(int)) < (1 << 14)) ? sizeof(sizeof(int)) : 
       ^^^^^^^^^^^^^^  // illegal.
__invalid_size_argument_for_IOC))) << ((0 +8)+8))) 

Is this a known problem?

=====
I code, therefore I am

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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

* Re: Issues with linux-2.6.2
  2004-02-06 21:22 Issues with linux-2.6.2 Alex Davis
@ 2004-02-06 21:35 ` Valdis.Kletnieks
  2004-02-09 22:09   ` Ed Tomlinson
  2004-02-06 21:37 ` Andries Brouwer
  1 sibling, 1 reply; 8+ messages in thread
From: Valdis.Kletnieks @ 2004-02-06 21:35 UTC (permalink / raw)
  To: Alex Davis; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]

On Fri, 06 Feb 2004 13:22:05 PST, Alex Davis <alex14641@yahoo.com>  said:
> I have a few issues with 2.6.2. Ths first issue is when upgrading from 2.4, I
 had to create 
> the symlinks:
> 
>    ln -s /usr/include/asm /usr/src/linux/include/asm-i386
>    ln -s /usr/include/asm-generic /usr/src/linux/include/asm-generic
> 
> This requirement was not mentioned in any documentation I could find.

That requirement isn't mentioned because it's an *anti*-requirement.

Don't Do That.  Install what your distro uses for 'glibc-kernheaders' instead.

> The second issue is when trying to build util-linux-2.11z I get the following error:
> 
> cc -pipe -O2 -mcpu=i486 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes
> -Wstrict-prototypes -I/usr/include/ncurses -DNCH=0   -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\"
> -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\"
> -DLOCALEDIR=\"/usr/share/locale\" -O2  -s  blockdev.c   -o blockdev
> blockdev.c:70: error: parse error before '[' token

See? We *TOLD* you not to do that. :)

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

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

* Re: Issues with linux-2.6.2
  2004-02-06 21:22 Issues with linux-2.6.2 Alex Davis
  2004-02-06 21:35 ` Valdis.Kletnieks
@ 2004-02-06 21:37 ` Andries Brouwer
  2004-02-09 17:41   ` Mike Black
  1 sibling, 1 reply; 8+ messages in thread
From: Andries Brouwer @ 2004-02-06 21:37 UTC (permalink / raw)
  To: Alex Davis; +Cc: linux-kernel

On Fri, Feb 06, 2004 at 01:22:05PM -0800, Alex Davis wrote:

> I have a few issues with 2.6.2. Ths first issue is when upgrading from 2.4, I had to create 
> the symlinks:
> 
>    ln -s /usr/include/asm /usr/src/linux/include/asm-i386
>    ln -s /usr/include/asm-generic /usr/src/linux/include/asm-generic
> 
> This requirement was not mentioned in any documentation I could find.

No, because it is wrong. A very unwise thing to do.

> The second issue is when trying to build util-linux-2.11z I get the following error:
> 
> cc -pipe -O2 -mcpu=i486 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes
> -Wstrict-prototypes -I/usr/include/ncurses -DNCH=0   -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\"
> -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\"
> -DLOCALEDIR=\"/usr/share/locale\" -O2  -s  blockdev.c   -o blockdev
> blockdev.c:70: error: parse error before '[' token
> blockdev.c:70: error: initializer element is not constant

And this is your punishment.

Andries

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

* Re: Issues with linux-2.6.2
  2004-02-06 21:37 ` Andries Brouwer
@ 2004-02-09 17:41   ` Mike Black
  2004-02-09 18:59     ` Andries Brouwer
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Black @ 2004-02-09 17:41 UTC (permalink / raw)
  To: Andries Brouwer, Alex Davis; +Cc: linux-kernel

So what's the fix?
I'm trying to recompile util-linux-2.12 on Linux 2.6.2 and getting the same error as Alex.
I'm using linux-libc-headers-2.6.1.3 -- but they don't bother to say how to install them (and I assume they will work for Linux
2.6.2).
And all this is to try and get rid of the "mount version older than kernel" message.

I suppose there's a jolly good reason for splitting the headers but it seems to just present more opportunity to hork things up.

----- Original Message ----- 
From: "Andries Brouwer" <aebr@win.tue.nl>
To: "Alex Davis" <alex14641@yahoo.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Friday, February 06, 2004 4:37 PM
Subject: Re: Issues with linux-2.6.2


> On Fri, Feb 06, 2004 at 01:22:05PM -0800, Alex Davis wrote:
>
> > I have a few issues with 2.6.2. Ths first issue is when upgrading from 2.4, I had to create
> > the symlinks:
> >
> >    ln -s /usr/include/asm /usr/src/linux/include/asm-i386
> >    ln -s /usr/include/asm-generic /usr/src/linux/include/asm-generic
> >
> > This requirement was not mentioned in any documentation I could find.
>
> No, because it is wrong. A very unwise thing to do.
>
> > The second issue is when trying to build util-linux-2.11z I get the following error:
> >
> > cc -pipe -O2 -mcpu=i486 -fomit-frame-pointer -I../lib -Wall -Wmissing-prototypes
> > -Wstrict-prototypes -I/usr/include/ncurses -DNCH=0   -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\"
> > -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\"
> > -DLOCALEDIR=\"/usr/share/locale\" -O2  -s  blockdev.c   -o blockdev
> > blockdev.c:70: error: parse error before '[' token
> > blockdev.c:70: error: initializer element is not constant
>
> And this is your punishment.
>
> Andries
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


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

* Re: Issues with linux-2.6.2
@ 2004-02-09 17:57 Alex Davis
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Davis @ 2004-02-09 17:57 UTC (permalink / raw)
  To: linux-kernel

Recently, Andries Brouwer <aebr () win ! tue ! nl> replied

>And this is your punishment.

Was your response meant to be helpful?? In my opinion it wasn't?
Do you have a solution?

Thanks

-Alex

=====
I code, therefore I am

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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

* Re: Issues with linux-2.6.2
  2004-02-09 17:41   ` Mike Black
@ 2004-02-09 18:59     ` Andries Brouwer
  0 siblings, 0 replies; 8+ messages in thread
From: Andries Brouwer @ 2004-02-09 18:59 UTC (permalink / raw)
  To: Mike Black; +Cc: Andries Brouwer, Alex Davis, linux-kernel

On Mon, Feb 09, 2004 at 12:41:37PM -0500, Mike Black wrote:

> I'm trying to recompile util-linux-2.12 on Linux 2.6.2 and getting
> the same error as Alex.

The kernel is highly backwards compatible. It must be. It would be bad
if all old binaries suddenly stopped working.

It follows that if you translate with old headers, you get binaries that
work, but possibly do not use the latest features.


> I'm using linux-libc-headers-2.6.1.3

Using headers that are newer than the software you are compiling
can hardly improve things.


> And all this is to try and get rid of the "mount version older than kernel"
> message.

Well, the message is right: Linux 2.6.2 has NFS_MOUNT_VERSION 5
and util-linux-2.12 has NFS_MOUNT_VERSION 4.


> So what's the fix?

There are two fixes:

On the one hand that kernel message is a bug - each time we go to a
new NFS version lots of people waste a lot of time worrying about
this unfortunate kernel message, and mount has to spend guessing
the kernel version in order to avoid that message.
So, #if 0 that message and/or submit a patch removing it.

On the other hand, util-linux could use a new release.
Tell the maintainer :-)

Andries

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

* Re: Issues with linux-2.6.2
  2004-02-06 21:35 ` Valdis.Kletnieks
@ 2004-02-09 22:09   ` Ed Tomlinson
  0 siblings, 0 replies; 8+ messages in thread
From: Ed Tomlinson @ 2004-02-09 22:09 UTC (permalink / raw)
  To: Alex Davis; +Cc: linux-kernel

On February 06, 2004 04:35 pm, Valdis.Kletnieks@vt.edu wrote:
> That requirement isn't mentioned because it's an *anti*-requirement.
>
> Don't Do That.  Install what your distro uses for 'glibc-kernheaders'
> instead.

Your solution is above.

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

end of thread, other threads:[~2004-02-09 22:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-06 21:22 Issues with linux-2.6.2 Alex Davis
2004-02-06 21:35 ` Valdis.Kletnieks
2004-02-09 22:09   ` Ed Tomlinson
2004-02-06 21:37 ` Andries Brouwer
2004-02-09 17:41   ` Mike Black
2004-02-09 18:59     ` Andries Brouwer
  -- strict thread matches above, loose matches on Subject: below --
2004-02-09 17:57 Alex Davis
2004-02-06 21:21 Alex Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox