Skip to content

Commit

Permalink
Make Missing Modules.symvers Fatal
Browse files Browse the repository at this point in the history
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.

Closes #127
  • Loading branch information
behlendorf committed Mar 7, 2011
1 parent 15805c7 commit a60b1c0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/kernel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ AC_DEFUN([ZFS_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
Expand Down
28 changes: 28 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -11964,6 +11964,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
Expand Down Expand Up @@ -15955,6 +15969,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
Expand Down

0 comments on commit a60b1c0

Please sign in to comment.