Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28324 - Unable to build kernel due to ide-cd
Summary: Unable to build kernel due to ide-cd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-09 22:03 UTC by Mark Knecht
Modified: 2003-09-11 16:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
gcc33 fix (992_gcc33_compile_fixes,7.88 KB, patch)
2003-09-10 14:40 UTC, Jay Pfeifer (RETIRED)
Details | Diff
gcc 3.3 fix file (gcc_3_3-fixes.diff,2.32 KB, patch)
2003-09-10 17:08 UTC, Mark Knecht
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Knecht 2003-09-09 22:03:01 UTC
Shown below. 

I also unmerged and reemerged the Gentoo sources, but it still occurs. 

I built a kernel yesterday and it worked. Today I was attempting to turn on APM
and rtc support and this happened, however I tried turning those back off and it
didn't fix it.

I did an emerge --deep --update world today. It updated maybe 4-5 things I think.

Reproducible: Always
Steps to Reproduce:
1. emerge gentoo-sources-2.4.20-r6
2. cp /home/mark/.config .config
3. make xconfig and save config
4) emerge dep clean bzImage

Actual Results:  
make[3]: Entering directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide  -DEXPORT_SYMTAB -c ide.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_features  -DEXPORT_SYMTAB
-c ide-features.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_taskfile  -DEXPORT_SYMTAB
-c ide-taskfile.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_adma  -c -o ide-adma.o
ide-adma.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_dma  -c -o ide-dma.o ide-dma.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_pci  -c -o ide-pci.o ide-pci.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=piix  -c -o piix.o piix.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=via82cxxx  -c -o via82cxxx.o
via82cxxx.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_proc  -c -o ide-proc.o
ide-proc.c
ld -m elf_i386 -r -o ide-mod.o ide.o ide-features.o ide-taskfile.o  ide-adma.o
ide-dma.o ide-pci.o piix.o via82cxxx.o ide-proc.o
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_probe  -DEXPORT_SYMTAB -c
ide-probe.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_geometry  -c -o
ide-geometry.o ide-geometry.c
ld -m elf_i386 -r -o ide-probe-mod.o ide-probe.o ide-geometry.o
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_disk  -c -o ide-disk.o
ide-disk.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_cd  -c -o ide-cd.o ide-cd.c
In file included from ide-cd.c:320:
ide-cd.h:440: error: long, short, signed or unsigned used invalidly for
`slot_tablelen'
make[3]: *** [ide-cd.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'
make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers'
make: *** [_dir_drivers] Error 2
Wizard linux # 

Expected Results:  
I expect it to build the kernel.
Comment 1 SpanKY gentoo-dev 2003-09-09 22:10:35 UTC
did you `make mrproper` and try again ?
Comment 2 Mark Knecht 2003-09-10 07:25:05 UTC
I completely removed the installed sources, (rm -R /usr/src/linux-2.4.20-r6)  re-emerged gentoo-sources, and loaded my existing .config file into /usr/src/linux. I tried to treat it like I was building a completely new machine but it still failed.

I did not do mrproper specifically.

The only thing that was saved across build attempts was the .config file I was using. Could this cause a problem? I've been trying to move up from 2.4.20-r2 to 2.4.20-r6. I got one good build the first time I used the r6 sources, but now I'm not able to.

Please tell me the steps I should take (I'm not a programmer) to use mrproper and I'll give it a try. I'm doing:

make xconfig
make dep clean bzImage modules modules_install

and copying the bzImage file over by hand.

Currently the build is failing at the bzImage step I believe.
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2003-09-10 08:52:25 UTC
Please change '__u8 short slot_tablelen;' to '__u16 slot_tablelen;' on line 440 of drivers/ide/ide-cd.h, and recompile.
Comment 4 Mark Knecht 2003-09-10 09:59:41 UTC
Sorry. Still failing:

From drivers/ide/ide-cd.h:
#error "Please fix <asm/byteorder.h>"
#endif

        byte     curlba[3];
        byte     nslots;
        __u16 short slot_tablelen;
};
<SNIP>

The error message I'm still getting.

gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp   -nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_cd  -c -o ide-cd.o ide-cd.c
In file included from ide-cd.c:320:
ide-cd.h:440: error: long, short, signed or unsigned used invalidly for `slot_tablelen'
make[3]: *** [ide-cd.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/ide'
make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers'
make: *** [_dir_drivers] Error 2
Wizard linux # 


Additionally I just did:
mv .config ../MWK.config
make mrproper
mv ../MWK.config .config
make menuconfig and immediately save
make dep clean bzImage

and it failed the same way.

I'll switch the file back to 8 from 16 for now.


I have just received an email from matt@lpbproductions.com asking me to apply a patch and see if it helps. I need isntructions (sorry, not a programmer) on how to properly apply the patch, but I'm happy to try. I have not looked at the patch file yet to see what it attempts to do.
Comment 5 Mark Knecht 2003-09-10 10:15:34 UTC
MY MISTAKE!! SORRY!! I didn't see I had to remove the 'short'. 

Now it passes that step, but then fails compiling my Ethernet driver:

gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r6/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon-xp  -DDBG=0 -nostdinc -iwithprefix include -DKBUILD_BASENAME=b44um  -c -o b44um.o b44um.c
b44um.c:505:46: pasting "->" and "intstatus" does not give a valid preprocessing token
b44um.c:506:51: pasting "->" and "gptimer" does not give a valid preprocessing token
make[4]: *** [b44um.o] Error 1
make[4]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/net/bcm4400'
make[3]: *** [first_rule] Error 2
make[3]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/net/bcm4400'
make[2]: *** [_subdir_bcm4400] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers/net'
make[1]: *** [_subdir_net] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r6/drivers'
make: *** [_dir_drivers] Error 2
Wizard linux # 
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2003-09-10 12:58:25 UTC
Remove the "##" in line 1082 and line 1085 of drivers/net/bcm4400/b44.h and things should work :-)
Comment 7 Mark Knecht 2003-09-10 14:06:47 UTC
OK, with this change and one other provided by Matt in an email

