Issues with linux-2.6.2
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
Quoted 7 lines · Alex Davis
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-i386ln -s/usr/include/asm-generic/usr/src/linux/include/asm-genericThis requirement was not mentioned in any documentation I could find.
No, because it is wrong. A very unwise thing to do.
Quoted 8 lines
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
(quoted diff) +0
-3-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 blockdevblockdev.c:70: error: parse error before '[' token blockdev.c:70: error: initializer element is not constant
And this is your punishment.
Andries
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" <[email protected]>
To: "Alex Davis" <[email protected]>
Cc: <[email protected]>
Sent: Friday, February 06, 2004 4:37 PM
Subject: Re: Issues with linux-2.6.2
Quoted 29 lines · Alex Davis
Quoted 8 lines
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-i386ln -s/usr/include/asm-generic/usr/src/linux/include/asm-genericThis requirement was not mentioned in any documentation I could find.
No, because it is wrong. A very unwise thing to do.
Quoted 8 lines
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
(quoted diff) +0
-3-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 blockdevblockdev.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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 2 lines · Mike Black
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.
Quoted 1 line
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.
Quoted 2 lines
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.
Quoted 1 line
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
Quoted 1 line · Alex Davis
I have a few issues with 2.6.2. Ths first issue is when upgrading from 2.4, I
had to create
Quoted 6 lines
the symlinks:
ln -s
/usr/include/asm/usr/src/linux/include/asm-i386ln -s/usr/include/asm-generic/usr/src/linux/include/asm-genericThis 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.
Quoted 7 lines
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
(quoted diff) +0
-3-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 blockdevblockdev.c:70: error: parse error before '[' token
See? We *TOLD* you not to do that. :)
Quoted 4 lines · On February 06, 2004 04:35 pm, [email protected] 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.