[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Error compiling 2.6.8 kernel for amd64 - cannot find pci.h



Erik Mouw <erik@harddisk-recovery.com> writes:

> On Wed, Jul 20, 2005 at 04:51:49AM -0700, Gregory Margo wrote:
>> On Wed, Jul 20, 2005 at 12:39:23PM +0200, Erik Mouw wrote:
>> > On Wed, Jul 20, 2005 at 03:31:13AM -0700, Gregory Margo wrote:
>> > When using a config from a different kernel, you should use "make
>> > oldconfig" before running "make {menu|x|g|k}config".
>> 
>> I didn't do anything special, the "make menuconfig" step grabbed
>> the config file to use as defaults.  Just to verify, I did
>> "make menuconfig" again (on a clean build dir) followed by a
>> "make oldconfig".  The resulting .config file (from both steps)
>> is identical to /boot/config-2.6.8-11-em64t-p4-smp.
>
> The idea is to run "make oldconfig" before "menuconfig". Menuconfig
> sometimes leaves the .config file in an illegal state and als can get
> confused at strange .config files, oldconfig fixes that.
>
>> > Not enough information. Please run "make V=1 O=..." and post the
>> > complete error including the gcc command that was used to compile
>> > mmconfig.c.
>> > 
>> 
>> 
>> Now compiling with the V=1 option ...
>> I think I see the problem ...
>> 
>> Here is the gcc command line.  Note that the extra include path
>> added by the Makefile in arch/x86_64/pci has a space between the
>> -I and the arch/i386/pci.
>> 
>> 
>>   gcc -Wp,-MD,arch/x86_64/pci/.mmconfig.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/gm/kernel-source-2.6.8.work/include -I/usr/src/gm/kernel-source-2.6.8.work/arch/x86_64/pci -Iarch/x86_64/pci -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -march=nocona -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -O2 -fomit-frame-pointer -I/usr/src/gm/kernel-source-2.6.8.work/ -I arch/i386/pci  -DKBUILD_BASENAME=mmconfig -DKBUILD_MODNAME=mmconfig -c -o arch/x86_64/pci/.tmp_mmconfig.o /usr/src/gm/kernel-source-2.6.8.work/arch/x86_64/pci/mmconfig.c
>> 
>> 
>> I'll try changing arch/x86_64/pci/Makefile to remove that space ... Works!
>> 
>> Here is the patch I applied to the Makefile:
>> 
>> --- arch/x86_64/pci/Makefile.00 2004-08-13 22:36:17.000000000 -0700
>> +++ arch/x86_64/pci/Makefile    2005-07-20 04:15:13.147922899 -0700
>> @@ -3,7 +3,7 @@
>>  #
>>  # Reuse the i386 PCI subsystem
>>  #
>> -CFLAGS += -I arch/i386/pci
>> +CFLAGS += -Iarch/i386/pci
>>  
>>  obj-y          := i386.o
>>  obj-$(CONFIG_PCI_DIRECT)+= direct.o
>> 
>> 
>> How can it be that the shipped kernel source is not compilable?
>> Makes me wonder what else is different.
>
> Just checked: the 2.6.8.1 kernel from kernel.org contains the same
> error. The 2.6.10 tree I have over here doesn't have that error, so
> it's fixed somewhere between 2.6.8 and 2.6.10.
>
>> Now I will go on to the make-kpkg step and then try booting on
>> this kernel.
>
> Don't know if it's still relevant, but maybe you should file a bug
> against the package. If you're using a kernel.org kernel, you should
> use the latest stable version (2.6.12.3 at time of writing).
>
>
> Erik

For 2.6.8 amd64 still has its own kernel-image source and that might
have some extra patches in it. to fix this issue.

I dont think it has but that package compiled fine with gcc-3.4.

MfG
        Goswin



Reply to: