Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't compile any kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tragor
Apprentice
Apprentice


Joined: 21 May 2003
Posts: 168
Location: Freiburg i.Br., Germany

PostPosted: Sat Aug 09, 2003 12:34 pm    Post subject: Can't compile any kernel Reply with quote

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
View user's profile Send private message
TooTallForPony
n00b
n00b


Joined: 13 Dec 2002
Posts: 45

PostPosted: Sat Aug 09, 2003 2:01 pm    Post subject: Looks like a kernel code bug? Reply with quote

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
View user's profile Send private message
tragor
Apprentice
Apprentice


Joined: 21 May 2003
Posts: 168
Location: Freiburg i.Br., Germany

PostPosted: Sat Aug 09, 2003 2:53 pm    Post subject: Re: Looks like a kernel code bug? Reply with quote

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
View user's profile Send private message
tragor
Apprentice
Apprentice


Joined: 21 May 2003
Posts: 168
Location: Freiburg i.Br., Germany

PostPosted: Sat Aug 09, 2003 6:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jeff Binder
Tux's lil' helper
Tux's lil' helper


Joined: 06 Dec 2002
Posts: 117
Location: RPI (Troy, NY, US, etc.)

PostPosted: Sat Aug 09, 2003 11:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
digital diesel
Tux's lil' helper
Tux's lil' helper


Joined: 28 Oct 2002
Posts: 111
Location: pittsburgh, pa

PostPosted: Sun Sep 21, 2003 3:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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