[ovs-discuss] config/build errors with 2.6.33

Brandon Heller brandonh at stanford.edu
Tue Mar 23 08:50:52 UTC 2010


I had some trouble configuring and building OVS with a custom 2.6.33 kernel.
 Ugly workaround patch below, which should really use a greater-than
comparison in Makefile.main.in.  Somewhere after 2.6.29 autconf.h moved
from include/linux to /include/generated.

The patch descends from commit 973eab32 (yesterday's OVS master branch).

Thanks,
-b

diff --git a/acinclude.m4 b/acinclude.m4
index e38676f..ea53b32 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -70,9 +70,19 @@ AC_DEFUN([OVS_CHECK_LINUX26], [
          AC_ERROR([Linux kernel in build tree $KBUILD26 (source tree
$KSRC26) i
        fi
     fi
-    if ! test -e "$KBUILD26"/include/linux/version.h || \
-       ! test -e "$KBUILD26"/include/linux/autoconf.h; then
-       AC_MSG_ERROR([Linux kernel source in $KBUILD26 is not configured])
+    echo "KBUILD26=$KBUILD26"
+    if test $patchlevel -le 6 && test $sublevel -lt 33; then
+      echo "top half"
+      if ! test -e "$KBUILD26"/include/linux/version.h || \
+         ! test -e "$KBUILD26"/include/linux/autoconf.h; then
+        AC_MSG_ERROR([Linux kernel source in $KBUILD26 is not configured])
+      fi
+    else
+      echo "bottom half"
+      if ! test -e "$KBUILD26"/include/linux/version.h || \
+         ! test -e "$KBUILD26"/include/generated/autoconf.h; then
+        AC_MSG_ERROR([Linux kernel source in $KBUILD26 is not configured])
+      fi
     fi
     OVS_CHECK_LINUX26_COMPAT
   fi
diff --git a/datapath/linux-2.6/Makefile.main.inb/datapath/linux-2.6/Makefile.m
index fd231e6..1ec778f 100644
--- a/datapath/linux-2.6/Makefile.main.in
+++ b/datapath/linux-2.6/Makefile.main.in
@@ -42,7 +42,12 @@ ifeq (,$(wildcard $(VERSION_FILE)))
   $(error Linux kernel source not configured - missing version.h)
 endif

-CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
+ifeq ($(shell grep -c 'SUBLEVEL = 33' $(KSRC)/Makefile), 1)
+  CONFIG_FILE := $(KSRC)/include/generated/autoconf.h
+else
+  CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
+endif
+
 ifeq (,$(wildcard $(CONFIG_FILE)))
   $(error Linux kernel source not configured - missing autoconf.h)
 endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20100323/6aef4a65/attachment-0001.html>


More information about the discuss mailing list