RemixVSL/iomemory-vsl

make dkms error in TrueNAS Scale Bluefin 22.12.0

Closed this issue · 1 comments

Bug description

make dkms for vsl3 fails in latest TrueNAS Scale Bluefin release 22.12.0

How to reproduce

git clone https://github.com/snuf/iomemory-vsl.git
cd iomemory-vsl
git checkout v5.12.1
make dkms

Log output

root@truenas[~/iomemory-vsl]# make dkms
cd root/usr/src/iomemory-vsl-3.2.16 && \
  	make clean
make[1]: Entering directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
make \
        -j12 \
	-C /lib/modules/5.15.79+truenas/build \
	FIO_DRIVER_NAME=iomemory-vsl \
	FUSION_DRIVER_DIR=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	M=/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16 \
	EXTRA_CFLAGS+="-I/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror" \
	KFIO_LIB=kfio/x86_64_cc102_libkfio.o_shipped \
	clean
make[2]: Entering directory '/usr/src/linux-headers-5.15.79+truenas'
make[2]: Leaving directory '/usr/src/linux-headers-5.15.79+truenas'
rm -rf include/fio/port/linux/kfio_config.h kfio_config license.c
make[1]: Leaving directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
cd root/usr/src/iomemory-vsl-3.2.16 && \
	make dkms
make[1]: Entering directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
./module_operations.sh -n "iomemory-vsl" -v "ecc66f1" -d
Adding module version 5.15.79+truenas-ecc66f1-3.2.16 to source license.c
grep: license.c: No such file or directory
/usr/src/iomemory-vsl-5.15.79+truenas-ecc66f1 already exists.
Warning:   patched with  not 5.15.79+truenas-ecc66f1-3.2.16
Warning:   patched with  not 5.15.79+truenas-ecc66f1-3.2.16
Warning:   patched with  not 5.15.79+truenas-ecc66f1-3.2.16
Warning:   patched with  not 5.15.79+truenas-ecc66f1-3.2.16
Warning:   patched with  not 5.15.79+truenas-ecc66f1-3.2.16
Warning:   patched with  not 5.15.79+truenas-ecc66f1-3.2.16
Warning:   patched with  not 5.15.79+truenas-ecc66f1-3.2.16
Warning:   patched with  not 5.15.79+truenas-ecc66f1-3.2.16
Warning:   patched with  not 5.15.79+truenas-ecc66f1-3.2.16
Adding, buidling and installing iomemory-vsl/5.15.79+truenas-ecc66f1 with DKMS

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' DKMS_KERNEL_VERSION=5.15.79+truenas...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.79+truenas (x86_64)
Consult /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/make.log for more information.
make[1]: *** [Makefile:119: dkms] Error 10
make[1]: Leaving directory '/root/iomemory-vsl/root/usr/src/iomemory-vsl-3.2.16'
make: *** [Makefile:8: dkms] Error 2
root@truenas[~/iomemory-vsl]# cat /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/make.log
DKMS make.log for iomemory-vsl-5.15.79+truenas-ecc66f1 for kernel 5.15.79+truenas (x86_64)
Thu Dec 15 14:53:26 MST 2022
make[2]: Entering directory '/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build'
sed -i 's/Proprietary/GPL/g' Kbuild

Change found in target kernel: KERNELVER KERNEL_SRC
Running clean before building driver

make[3]: Entering directory '/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build'
make \
        -j12 \
	-C /lib/modules/5.15.79+truenas/build \
	FIO_DRIVER_NAME=iomemory-vsl \
	FUSION_DRIVER_DIR=/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build \
	M=/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build \
	EXTRA_CFLAGS+="-I/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror" \
	KFIO_LIB=kfio/x86_64_cc102_libkfio.o_shipped \
	clean
make[4]: Entering directory '/usr/src/linux-headers-5.15.79+truenas'
make[4]: Leaving directory '/usr/src/linux-headers-5.15.79+truenas'
rm -rf include/fio/port/linux/kfio_config.h kfio_config license.c
make[3]: Leaving directory '/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build'
if [ "102" -gt "74" ];then \
	if [ ! -f "kfio/x86_64_cc102_libkfio.o_shipped" ];then \
		cp kfio/x86_64_cc74_libkfio.o_shipped kfio/x86_64_cc102_libkfio.o_shipped; \
	fi \
fi
./kfio_config.sh -a x86_64 -o include/fio/port/linux/kfio_config.h -k /lib/modules/5.15.79+truenas/build -p -d /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kfio_config -l 0 -s /lib/modules/5.15.79+truenas/source
Detecting Kernel Flags
Config dir         : /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kfio_config
Output file        : include/fio/port/linux/kfio_config.h
Kernel output dir  : /lib/modules/5.15.79+truenas/build
Kernel source dir  : /lib/modules/5.15.79+truenas/build
Starting tests:
  1671141207.000  KFIOC_X_PROC_CREATE_DATA_WANTS_PROC_OPS...
  1671141207.039  KFIOC_X_TASK_HAS_CPUS_MASK...
  1671141207.056  KFIOC_X_LINUX_HAS_PART_STAT_H...
  1671141207.068  KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS...
  1671141207.079  KFIOC_X_HAS_MAKE_REQUEST_FN...
  1671141207.091  KFIOC_X_GENHD_PART0_IS_A_POINTER...
  1671141207.103  KFIOC_X_BIO_HAS_BI_BDEV...
