View Issue Details

IDProjectCategoryView StatusLast Update
0006157CentOS-6kernelpublic2013-02-07 16:08
Status resolvedResolutionfixed 
Platformi386OSCentOSOS Version6.3
Product Version6.3 
Target VersionFixed in Version 
Summary0006157: kernel compile aborts with 2.6.32-279.19.1.el6.i686 and 2.6.32-279.14.1.el6.i686

when I try to build a i386 kernel (using it stops at drivers/pci/pci-sysfs.c:

cc1: warnings being treated as errors
drivers/pci/pci-sysfs.c: In function 'pci_mmap_resource':
drivers/pci/pci-sysfs.c:724: error: format '%16Lx' expects type 'long long unsigned int', but argument 9 has type 'resource_size_t'
drivers/pci/pci-sysfs.c:724: error: format '%16Lx' expects type 'long long unsigned int', but argument 10 has type 'resource_size_t'
make[2]: *** [drivers/pci/pci-sysfs.o] Error 1
make[1]: *** [drivers/pci] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2

Based on I have attached a patch for the 2.6.32-279.19.1.el6.i686 tree.
Steps To ReproduceTry to compile i386 kernel with above version
TagsNo tags attached.




2012-12-27 13:11


pci-sysfs.patch (570 bytes)
--- pci-sysfs.c.old     2012-11-24 19:48:10.000000000 +0100
+++ pci-sysfs.c 2012-12-27 14:05:47.580324175 +0100
@@ -725,7 +725,7 @@
                        "at page 0x%08lx on %s BAR %d (start 0x%16Lx, size 0x%16Lx)\n",
                        current->comm, vma->vm_end-vma->vm_start, vma->vm_pgoff,
                        pci_name(pdev), i,
-                       pci_resource_start(pdev, i), pci_resource_len(pdev, i));
+                       (u64)pci_resource_start(pdev, i), (u64)pci_resource_len(pdev, i));
                return -EINVAL;

pci-sysfs.patch (570 bytes)


2012-12-27 16:41

manager   ~0016183

As this line indicates,

cc1: warnings being treated as errors

warnings are now treated as errors. A workaround is to add a "Werror=0" option to the flags for the compiler. Otherwise, you'd need to correct the code so no warnings are produced.


2012-12-27 22:29

manager   ~0016186

Now I see that you are offering a patch that would eliminate the errors (warnings). The default (distro) kernels do not produce the errors you reported and the compilation finishes successfully. What changes to the kernel trigger the errors ?


2012-12-28 09:26

reporter   ~0016188


I see - I have just tried the original config and the compilation finishes successfully.

My goal was to build a non-pae kernel. Therefore I did the following changes:
sed -i "s/# CONFIG_HIGHMEM4G is not set/CONFIG_HIGHMEM4G=y/" .config
sed -i "s/CONFIG_HIGHMEM64G=y/# CONFIG_HIGHMEM64G is not set/" .config
make oldconfig

Because of this, there are a couple of changes in the kernel-config. I will attach a diff and my kernel-config.

I did not patch the kernel itself, only these changes on the kernel-config produce the error.



2012-12-28 09:31

reporter   ~0016189


sorry- I forgot. How to tell the compiler Werror=0 ? I have tried this, but without success. I tried to provide it on the commandline of rpmbuild and also with export CFLAGS="-Wno-error" - without success?!



2012-12-28 09:37


.config.non-pae (106,316 bytes)


2012-12-28 09:37


.config.diffs (3,378 bytes)


2012-12-28 16:59

manager   ~0016196

First of all, making a config for NONPAE kernel involves more than changing the 2 lines you indicated. For example, there is "CONFIG_ARCH_PHYS_ADDR_T_64BIT=y" to take care of.

Second, the Werror flag may be edited in/out in Makefile at the top of the kernel tree.

Bottom line is that, because custom kernels are not supported and the bug tracker is not a support venue, I strongly suggest you use either the mailing list or the forums to get further assistance. [Personally I recommend the forums since a kernel guru, AlanBartlett, is available there to help with all kernel-related issues among other things.]


2012-12-28 17:08

manager   ~0016197

Oops, I did not see the config.diffs file you uploaded. :)

But my advice to go for the forums remains the same.


2012-12-28 17:14

reporter   ~0016198


yes, the other changes of the kernelconfigs are done by "make oldconfig".

So - I do not need support - my non-pae kernel is running (with the patch for the type-cast).

Nevertheless - for my understanding it´s an bug in the kernel-source. When not using 64bit types there is a type-cast needed.
In fact - the official kernels for CentOS do not come at this point, because it´s build with highmem/pae support (and therefore with default 64bit datatypes I guess), but the theoretical option is there and it´s an bug.



2012-12-28 17:55

manager   ~0016199

Yes, I agree it is a bug in the kernel code. Normally, bugs are supposed to be reported upstream (RH) and fixed there, and that is the only way CentOS can get the patches (because it is a bug-for-bug rebuild of the upstream product).

In this case, however, the chances of this patch taken up by RH will be small (not zero though). As we know, the bug does not affect the default kernel, so they may not "care". In a case like this in the past, there was a mixed reaction. Some dev said the code must be fixed regardless of whether or not the bug affects the default kernel. Others say, "Nay".

CentOS has own custom kernel, centosplus kernel. We can only apply the patch in this kernel (if that is requested).


2012-12-29 11:07

reporter   ~0016208


Patching the centosplus kernel would be a good idea/beginng.
Can I give an upstream report a try? How to do this? I do not have a RHEL support contract ;-)

Another thing - I know, it´s not related to the ticket, but I do not know where to ask. I have posted in the centos forums a question ( how to rebuild the installation media with this new kernel. Is there a better place for the question? Is there a tutorial for the official build-way?

Thanks again,


2012-12-29 17:40

manager   ~0016211

I will try to add the patch in the next update to the cplus kernel.

You can file a bug report upstream at . You do not need support contract for this. Just create an account and login. Also you are encouraged to add a link back to this CentOS bug report when filing a bug there.

I posted a reply to your forum post. Wait to see if you receive more answers. If not, and you still need more input, try the mailing list as well.


2013-02-07 16:05

manager   ~0016455

The patch is now in released yesterday.

Issue History

Date Modified Username Field Change
2012-12-27 13:11 slemke New Issue
2012-12-27 13:11 slemke File Added: pci-sysfs.patch
2012-12-27 16:41 toracat Note Added: 0016183
2012-12-27 16:41 toracat Status new => assigned
2012-12-27 22:29 toracat Note Added: 0016186
2012-12-27 22:30 toracat Status assigned => feedback
2012-12-28 09:26 slemke Note Added: 0016188
2012-12-28 09:26 slemke Status feedback => assigned
2012-12-28 09:31 slemke Note Added: 0016189
2012-12-28 09:37 slemke File Added: .config.non-pae
2012-12-28 09:37 slemke File Added: .config.diffs
2012-12-28 16:59 toracat Note Added: 0016196
2012-12-28 17:08 toracat Note Added: 0016197
2012-12-28 17:14 slemke Note Added: 0016198
2012-12-28 17:55 toracat Note Added: 0016199
2012-12-29 11:07 slemke Note Added: 0016208
2012-12-29 17:40 toracat Note Added: 0016211
2013-02-07 16:05 toracat Note Added: 0016455
2013-02-07 16:08 toracat Status assigned => resolved
2013-02-07 16:08 toracat Resolution open => fixed