(reiserfs/super.c line broken)

I have now got a kernel! Thanks.

Now to work on modules.

Can someone fill me in on why this is happening?

Thanks!
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2003-09-10 14:32:25 UTC
> ... "other change" ...

Can you please stick that into this bug so we can have a look at why that happens?

> Why is this happening?

This looks like a compiler/system config/corruption (?) problem or an optimization problem. Can you please:

A) Remove any CPU optimizations you might be using and see if an
   unpatched version works. [make.conf]

B) Else ...

    * Remerge linux-headers, glibc, gcc
    * Remerge the kernel and recompile it: see if this still happens...

Please report back with any results, ...
Comment 9 Jay Pfeifer (RETIRED) gentoo-dev 2003-09-10 14:33:34 UTC
this is gcc 3.3 related... lemme post the fix. 
Comment 10 Jay Pfeifer (RETIRED) gentoo-dev 2003-09-10 14:40:06 UTC
Created attachment 17463 [details, diff]
gcc33 fix

try it out
Comment 11 Jay Pfeifer (RETIRED) gentoo-dev 2003-09-10 14:40:52 UTC
patch -p1 -s -N -E -d /usr/src/linux-2.4.20-gentoo-r6/ < 
992_gcc33_compile_fixes 
 
that should patch it... 
Comment 12 Mark Knecht 2003-09-10 17:08:43 UTC
Created attachment 17474 [details, diff]
gcc 3.3 fix file 

The attached file came from matt@lpbproductions.com
Comment 13 Mark Knecht 2003-09-10 17:11:31 UTC
Comment on attachment 17474 [details, diff]
gcc 3.3 fix file 

In response to your request. It didn't work due to paths in the patch file, but
I was able to fix things by hand. I'll try your patch file next.
Comment 14 Jay Pfeifer (RETIRED) gentoo-dev 2003-09-10 17:43:05 UTC
hmmm. the patch i attached applies cleanly to a gentoo-sources-2.4.20-r6 tree 
on my machine. anyhow, please give feedback. 
Comment 15 Mark Knecht 2003-09-10 17:50:08 UTC
patch -p1 -s -N -E -d /usr/src/linux-2.4.20-gentoo-r6/ < 
992_gcc33_compile_fixes 