Started tests, waiting for completions...
  1671141208.125  KFIOC_X_PROC_CREATE_DATA_WANTS_PROC_OPS=1
  1671141208.133  KFIOC_X_TASK_HAS_CPUS_MASK=1
  1671141208.140  KFIOC_X_LINUX_HAS_PART_STAT_H=1
  1671141208.148  KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS=0
  1671141208.155  KFIOC_X_HAS_MAKE_REQUEST_FN=0
  1671141208.162  KFIOC_X_GENHD_PART0_IS_A_POINTER=1
  1671141208.169  KFIOC_X_BIO_HAS_BI_BDEV=1
Finished
1671141208.173  Exiting
Preserving configdir due to '-p' option: /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kfio_config
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
make \
    -j12 \
-C /lib/modules/5.15.79+truenas/build \
FIO_DRIVER_NAME=iomemory-vsl \
FUSION_DRIVER_DIR=/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build \
M=/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build \
EXTRA_CFLAGS+="-I/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall -Werror" \
INSTALL_MOD_DIR=extra/fio \
INSTALL_MOD_PATH= \
KFIO_LIB=kfio/x86_64_cc102_libkfio.o_shipped \
modules
make[3]: Entering directory '/usr/src/linux-headers-5.15.79+truenas'
printf '#include "linux/module.h"\nMODULE_LICENSE("GPL");\n' >/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/license.c
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/main.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/pci.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/sysrq.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/driver_init.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kfio.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/errno.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/state.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kcache.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kfile.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kmem.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kfio_common.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kcpu.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kscatter.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/ktime.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/sched.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/cdev.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kcondvar.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kinfo.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kexports.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/khotplug.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kcsr.o
  SHIPPED /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kfio/x86_64_cc102_libkfio.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/module_param.o
  CC [M]  /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/license.o
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c: In function 'kfio_expose_disk':
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c:356:19: error: implicit declaration of function 'alloc_disk'; did you mean 'alloc_uid'? [-Werror=implicit-function-declaration]
  356 |     dp->gd = gd = alloc_disk(FIO_NUM_MINORS);
      |                   ^~~~~~~~~~
      |                   alloc_uid
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c:356:17: error: assignment to 'struct gendisk *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
  356 |     dp->gd = gd = alloc_disk(FIO_NUM_MINORS);
      |                 ^
In file included from /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c:50:
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c: In function 'kfio_destroy_disk':
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/include/kblock_meta.h:38:20: error: implicit declaration of function 'bdgrab'; did you mean 'igrab'? [-Werror=implicit-function-declaration]
   38 |   #define GET_BDEV bdgrab(disk->gd->part0)
      |                    ^~~~~~
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c:423:16: note: in expansion of macro 'GET_BDEV'
  423 |         bdev = GET_BDEV;
      |                ^~~~~~~~
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c:423:14: error: assignment to 'struct block_device *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
  423 |         bdev = GET_BDEV;
      |              ^
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c: In function 'kfio_bdput':
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c:500:5: error: implicit declaration of function 'bdput'; did you mean 'fdput'? [-Werror=implicit-function-declaration]
  500 |     bdput(bdev);
      |     ^~~~~
      |     fdput
In file included from /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c:50:
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c: In function 'kfio_alloc_queue':
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/include/kblock_meta.h:33:27: error: implicit declaration of function 'blk_alloc_queue'; did you mean 'kfio_alloc_queue'? [-Werror=implicit-function-declaration]
   33 |   #define BLK_ALLOC_QUEUE blk_alloc_queue(node);
      |                           ^~~~~~~~~~~~~~~
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c:960:10: note: in expansion of macro 'BLK_ALLOC_QUEUE'
  960 |     rq = BLK_ALLOC_QUEUE;
      |          ^~~~~~~~~~~~~~~
/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.c:960:8: error: assignment to 'struct request_queue *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
  960 |     rq = BLK_ALLOC_QUEUE;
      |        ^
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:289: /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build/kblock.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:1900: /var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build] Error 2
make[3]: Leaving directory '/usr/src/linux-headers-5.15.79+truenas'
make[2]: *** [Makefile:134: modules] Error 2
make[2]: Leaving directory '/var/lib/dkms/iomemory-vsl/5.15.79+truenas-ecc66f1/build'
root@truenas[~/iomemory-vsl]#
snuf commented

@ucsarchitect it looks like you're using v5.12.1 with a 5.15.x kernel. Please use main as referred on the main page:
We've abandoned the notion of releases, Generally main should be checked out. main is completely backwards compatible for all 5. The latest working tested kernel is 5.16.14.