[Preston] kernel build

Jonathan Atkinson preston at mailman.lug.org.uk
Sun Jan 5 16:53:01 2003


Chris,

Well, for a start you shouldn't compile from your home directory. When
you're compiling a kernel some or the older components of the kernel
expect to be living in /usr/src/linux, which is usually a symlink to
/usr/src/linux-X.X.X

Most newer modules don't have this problem, but it can cause problems
if you're compiling some of the older portions of the kernel. Check out
the KERNEL-HOWTO on linuxdoc.org for more information.

The real error you're getting here is 

> ide.c:1139: parse error before `if' 

Now, this is usually a bit of bad syntax, and errors like this
sometimes creep into the sources and are released to the public without
anyone noticing. Have a look at the file ide.c, line 1139, and look to
see if the preceding line is properly terminated (with a ';'
character). Of course, I can't see your kernel sources, so that is
about the only tip I can offer. Also, if you're trying to compile a
bleeding edge kernel, try downgrading, and if you're running some older
kernel sources, try upgrading. Kernel.org is your source for both of
these, but please don't forget to use a UK mirror ;-)

Hope some of this helps.

--Jon

--- chris <chris@info-web.org> wrote: > ok, for some strange reason i
felt the urge to rebuild my kernel this
> morning, and guess what, i fell into some problems, make config; make
> dep went fine, but when i went to make bzImage i came up with an
> error...
> 
> <snip>
> make[3]: Entering directory `/home/chris/linux-2.4.20/drivers/ide'
> gcc -D__KERNEL__ -I/home/chris/linux-2.4.20/include -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
> -fno-common
> -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686  
> -nostdinc -iwithprefix include -DKBUILD_BASENAME=ide  -DEXPORT_SYMTAB
> -c
> ide.c
> ide.c: In function `drive_cmd_intr':
> ide.c:1139: parse error before `if'
> make[3]: *** [ide.o] Error 1
> make[3]: Leaving directory `/home/chris/linux-2.4.20/drivers/ide'
> make[2]: *** [first_rule] Error 2
> make[2]: Leaving directory `/home/chris/linux-2.4.20/drivers/ide'
> make[1]: *** [_subdir_ide] Error 2
> make[1]: Leaving directory `/home/chris/linux-2.4.20/drivers'
> make: *** [_dir_drivers] Error 2ide.c: In function `drive_cmd_intr':
> ide.c:1139: parse error before `if'
> hedgehog:/home/chris/linux-2.4.20# 
> </snip>
> 
> So i go to the file:line where the compiler is having a problem, but
> seings i have no idea about C coding, i just get lost and go get
> myself
> a coffee lol.
> 
> <code>
> 1123:static ide_startstop_t drive_cmd_intr (ide_drive_t *drive)
> 1124:{
> 1125:        struct request *rq = HWGROUP(drive)->rq;
> 1126:        byte *args = (byte *) rq->buffer;
> 1127:        byte stat = GET_STAT();
> 1128:       int retries = 10;
> 1129:
> 1130:        ide__sti();     /* local CPU only */
> 1131:        if ((stat & DRQ_STAT) && args && args[3]) {
> 1132:                byte io_32bit = drive->io_32bit;
> 1133:                drive->io_32bit = 0;
> 1134:                ide_input_data(drive, &args[4], args[3] *
> SECTOR_WORDS);  
> 1135:                drive->io_32bit = io_32bit;
> 1136:                while (((stat = GET_STAT()) & BUSY_STAT) &&
> retries--)
> 1137:                        udelay(100);
> 1138:        }*
> 1139:        if ((!OK_STAT(stat, READY_STAT, BAD_STAT)
> 1140:        return ide_error(drive, "drive_cmd", stat); /* calls
> ide_end_drive_cmd */
> 1141:        ide_end_drive_cmd (drive, stat, GET_ERR());
> 1142:        return ide_stopped;
> 1143:
> 1144:}
> </code>
> 
> If anyone has some help i would greatly appreciate it :).
> 
> 
> 
> 
> _______________________________________________
> Preston mailing list
> Preston@mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/preston 

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com