Click to See Complete Forum and Search --> : Compiling errors


raid517
01-08-2003, 09:27 PM
Hi I wondered if anyone could help me. I have just recently learned how to compile a kernel, however using Mandrake 9.0 I can never seem to complete the compiling process without errors. I have taken great care only to include drivers at part of my kernel when they are directly relevant to my system - and only loading the others that might be useful in the future as modules. I have also opted to try to make sure that I only use drivers/options that are relevant to me while ommiting completely anything that I explicitly do not need.
I couldn't get the official Mandrake 9.0 kernel to compile, so I tried with 2.4.19 form http://www.kernel.org/ - which after disabling almost everything except what I thought to be essential did work... I tried again with 2.5.9 (remember I'm a n00b so I don't know if this is Alpha or not) but it quit with an error:

gcc -D__KERNEL__ -I/usr/src/linux-2.5.9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -DKBUILD_BASENAME=ataraid -DEXPORT_SYMTAB -c ataraid.c
ataraid.c: In function `ataraid_make_request':
ataraid.c:105: structure has no member named `b_rdev'
ataraid.c: In function `ataraid_split_request':
ataraid.c:182: structure has no member named `b_rsector'
ataraid.c:193: warning: passing arg 1 of `generic_make_request' makes pointer from integer without a cast
ataraid.c:193: too many arguments to function `generic_make_request'
ataraid.c:194: warning: passing arg 1 of `generic_make_request' makes pointer from integer without a cast
ataraid.c:194: too many arguments to function `generic_make_request'
ataraid.c: In function `ataraid_init':
ataraid.c:249: `hardsect_size' undeclared (first use in this function)
ataraid.c:249: (Each undeclared identifier is reported only once
ataraid.c:249: for each function it appears in.)
ataraid.c:280: warning: passing arg 2 of `blk_queue_make_request' from incompatible pointer type
ataraid.c: In function `ataraid_exit':
ataraid.c:289: `hardsect_size' undeclared (first use in this function)
make[3]: *** [ataraid.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.9/drivers/ide'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.9/drivers/ide'
make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.9/drivers'
make: *** [_dir_drivers] Error 2
[root@localhost linux-2.5.9]#

Usually when trying to compile the Mandrake kernel it quits with errors such as ...error opening directory, no such file or directory... When I look for the stated missing files, they usually are indeed missing from the Mandrake source folder...

Can anyone explain why I would get such frequent and seemingly random errors? If Its a case that I must disable virtually all of the features included in the kernel (I never enable any of those features listed as 'experimental' anyway) then why are they included there as options?

Are such errors common place?

I have included my Mandrake configuration file below. The challenge I guess is to see if I have done anything screwy with this file and if while it doesn't compile on my machine, someone else can get the same file to compile on theirs... (BTW I am using an AMD machine if that's relevant). Any advice anyone can offer would be much appreciated.

Q


Ps

Please remove the .txt extension from the file if you do attempt to compile it... :)

raid517
01-08-2003, 09:28 PM
PS

On a semi seperate matter, isn't there such a thing as utility that can scan everything that is attached to my system and suggest an optimum set up from xconfig or xmenuconfig based on the capabilities of each particular kernel version and the individual profile the utility creates? Is this really such a hard thing for a programmer to do to design such a utility? The problem With Mandrake 9.0 default install is it turns off virtually all advanced features, like APCI and DMA - just so that very old systems can be supported too. This means that you must always recompile with each new install. Having an automatic configutation utility might help resolve possible problems with this process.. Just a thought...

mdwatts
01-09-2003, 07:22 AM
lspci

cat /proc/<device>

will list some of your hardware.

I would suggest you try either the 2.4.19 kernel again or the 2.4.20.

The 2.5 series is development and most have problems compiling. I have never had any luck compiling any of the 2.5 kernels and now just stick with the 2.4 series.

rid3r
01-09-2003, 11:44 AM
you can go you old working kernel
# cd /usr/src/your_old_kernel
# make mrproper -- not necessarily
# make oldconfig -- will generate a working configuration, you can compare to.
it's possble that Mandrake same as RedHat same as SuSE use somewhat customised kernels and patches.

raid517
01-09-2003, 03:21 PM
Originally posted by rid3r
you can go you old working kernel
# cd /usr/src/your_old_kernel
# make mrproper -- not necessarily
# make oldconfig -- will generate a working configuration, you can compare to.
it's possble that Mandrake same as RedHat same as SuSE use somewhat customised kernels and patches.

Yep I tried that and it worked a treat... At least then I knew what Mandrake would normally try to install, so all I did was change the APCI to turn it on and it worked like a treat... It seems That there are a lot of dependencies in the kernel that depend on the presence of what often seem other completely unrelated things. Mandrake wasn't happy untill it was able to install practically everything (mainly as modules) and unl;ess it could do so in a very specific way...
It comforting I guess, to at least know that others who are much more experienced than me have similar problems during compilation.... There is still some difficuty with the make oldconfig command as it doesn't seem to work on unmodified kernel versions. Then again neither does make xconfig... Nor the compilation process itself... I still think that it should be possible to build an application that would scan someone's system, then suggest a set up based on their specific system. You could present a user with a few set ups, such as 'desktop', 'workstation' or 'server' and allow users to make an appropriate selection.... Indeed since almost all of the process is a simple matter of cut and paste I fail to see why the entire comilation process can not be completely automated.... Two ot three clicks and it could be over... But then I am not a programmer... I am just a n00b... although I can't see the point of making things unecisarily complex...

But none the less thanks for all your help... I have leaned a great deal about Linux these last few days or so... :)

Q