applies cleanly. Sorry for the confusion. It was the patch file I supplied form Matt that did not.

This fixes all of my problems. The new kernel is up:

bash-2.05b$ uname -a
Linux Wizard 2.4.20-gentoo-r6 #6 Wed Sep 10 17:13:29 PDT 2003 i686 AMD Athlon(TM) XP 2600+ AuthenticAMD GNU/Linux

I emerged xfree-drm and am getting good frame rates:

bash-2.05b$ glxgears 
8464 frames in 5.0 seconds = 1692.800 FPS
10034 frames in 5.0 seconds = 2006.800 FPS
10034 frames in 5.0 seconds = 2006.800 FPS
10034 frames in 5.0 seconds = 2006.800 FPS

bash-2.05b$ 

I've emerged in my special version of alsa-drivers and have sound. Also I fixed my 'no module found for /dev/rtc' problem, and also fixed my shutdown problem where te machine appeared to shut down but the fan didn't turn off.

As far as I can tell this is perfect for me. Thanks for all the help and fast support. Amazing!

Cheers,
Mark
Comment 16 Jay Pfeifer (RETIRED) gentoo-dev 2003-09-10 18:47:05 UTC
good to hear you are up and running. 
 
closing as per user. 
Comment 17 Tim Yamin (RETIRED) gentoo-dev 2003-09-11 08:50:21 UTC
Mark, does it compile with my fix in the BCM4400x driver or does it work without it as well [but with the gcc33 patch]?
Comment 18 Mark Knecht 2003-09-11 09:47:39 UTC
Hi,
   Do you mean the one where you told me to "Remove the "##" in line 1082 and line 1085 of drivers/net/bcm4400/b44.h and things should work"?  You know, I probably did forget to back that one back out before I applied the patch file called 992_gcc33_compile_fixes. (gcc33_fix in the attachemnts area above) As far as I know that patch file, and possibly the removal of the ## in b44.h by hand, were enough to get it to compile.

   Sorry for the confusion here. As I said, I'm not a programmer and fairly new to Gentoo, so sometimes I make these sorts of mistakes. (Learning...)

   Would it be helpful for me to emerge -C gentoo-sources and do it again from scratch? I'm happy to give it a go if it's helpful to someone.
Comment 19 Jay Pfeifer (RETIRED) gentoo-dev 2003-09-11 13:23:32 UTC
give it a bit, 2.4.20-r7 will be out by either plasmaroo or iggy today. it 
will have the gcc3.3 fixes 
 
Jay 
Comment 20 Tim Yamin (RETIRED) gentoo-dev 2003-09-11 14:11:11 UTC
-r7 is in CVS now...
Comment 21 Mark Knecht 2003-09-11 14:49:29 UTC
OK, I've emerged a copy of -r7 and will build it in the next hour or so. Just double checking - it is OK to use my -r6 .config file, isn't it? I'll load it in make xconfig and save it, and then build to make sure everythign is OK for me.

thanks
Comment 22 Tim Yamin (RETIRED) gentoo-dev 2003-09-11 14:53:57 UTC
Yes, -r7 was only bumped so that people have a kernel with a GCC3.3 patch in case they upgrade GCC.
Comment 23 Jay Pfeifer (RETIRED) gentoo-dev 2003-09-11 14:54:07 UTC
yeah. just put the .config in place and do a 'make oldconfig' 
Comment 24 Mark Knecht 2003-09-11 15:15:48 UTC
-r7 just built and it seems to have installed cleanly for me. It will be later this evening before I can reboot the machine. If I have any trouble with the kernel I'll let you know, but I expect it will be fine.

Thanks to all for such great responses and help! As an end-user type I really appreciated how down to earth everyone's responses were to me. Thanks!
Comment 25 Mark Knecht 2003-09-11 16:08:12 UTC
OK, reboot complete. xfree-drm and my special patched alsa-driver package re-emerged succeaafully. Frame rate is good and I have both Alsa and Jack-based sound. Networking looks good. USB devices are operating. Need to check 1394, but I haven't been using that recently so it'll likely be a day or two.

Thanks very much everybody. Very successful.