avoid configure failure with F10's 2.6.27.21 kernel headers
PATCH 1/1 avoid configure failure with F10's 2.6.27.21 kernel headers
Without the patch below, ./configure would fail like this on Fedora 10:
checking linux/dlm_plock.h usability... no
checking linux/dlm_plock.h presence... yes
configure: WARNING: linux/dlm_plock.h: present but cannot be compiled
configure: WARNING: linux/dlm_plock.h: check for missing prerequisite headers?
configure: WARNING: linux/dlm_plock.h: see the Autoconf documentation
configure: WARNING: linux/dlm_plock.h: section "Present But Cannot Be Compiled"
configure: WARNING: linux/dlm_plock.h: proceeding with the compiler's result
configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to linux-cluster at redhat.com ## configure: WARNING: ## --------------------------------------- ##
checking for linux/dlm_plock.h... no
configure: error: Unable to find dlm kernel headers.
Make sure to install kernel headers 2.6.26 (or higher) or use --with-kernel=path configure option to point to the kernel source.
[Exit 1]
and config.log showed the problem:
In file included from conftest.c:79:0:
/usr/include/linux/dlm_plock.h:25:2: error: expected specifier-qualifier-list before '__u32'
Here's the patch:
From 013d711c8731da4f11df2437c6c1251d7edb91ea Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Fri, 19 Jun 2009 20:24:18 +0200
Subject: [PATCH] avoid configure failure with F10's 2.6.27.21 kernel headers
* configure.ac: Include <linux/types.h> before checking for linux/dlm_plock.h. Otherwise, we'd get a syntax error on __u32.
--- configure.ac | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
configure.ac +7 -2
@@ -154,12 +154,17 @@ BACKUP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$KERNEL_CPPFLAGS" # check kernel headers +AC_CHECK_HEADERS([linux/major.h linux/types.h linux/dlmconstants.h]) +AC_CHECK_HEADERS([linux/dlm.h linux/dlm_device.h]) # 2.6.26 adds dlm_plock.h that's our checking barrier, instead # of implementing some insane kernel version checks -AC_CHECK_HEADERS([linux/major.h linux/types.h linux/dlmconstants.h linux/dlm.h linux/dlm_device.h linux/dlm_plock.h],, +# At least on 2.6.27.21-170.2.56.fc10.x86_64, one must include +# <linux/types.h> to avoid syntax errors regarding __u32. +AC_CHECK_HEADERS([linux/dlm_plock.h],, [AC_MSG_ERROR([Unable to find dlm kernel headers. Make sure to install kernel headers 2.6.26 (or higher) or use --with-kernel=path -configure option to point to the kernel source.])]) +configure option to point to the kernel source.])], + [#include <linux/types.h>]) CPPFLAGS="$BACKUP_CPPFLAGS"
--
1.6.3.2.416.g04d0
PATCH 1/1 avoid configure failure with F10's 2.6.27.21 kernel headers
Hi Jim,
Which branch is this for? It doesn't apply to gfs2-utils.git...
Andrew
Quoted 64 lines · Jim Meyering
Without the patch below, ./configure would fail like this on Fedora 10:
checking
linux/dlm_plock.husability... no
checkinglinux/dlm_plock.hpresence... yes
configure: WARNING:linux/dlm_plock.h: present but cannot be compiled
configure: WARNING:linux/dlm_plock.h: check for missing prerequisite headers?
configure: WARNING:linux/dlm_plock.h: see the Autoconf documentation
configure: WARNING:linux/dlm_plock.h: section "Present But Cannot Be Compiled"
configure: WARNING:linux/dlm_plock.h: proceeding with the compiler's resultconfigure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to linux-cluster at redhat.com ## configure: WARNING: ## --------------------------------------- ##checking for
linux/dlm_plock.h... no
configure: error: Unable to find dlm kernel headers.
Make sure to install kernel headers 2.6.26 (or higher) or use --with-kernel=path configure option to point to the kernel source.
[Exit 1]and config.log showed the problem:
In file included from conftest.c:79:0:
/usr/include/linux/dlm_plock.h:25:2: error: expected specifier-qualifier-list before '__u32'Here's the patch:
Quoted 1 line
From
013d711c8731da4f11df2437c6c1251d7edb91eaMon Sep 17 00:00:00 2001From: Jim Meyering <[email protected]>
Date: Fri, 19 Jun 2009 20:24:18 +0200
Subject: [PATCH] avoid configure failure with F10's 2.6.27.21 kernel headers* configure.ac: Include <
linux/types.h> before checking forlinux/dlm_plock.h. Otherwise, we'd get a syntax error on__u32.--- configure.ac | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)configure.ac +7
-3@@ -154,12 +154,17 @@ BACKUP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$KERNEL_CPPFLAGS" # check kernel headers +AC_CHECK_HEADERS([linux/major.h linux/types.h linux/dlmconstants.h]) +AC_CHECK_HEADERS([linux/dlm.h linux/dlm_device.h]) # 2.6.26 adds dlm_plock.h that's our checking barrier, instead # of implementing some insane kernel version checks -AC_CHECK_HEADERS([linux/major.h linux/types.h linux/dlmconstants.h linux/dlm.h linux/dlm_device.h linux/dlm_plock.h],, +# At least on 2.6.27.21-170.2.56.fc10.x86_64, one must include +# <linux/types.h> to avoid syntax errors regarding __u32. +AC_CHECK_HEADERS([linux/dlm_plock.h],, [AC_MSG_ERROR([Unable to find dlm kernel headers. Make sure to install kernel headers 2.6.26 (or higher) or use --with-kernel=path -configure option to point to the kernel source.])]) +configure option to point to the kernel source.])], + [#include <linux/types.h>]) CPPFLAGS="$BACKUP_CPPFLAGS" --1.6.3.2.416.g04d0
PATCH 1/1 avoid configure failure with F10's 2.6.27.21 kernel headers
In reply to Jim MeyeringHi Jim,
Quoted 18 lines · Jim Meyering
Without the patch below, ./configure would fail like this on Fedora 10:
checking
linux/dlm_plock.husability... no
checkinglinux/dlm_plock.hpresence... yes
configure: WARNING:linux/dlm_plock.h: present but cannot be compiled
configure: WARNING:linux/dlm_plock.h: check for missing prerequisite headers?
configure: WARNING:linux/dlm_plock.h: see the Autoconf documentation
configure: WARNING:linux/dlm_plock.h: section "Present But Cannot Be Compiled"
configure: WARNING:linux/dlm_plock.h: proceeding with the compiler's resultconfigure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to linux-cluster at redhat.com ## configure: WARNING: ## --------------------------------------- ##checking for
linux/dlm_plock.h... no
configure: error: Unable to find dlm kernel headers.
Make sure to install kernel headers 2.6.26 (or higher) or use --with-kernel=path configure option to point to the kernel source.
[Exit 1]
Quoted 6 lines
and config.log showed the problem:
In file included from conftest.c:79:0:
/usr/include/linux/dlm_plock.h:25:2: error: expected specifier-qualifier-list before '__u32'Here's the patch:
I haven't tested this patch directly but it looks good to go in.
gfs2-utils.git might benefit for a similar change, let me know if you have time to do go for it, or I'll do it at the next round of merges.
Thanks
Fabio
PATCH 1/1 avoid configure failure with F10's 2.6.27.21 kernel headers
In reply to Andrew PriceQuoted 1 line · Andrew Price
Which branch is this for? It doesn't apply to gfs2-utils.git...
Hi Andrew,
This is for dlm.
Sorry for not specifying.
I've just done the following to a few cluster-related repositories so now dlm-related patches will use "[PATCH dlm]" as the prefix:
git config format.subjectprefix 'PATCH '$(basename $PWD)
Quoted 6 lines · Jim Meyering
Quoted 5 lines
Without the patch below, ./configure would fail like this on Fedora 10:
checking
linux/dlm_plock.husability... no
checkinglinux/dlm_plock.hpresence... yes
configure: WARNING:linux/dlm_plock.h: present but cannot be compiled
...
Quoted 6 lines
Quoted 6 lines
Here's the patch:
Quoted 1 line
From
013d711c8731da4f11df2437c6c1251d7edb91eaMon Sep 17 00:00:00 2001From: Jim Meyering <[email protected]>
Date: Fri, 19 Jun 2009 20:24:18 +0200
Subject: [PATCH] avoid configure failure with F10's 2.6.27.21 kernel headers
...
Jim Meyering
AppliedPATCH 1/1 avoid configure failure with F10's 2.6.27.21 kernel headers
In reply to Fabio M. Di NittoQuoted 21 lines · Fabio M. Di Nitto
Hi Jim,
Quoted 18 lines · Jim Meyering
Without the patch below, ./configure would fail like this on Fedora 10:
checking
linux/dlm_plock.husability... no
checkinglinux/dlm_plock.hpresence... yes
configure: WARNING:linux/dlm_plock.h: present but cannot be compiled
configure: WARNING:linux/dlm_plock.h: check for missing prerequisite headers?
configure: WARNING:linux/dlm_plock.h: see the Autoconf documentation
configure: WARNING:linux/dlm_plock.h: section "Present But Cannot Be Compiled"
configure: WARNING:linux/dlm_plock.h: proceeding with the compiler's resultconfigure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to linux-cluster at redhat.com ## configure: WARNING: ## --------------------------------------- ##checking for
linux/dlm_plock.h... no
configure: error: Unable to find dlm kernel headers.
Make sure to install kernel headers 2.6.26 (or higher) or use --with-kernel=path configure option to point to the kernel source.
[Exit 1]
Quoted 8 lines
Quoted 6 lines
and config.log showed the problem:
In file included from conftest.c:79:0:
/usr/include/linux/dlm_plock.h:25:2: error: expected specifier-qualifier-list before '__u32'Here's the patch:
I haven't tested this patch directly but it looks good to go in.
Pushed to dlm.git.
Quoted 2 lines
gfs2-utils.git might benefit for a similar change, let me know if you have time to do go for it, or I'll do it at the next round of merges.
Doing it there, too.