]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Make Missing Modules.symvers Fatal
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 7 Mar 2011 20:59:30 +0000 (12:59 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 7 Mar 2011 21:09:01 +0000 (13:09 -0800)
Detect early on in configure if the Modules.symvers file is missing.
Without this file there will be build failures later and it's best
to catch this early and provide a useful error.  In this case the
most likely problem is the kernel-devel packages are not installed.
It may also be possible that they are using an unbuilt custom kernel
in which case they must build the kernel first.

config/spl-build.m4
configure

index 2cf71f41c9b2a1d6d9559a88d51e20dcbe3641d8..72bb3258ef3ee5ef851c9068916ca4b6adcf9ecc 100644 (file)
@@ -87,6 +87,14 @@ AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
                else
                        LINUX_SYMBOLS=Module.symvers
                fi
+
+               if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
+                       AC_MSG_ERROR([
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If your building with a custom kernel make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source.])
+               fi
        else
                LINUX_SYMBOLS=NONE
        fi
index 5f50019376d381885cff6f7d809e95d38b859c68..f5c6a063a1db74528b9f10022f3964a94e94bcfb 100755 (executable)
--- a/configure
+++ b/configure
@@ -11784,6 +11784,20 @@ $as_echo_n "checking kernel file name for module symbols... " >&6; }
                else
                        LINUX_SYMBOLS=Module.symvers
                fi
+
+               if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If your building with a custom kernel make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source." >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If your building with a custom kernel make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source." >&2;}
+   { (exit 1); exit 1; }; }
+               fi
        else
                LINUX_SYMBOLS=NONE
        fi
@@ -15592,6 +15606,20 @@ $as_echo_n "checking kernel file name for module symbols... " >&6; }
                else
                        LINUX_SYMBOLS=Module.symvers
                fi
+
+               if ! test -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
+                       { { $as_echo "$as_me:$LINENO: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If your building with a custom kernel make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source." >&5
+$as_echo "$as_me: error:
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If your building with a custom kernel make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source." >&2;}
+   { (exit 1); exit 1; }; }
+               fi
        else
                LINUX_SYMBOLS=NONE
        fi