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

2005-07-21 Thread Goswin von Brederlow
Gregory Margo [EMAIL PROTECTED] writes:

 On Wed, Jul 20, 2005 at 02:54:06PM +0200, Goswin von Brederlow wrote:
 
 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

 Where would this be?  I'm only looking at the amd64 repository
 and there's only one kernel-source package.

 [EMAIL PROTECTED] 587$ apt-cache search kernel-source-2.6
 kernel-patch-debian-2.6.8 - Debian patches to Linux 2.6.8
 kernel-source-2.6.8 - Linux kernel source for version 2.6.8 with Debian 
 patches

[EMAIL PROTECTED]:~% apt-cache showsrc kernel-image-2.6.8-11-amd64-generic
Package: kernel-image-2.6.8-amd64

MfG
Goswin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2005-07-20 Thread Erik Mouw
On Wed, Jul 20, 2005 at 03:31:13AM -0700, Gregory Margo wrote:
 I'm trying to compile the Sarge kernel for amd64.
 I have a dual Xeon system running Debian Stable for amd64, with the kernel
 kernel-image-2.6.8-11-em64t-p4-smp   2.6.8-14 
 
 I have installed the source package 
 kernel-source-2.6.8 2.6.8-16  
 
 As a first test I just attempted to duplicate the compile to make
 sure all the tools are installed, so I extracted the kernel source
 and created a build directory, did a make O=... menuconfig and make O=... 
 (Using the O= option to point to the build directory)
 
 I made no changes in the menuconfig, and it picked up the config
 file from /boot for defaults (/boot/config-2.6.8-11-em64t-p4-smp)

When using a config from a different kernel, you should use make
oldconfig before running make {menu|x|g|k}config.

 But the compile fails because it can't find pci.h.
 I only see a pci.h in the i386 arch directory, not for x86_64.
 
 Am I doing something wrong?

I don't know, you didn't supply enough information for us to figure
out. What's the output from gcc -v? Could you c

 Is there a secret step or missing link for amd64 that's not documented?

There is no secret.

 Here is the error:
 
 /usr/src/gm/kernel-source-2.6.8.work/arch/x86_64/pci/mmconfig.c:10:17: pci.h: 
 No such file or directory
 /usr/src/gm/kernel-source-2.6.8.work/arch/x86_64/pci/mmconfig.c: In function 
 `pci_mmcfg_init':
 /usr/src/gm/kernel-source-2.6.8.work/arch/x86_64/pci/mmconfig.c:79: error: 
 `pci_probe' undeclared (first use in this function)
 /usr/src/gm/kernel-source-2.6.8.work/arch/x86_64/pci/mmconfig.c:79: error: 
 (Each undeclared identifier is reported only once
 /usr/src/gm/kernel-source-2.6.8.work/arch/x86_64/pci/mmconfig.c:79: error: 
 for each function it appears in.)
 /usr/src/gm/kernel-source-2.6.8.work/arch/x86_64/pci/mmconfig.c:79: error: 
 `PCI_PROBE_MMCONF' undeclared (first use in this function)
 /usr/src/gm/kernel-source-2.6.8.work/arch/x86_64/pci/mmconfig.c:93: error: 
 `PCI_PROBE_MASK' undeclared (first use in this function)

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.


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2005-07-20 Thread Goswin von Brederlow
Gregory Margo [EMAIL PROTECTED] writes:

 I'm trying to compile the Sarge kernel for amd64.
 I have a dual Xeon system running Debian Stable for amd64, with the kernel
 kernel-image-2.6.8-11-em64t-p4-smp   2.6.8-14 

 I have installed the source package 
 kernel-source-2.6.8 2.6.8-16  

 As a first test I just attempted to duplicate the compile to make
 sure all the tools are installed, so I extracted the kernel source
 and created a build directory, did a make O=... menuconfig and make O=... 
 (Using the O= option to point to the build directory)

Although it has nothing to do with your errors you should be using
make-kpkg for the full Debian experience.

MfG
Goswin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2005-07-20 Thread Erik Mouw
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.0 -0700
 +++ arch/x86_64/pci/Makefile2005-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

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2005-07-20 Thread Goswin von Brederlow
Erik Mouw [EMAIL PROTECTED] 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.0 -0700
 +++ arch/x86_64/pci/Makefile2005-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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2005-07-20 Thread Frederik Schueler
Hello,

On Wed, Jul 20, 2005 at 03:31:13AM -0700, Gregory Margo wrote:
 Am I doing something wrong?
 Is there a secret step or missing link for amd64 that's not documented?

you need the debian patch too, then ypou can compile your kernel with

MAKEFLAGS=... PATCH_THE_KERNEL=YES make-kpkg --added-patches=debian 
--config=menuconfig --revision=... --append-to-version=...

this should work using the debian config of the official kernel image.

Best regards
Frederik Schueler


-- 
ENOSIG


signature.asc
Description: Digital signature


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

2005-07-20 Thread Gregory Margo
On Wed, Jul 20, 2005 at 03:26:40PM +0200, Frederik Schueler wrote:
 Hello,
 
 On Wed, Jul 20, 2005 at 03:31:13AM -0700, Gregory Margo wrote:
  Am I doing something wrong?
  Is there a secret step or missing link for amd64 that's not documented?
 
 you need the debian patch too, then ypou can compile your kernel with
 
 MAKEFLAGS=... PATCH_THE_KERNEL=YES make-kpkg --added-patches=debian 
 --config=menuconfig --revision=... --append-to-version=...
 
 this should work using the debian config of the official kernel image.
 
 Best regards
 Frederik Schueler
 
 
 -- 
 ENOSIG

What debian patch are you talking about?
The kernel-source-2.6.8 is already patched.

[EMAIL PROTECTED] 587$ apt-cache search kernel-source-2.6
kernel-patch-debian-2.6.8 - Debian patches to Linux 2.6.8
kernel-source-2.6.8 - Linux kernel source for version 2.6.8 with Debian patches



-- 
+
Gregory H. Margo
gmargo at yahoo/com, gmail/com, pacbell/net; greg at margofamily/org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2005-07-20 Thread Gregory Margo
On Wed, Jul 20, 2005 at 02:54:06PM +0200, Goswin von Brederlow wrote:
 
 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

Where would this be?  I'm only looking at the amd64 repository
and there's only one kernel-source package.

[EMAIL PROTECTED] 587$ apt-cache search kernel-source-2.6
kernel-patch-debian-2.6.8 - Debian patches to Linux 2.6.8
kernel-source-2.6.8 - Linux kernel source for version 2.6.8 with Debian patches


-- 
+
Gregory H. Margo
gmargo at yahoo/com, gmail/com, pacbell/net; greg at margofamily/org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]