View previous topic :: View next topic |
Author |
Message |
tragor Apprentice
Joined: 21 May 2003 Posts: 168 Location: Freiburg i.Br., Germany
|
Posted: Sat Aug 09, 2003 12:34 pm Post subject: Can't compile any kernel |
|
|
Hi guys,
as the Subject says: I can't get my kernel (actually I tried linux-2.4.20-gaming-r3 and linux-2.4.20-gentoo-r5) to compile . This is the error I get:
Code: |
super.c: In function `read_super_block':
super.c:869: Warnung: int format, long unsigned int arg (arg 2)
super.c:944:14: missing terminating " character
super.c: In function `reread_meta_blocks':
super.c:945: error: stray '\' in program
super.c:945: error: `ld' undeclared (first use in this function)
super.c:945: error: (Each undeclared identifier is reported only once
super.c:945: error: for each function it appears in.)
super.c:945: error: parse error before "n"
super.c:945:12: missing terminating " character
make[3]: *** [super.o] Fehler 1
make[3]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r5/fs/reiserfs'
make[2]: *** [first_rule] Fehler 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r5/fs/reiserfs'
make[1]: *** [_subdir_reiserfs] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r5/fs'
make: *** [_dir_fs] Fehler 2
|
I'm using gcc-3.3 and have glibc-2.3.2-r2 installed.
Would be glad for any help, 'cos I have to recompile the kernel for Promise Ultra100 controller support...
EDIT: OK I see that its not necessary for controller support - but still I want to be able to compile my kernel, wouldn't you?
Thx,
tragor |
|
Back to top |
|
|
TooTallForPony n00b
Joined: 13 Dec 2002 Posts: 45
|
Posted: Sat Aug 09, 2003 2:01 pm Post subject: Looks like a kernel code bug? |
|
|
Interesting - it looks like you've stumbled across a minor bug in the kernel code. If you cd to /usr/src/linux-2.4.20-gentoo-r5/fs/reiserfs and edit super.c, you'll see that lines 944-945 in reread_meta_blocks() look like this:
printk("reread_meta_blocks, error reading bitmap block number %d at
%ld\n", i, SB_AP_BITMAP(s)[i].bh->b_blocknr) ;
The bug here is in the line break between at and %ld. The newest versions of gcc spit out an error if there's an unmarked line break within a string. To fix it, just add a \ at the end of the first line, so gcc knows the string continues on to the next line. Or use a newer kernel - this problem seems to be fixed in 2.4.21. |
|
Back to top |
|
|
tragor Apprentice
Joined: 21 May 2003 Posts: 168 Location: Freiburg i.Br., Germany
|
Posted: Sat Aug 09, 2003 2:53 pm Post subject: Re: Looks like a kernel code bug? |
|
|
Thanks for the answer!
TooTallForPony wrote: | Interesting - it looks like you've stumbled across a minor bug in the kernel code. If you cd to /usr/src/linux-2.4.20-gentoo-r5/fs/reiserfs and edit super.c, you'll see that lines 944-945 in reread_meta_blocks() look like this:
printk("reread_meta_blocks, error reading bitmap block number %d at
%ld\n", i, SB_AP_BITMAP(s)[i].bh->b_blocknr) ;
The bug here is in the line break between at and %ld. The newest versions of gcc spit out an error if there's an unmarked line break within a string. To fix it, just add a \ at the end of the first line, so gcc knows the string continues on to the next line. Or use a newer kernel - this problem seems to be fixed in 2.4.21. |
I will try out a newer version if its stable, I think ... I can't recall, what error I got from compiling the gaming source. But it's strange that there was a bug too, no?
tragor |
|
Back to top |
|
|
tragor Apprentice
Joined: 21 May 2003 Posts: 168 Location: Freiburg i.Br., Germany
|
Posted: Sat Aug 09, 2003 6:34 pm Post subject: |
|
|
So I could not find the 2.4.21 - is there a ebuild for it?
So I tried to fix the bug myself as suggested. Now I get another error further down the compilation:
Code: |
In file included from ide-cd.c:320:
ide-cd.h:440: error: long, short, signed or unsigned used invalidly for `slot_tablelen'
make[2]: *** [ide-cd.o] Fehler 1
make[2]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'
make[1]: *** [_modsubdir_ide] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers'
make: *** [_mod_drivers] Fehler 2
|
So why is that? Another simple error that can be fixed? Or may I have a more serious problem?
Thanks for help,
tragor |
|
Back to top |
|
|
Jeff Binder Tux's lil' helper
Joined: 06 Dec 2002 Posts: 117 Location: RPI (Troy, NY, US, etc.)
|
Posted: Sat Aug 09, 2003 11:19 pm Post subject: |
|
|
tragor wrote: | So I could not find the 2.4.21 - is there a ebuild for it? |
emerge vanilla-sources
If you're still getting 2.4.20 from that, you need to run `emerge rsync' to update your copy of the Portage database.
tragor wrote: | So I tried to fix the bug myself as suggested. Now I get another error further down the compilation:
Code: |
In file included from ide-cd.c:320:
ide-cd.h:440: error: long, short, signed or unsigned used invalidly for `slot_tablelen'
make[2]: *** [ide-cd.o] Fehler 1
make[2]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'
make[1]: *** [_modsubdir_ide] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers'
make: *** [_mod_drivers] Fehler 2
|
So why is that? Another simple error that can be fixed? Or may I have a more serious problem? |
2.4.21 changes that line from `__u8 short slot_tablelen;' to `__u16 slot_tablelen;', which is presumably the right fix. _________________ Anyone who attributes a quote to themself is a pompous fool.
--me |
|
Back to top |
|
|
digital diesel Tux's lil' helper
Joined: 28 Oct 2002 Posts: 111 Location: pittsburgh, pa
|
Posted: Sun Sep 21, 2003 3:15 am Post subject: |
|
|
man that line (944) in /usr/portage/fs/reiserfs/super.c was KILLING ME!!! thanks for the solution.
"oh mighty open source, how we adore you"
I just added the back slash and everything compiled fine! THANK GOD |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|