Bug 675102

Summary: kernel-headers 2.6.32-112.el6 broken
Product: Red Hat Enterprise Linux 6 Reporter: Fabio Massimo Di Nitto <fdinitto>
Component: kernelAssignee: Aristeu Rozanski <arozansk>
Status: CLOSED ERRATA QA Contact: Mike Gahagan <mgahagan>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.1CC: arozansk, jburke, lczerner, lhh
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Regression TestBlocker
Fixed In Version: kernel-2.6.32-113.el6 Doc Type: Bug Fix
Doc Text:
Prior to this update, the /usr/include/linux/fs.h file was broken, causing other packages to fail to build. With this update, the underlying source code has been modified to address this issue, and packages no longer fail to build.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 12:44:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 592964, 618705, 674843    

Description Fabio Massimo Di Nitto 2011-02-04 10:34:33 UTC
Description of problem:

Apparently /usr/include/linux/fs.h is broken causing other packages to fail to build.

https://brewweb.devel.redhat.com/getfile?taskID=3089124&name=build.log

make[3]: Leaving directory `/builddir/build/BUILD/cluster-3.0.12/cman/lib'
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -Wformat=2 -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribute -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Wmissing-declarations -O2 -ggdb3 -MMD -I/builddir/build/BUILD/cluster-3.0.12/make -DDEFAULT_CONFIG_DIR=\"/etc/cluster\" -DDEFAULT_CONFIG_FILE=\"cluster.conf\" -DLOGDIR=\"/var/log/cluster\" -DSYSLOGFACILITY=LOG_LOCAL4 -DSYSLOGLEVEL=LOG_INFO -DRELEASE_VERSION=\"3.0.12\" -Wall -Wformat=2 -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribute -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Wmissing-declarations -O2 -ggdb3 -MMD -I/builddir/build/BUILD/cluster-3.0.12/make -DDEFAULT_CONFIG_DIR=\"/etc/cluster\" -DDEFAULT_CONFIG_FILE=\"cluster.conf\" -DLOGDIR=\"/var/log/cluster\" -DSYSLOGFACILITY=LOG_LOCAL4 -DSYSLOGLEVEL=LOG_INFO -DRELEASE_VERSION=\"3.0.12\" -Wall -Wformat=2 -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribute -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Wmissing-declarations -O2 -ggdb3 -MMD -I/builddir/build/BUILD/cluster-3.0.12/make -DDEFAULT_CONFIG_DIR=\"/etc/cluster\" -DDEFAULT_CONFIG_FILE=\"cluster.conf\" -DLOGDIR=\"/var/log/cluster\" -DSYSLOGFACILITY=LOG_LOCAL4 -DSYSLOGLEVEL=LOG_INFO -DRELEASE_VERSION=\"3.0.12\" -D_GNU_SOURCE -I/builddir/build/BUILD/cluster-3.0.12/config/libs/libccsconfdb -I/builddir/build/BUILD/cluster-3.0.12/cman/lib -I/builddir/build/BUILD/cluster-3.0.12/common/liblogthread -I/usr/include  -I/builddir/build/BUILD/cluster-3.0.12/cman/qdisk -I/usr/include   -c -o disk.o /builddir/build/BUILD/cluster-3.0.12/cman/qdisk/disk.c
In file included from /builddir/build/BUILD/cluster-3.0.12/cman/qdisk/disk.c:27:
/usr/include/linux/fs.h:36: error: expected specifier-qualifier-list before '__u64'
make[2]: *** [disk.o] Error 1
make[2]: Leaving directory `/builddir/build/BUILD/cluster-3.0.12/cman/qdisk'
make[1]: Leaving directory `/builddir/build/BUILD/cluster-3.0.12/cman'

Version-Release number of selected component (if applicable):

kernel-headers 2.6.32-112.el6

How reproducible:

try for example to build cluster 3.0.12-31.el6 on 112 and it will. Same package built fine the day before with kernel-headers 2.6.32-94.el6

Comment 1 Jeff Burke 2011-02-04 14:33:53 UTC
I have successfully built the cluster-3.0.12-31.el6.src.rpm against 
kernel-headers-2.6.32-112.el6
.
.
.
Wrote: /rpmbuild/RPMS/x86_64/cman-3.0.12-31.el6.x86_64.rpm
Wrote: /rpmbuild/RPMS/x86_64/clusterlib-3.0.12-31.el6.x86_64.rpm
Wrote: /rpmbuild/RPMS/x86_64/clusterlib-devel-3.0.12-31.el6.x86_64.rpm
Wrote: /rpmbuild/RPMS/x86_64/gfs2-utils-3.0.12-31.el6.x86_64.rpm
.
.
.

To fix the build issue you can include this patch 

--- ./cman/qdisk/disk.c.orig
+++ ./cman/qdisk/disk.c
 -24,6 +24,7 @@
 #include <platform.h>
 #include <unistd.h>
 #include <time.h>
+#include <linux/types.h>
 #include <linux/fs.h>
 #include <liblogthread.h>
 #include <zlib.h>

Comment 3 Fabio Massimo Di Nitto 2011-02-04 14:42:56 UTC
So what has changed in kernel-headers that requires me to change code this late in the process?

while I agree that our code should also be fixed, those headers should not be changed this late in the release cycle.

it was luck that I was hitted by this issue. If i´d built 2 hours earlier, it would have gone unnoticed.

Comment 4 Aristeu Rozanski 2011-02-04 14:45:43 UTC
e619161e51e49bc9dc7627bd65f8d7a8fb051aca introduced a new structure using __u64
which requires linux/types.h header, which wasn't backported at that time.

Jeff, this solves the LTP build problem too.

Comment 5 Fabio Massimo Di Nitto 2011-02-04 14:50:21 UTC
(In reply to comment #4)
> e619161e51e49bc9dc7627bd65f8d7a8fb051aca introduced a new structure using __u64
> which requires linux/types.h header, which wasn't backported at that time.
> 
> Jeff, this solves the LTP build problem too.

thanks for the info guys!

Comment 6 Lukáš Czerner 2011-02-04 14:52:10 UTC
This was fixed upstream with b31d42a5af1818bdf31a5f023abe4d8b212542f2. Looks like I forgot this particular commit while porting batched discard support onto RHEL. We should probably pick this commit up for RHEL.

Comment 7 Aristeu Rozanski 2011-02-04 20:13:42 UTC
Patch(es) available on kernel-2.6.32-113.el6

Comment 12 Mike Gahagan 2011-02-14 18:52:19 UTC
I've confirmed this is fix for building of the cluster packages and various internal tests used by kernel QE.

Wrote: /root/rpmbuild/RPMS/x86_64/cluster-debuginfo-3.0.12-33.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/cman-3.0.12-33.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/clusterlib-3.0.12-33.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/clusterlib-devel-3.0.12-33.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/gfs2-utils-3.0.12-33.el6.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.fZrYfQ
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd cluster-3.0.12
+ rm -rf /root/rpmbuild/BUILDROOT/cluster-3.0.12-33.el6.x86_64
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.cyx7gq
+ umask 022
+ cd /root/rpmbuild/BUILD
+ rm -rf cluster-3.0.12
+ exit 0
[root@test1239 src]# echo $?
0
[root@test1239 src]# rpm -q kernel-headers
kernel-headers-2.6.32-115.el6.x86_64

Comment 13 Martin Prpič 2011-05-17 11:31:26 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Prior to this update, the /usr/include/linux/fs.h file was broken, causing other packages to fail to build. With this update, the underlying source code has been modified to address this issue, and packages no longer fail to build.

Comment 14 errata-xmlrpc 2011-05-19 12:44:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0542.html