hpc/xpmem

Cannot build xpmem vs. a kernel that built modules_prepare

Opened this issue · 0 comments

I often build modules vs. a partially-built kernel: building the target 'modules_prepare' gives a kernel that is good enough for building the module.

The configure script, however, requires Module.symvers that is not generated by this target. My very basic workaround (that does not check modules_prepare properly. And may not work with some older kernels) is:

--- a/m4/ac_path_kernel_source.m4
+++ b/m4/ac_path_kernel_source.m4
@@ -24,7 +24,7 @@ AC_DEFUN([AC_PATH_KERNEL_SOURCE_SEARCH],
         /usr/src/linux-source-${vers} \
         /usr/src/linux /lib/modules/${vers}/source
     do
-      if test -e $dir/Module.symvers ; then
+      if test -e $dir/include/generated/autoconf.h ; then
         kerneldir=`dirname $dir/Makefile`/ || continue
         no_kernel=no
         break