Closed nerdalertdk closed 2 years ago
It seams its my libkfio thats not correct discoverd.
make[5]: *** No rule to make target '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kfio/x86_64_cc_libkfio.o', needed by '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/iomemory-vsl4.o'. Stop.
root@nas1:/opt/iomemory-vsl4/root/usr/src/iomemory-vsl4-4.3.7/kfio# ls -l /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kfio/
total 17732
-rw-r--r-- 1 root root 227608 Jul 6 15:00 function_hashes.txt
-rwxr-xr-x 1 root root 4474 Jul 6 15:00 kfio_operations.sh
-rw-r--r-- 1 root root 1706 Jul 6 15:00 README.md
-rw-r--r-- 1 root root 1592640 Jul 6 15:00 x86_64_cc41_libkfio.o_shipped
-rw-r--r-- 1 root root 1644616 Jul 6 15:00 x86_64_cc43_libkfio.o_shipped
-rw-r--r-- 1 root root 1648912 Jul 6 15:00 x86_64_cc44_libkfio.o_shipped
-rw-r--r-- 1 root root 1563952 Jul 6 15:00 x86_64_cc46_libkfio.o_shipped
-rw-r--r-- 1 root root 1620392 Jul 6 15:00 x86_64_cc48_libkfio.o_shipped
-rw-r--r-- 1 root root 1623328 Jul 6 15:00 x86_64_cc49_libkfio.o_shipped
-rw-r--r-- 1 root root 1641896 Jul 6 15:00 x86_64_cc54_libkfio.o_shipped
-rw-r--r-- 1 root root 1638760 Jul 6 15:00 x86_64_cc63_libkfio.o_shipped
-rw-r--r-- 1 root root 1638760 Jul 6 15:00 x86_64_cc75_libkfio.o_shipped
-rw-r--r-- 1 root root 1638760 Jul 6 15:00 x86_64_latest_libkfio.o_shipped
-rw-r--r-- 1 root root 1638760 Jul 6 15:00 x86_64_libkfio.o_shipped
@nerdalertdk ah yes I was looking into this as someone bumped into this in iomemory-vsl. The problem seems to be the execution of the module_operations.sh
from the Makefile
. Something changed where the ./module_operations.sh (yada yada)
breaks and does not receive the environment from the Makefile
anymore. When using $(shell ./module_operations.sh (yada yada)` it works, but you don't get the output. I'm still looking into this, but it's kind of interesting that there seems to be a change in how environment gets propagated, or rather not.
@snuf sounds good :) is there an ugly quick fix :D or do you need any help debugging ?
@nerdalertdk quick dirty fix is to replace: https://github.com/RemixVSL/iomemory-vsl4/blob/fe767c61da24478a048d2d6255357c96cc123ed7/root/usr/src/iomemory-vsl4-4.3.7/Makefile#L121
with:
$(shell ./module_operations.sh -n "$(FIO_DRIVER_NAME)" -v "$(MODULE_VERSION)" -d)
although it suppresses the output of the module_operations
so need to find a nicer way, if you know of one I'm all ears :)
Now i'm getting this error, which i don't understand
not 5.10.0-15-fe767c6-4.3.7 Warning: patched with not 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Ok: already patched with 5.10.0-15-fe767c6-4.3.7 Adding, buidling and installing iomemory-vsl4/5.10.0-15-fe767c6 with DKMS Kernel preparation unnecessary for this kernel. Skipping... Building module: cleaning build area... 'make' DKMS_KERNEL_VERSION=5.10.0-15-amd64.....(bad exit status: 2)
/bin/sh: 1: Syntax error: "(" unexpected
make[1]: *** [Makefile:121: dkms] Error 2
make[1]: Leaving directory '/opt/iomemory-vsl4/root/usr/src/iomemory-vsl4-4.3.7'
make: *** [Makefile:8: dkms] Error 2
root@nas1:/opt/iomemory-vsl4#
.PHONY: add_module_version patch_module_version
add_module_version patch_module_version:
@ret="$$("$(shell pwd)"/module_operations.sh -n "$(FIO_DRIVER_NAME)" -v "$(MODULE_VERSION)")" ; \
if [ -n "$$ret" ] ; then \
echo "" ; \
echo ""$$ret"" ; \
echo "" ; \
fi
.PHONY: dkms
dkms:
$(shell ./module_operations.sh -n "$(FIO_DRIVER_NAME)" -v "$(MODULE_VERSION)" -d)
.PHONY: dpkg
dpkg:
# patch fio_version, fio_short_version in debian/fio_values
cd $(shell git rev-parse --show-toplevel) && \
$(MAKE) dpkg
Can you paste the make.log
from the dkms build dir?
root@nas1:/opt/iomemory-vsl4# cat /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/make.log
DKMS make.log for iomemory-vsl4-5.10.0-15-fe767c6 for kernel 5.10.0-15-amd64 (x86_64)
Wed 06 Jul 2022 06:14:56 PM CEST
make[3]: Entering directory '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build'
sed -i 's/Proprietary/GPL/g' Kbuild
Change found in target kernel: KERNELVER KERNEL_SRC
Running clean before building driver
make[4]: Entering directory '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build'
/bin/sh: 1: make[3]:: not found
/bin/sh: 1: make[3]:: not found
make \
-j8 \
-C /lib/modules/5.10.0-15-amd64/build \
FIO_DRIVER_NAME=iomemory-vsl4 \
FUSION_DRIVER_DIR=/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build \
M=/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build \
EXTRA_CFLAGS+="-I/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall" \
KFIO_LIB=kfio/x86_64_cc_libkfio.o_shipped \
clean
make[5]: Entering directory '/usr/src/linux-headers-5.10.0-15-amd64'
make[5]: Leaving directory '/usr/src/linux-headers-5.10.0-15-amd64'
rm -rf include/fio/port/linux/kfio_config.h kfio_config
make[4]: Leaving directory '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build'
/bin/sh: 1: make[3]:: not found
/bin/sh: 1: make[3]:: not found
/bin/sh: 1: make[3]:: not found
/bin/sh: 1: make[3]:: not found
/bin/sh: 1: make[3]:: not found
/bin/sh: 1: make[3]:: not found
/bin/sh: 1: make[3]:: not found
/bin/sh: 1: make[3]:: not found
if [ "" -gt "75" ];then \
if [ ! -f "kfio/x86_64_cc_libkfio.o_shipped" ];then \
cp kfio/x86_64_cc75_libkfio.o_shipped kfio/x86_64_cc_libkfio.o_shipped; \
fi \
fi
/bin/sh: 1: [: Illegal number:
./kfio_config.sh -a x86_64 -o include/fio/port/linux/kfio_config.h -k /lib/modules/5.10.0-15-amd64/build -p -d /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kfio_config -l 0 -s /lib/modules/5.10.0-15-amd64/source
Detecting Kernel Flags
Config dir : /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kfio_config
Output file : include/fio/port/linux/kfio_config.h
Kernel output dir : /lib/modules/5.10.0-15-amd64/build
Kernel source dir : /lib/modules/5.10.0-15-amd64/source
Starting tests:
1657124097.561 KFIOC_X_PROC_CREATE_DATA_WANTS_PROC_OPS...
1657124097.593 KFIOC_X_TASK_HAS_CPUS_MASK...
1657124097.607 KFIOC_X_LINUX_HAS_PART_STAT_H...
1657124097.618 KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS...
1657124097.627 KFIOC_X_BLK_ALLOC_QUEUE_EXISTS...
1657124097.639 KFIOC_X_BLK_ALLOC_DISK_EXISTS...
1657124097.651 KFIOC_X_HAS_MAKE_REQUEST_FN...
1657124097.664 KFIOC_X_GENHD_PART0_IS_A_POINTER...
1657124097.677 KFIOC_X_BIO_HAS_BI_BDEV...
1657124097.689 KFIOC_X_SUBMIT_BIO_RETURNS_BLK_QC_T...
1657124097.703 KFIOC_X_VOID_ADD_DISK...
1657124097.715 KFIOC_X_DISK_HAS_OPEN_MUTEX...
Started tests, waiting for completions...
1657124099.857 KFIOC_X_PROC_CREATE_DATA_WANTS_PROC_OPS=1
1657124099.907 KFIOC_X_TASK_HAS_CPUS_MASK=1
1657124099.941 KFIOC_X_LINUX_HAS_PART_STAT_H=1
1657124099.960 KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS=0
1657124099.980 KFIOC_X_BLK_ALLOC_QUEUE_EXISTS=1
1657124100.000 KFIOC_X_BLK_ALLOC_DISK_EXISTS=0
1657124100.020 KFIOC_X_HAS_MAKE_REQUEST_FN=0
1657124100.040 KFIOC_X_GENHD_PART0_IS_A_POINTER=0
1657124100.060 KFIOC_X_BIO_HAS_BI_BDEV=0
1657124100.080 KFIOC_X_SUBMIT_BIO_RETURNS_BLK_QC_T=1
1657124100.099 KFIOC_X_VOID_ADD_DISK=1
1657124100.120 KFIOC_X_DISK_HAS_OPEN_MUTEX=0
Finished
1657124100.132 Exiting
Preserving configdir due to '-p' option: /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/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
/bin/sh: 1: make[3]:: not found
/bin/sh: 1: make[3]:: not found
make \
-j8 \
-C /lib/modules/5.10.0-15-amd64/build \
FIO_DRIVER_NAME=iomemory-vsl4 \
FUSION_DRIVER_DIR=/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build \
M=/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build \
EXTRA_CFLAGS+="-I/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/include -DBUILDING_MODULE -DLINUX_IO_SCHED -Wall" \
INSTALL_MOD_DIR=extra/fio \
INSTALL_MOD_PATH= \
KFIO_LIB=kfio/x86_64_cc_libkfio.o_shipped \
modules
make[4]: Entering directory '/usr/src/linux-headers-5.10.0-15-amd64'
printf '#include "linux/module.h"\nMODULE_LICENSE("GPL");\n' >/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/license.c
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/main.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/dbgset.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/license.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/pci.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/sysrq.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/driver_init.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kfio.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/errno.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/state.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kmsg.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/six_lock.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kcache.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kfile.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kmem.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kscatter.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/ktime.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/sched.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/cdev.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kscsi.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kscsi_host.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kblock.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kcpu.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kcondvar.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/common_kinfo.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kinfo.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kinit.o
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kfio_common.o
/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kcpu.c: In function ‘kfio_map_cpus_to_read_queues’:
/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kcpu.c:214:5: warning: ISO C90 forbids variable length array ‘node_hist’ [-Wvla]
214 | uint32_t node_hist[nodes_possible], node_map[nodes_possible];
| ^~~~~~~~
/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kcpu.c:214:5: warning: ISO C90 forbids variable length array ‘node_map’ [-Wvla]
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/khotplug.o
make[6]: *** No rule to make target '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kfio/x86_64_cc_libkfio.o', needed by '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/iomemory-vsl4.o'. Stop.
make[6]: *** Waiting for unfinished jobs....
CC [M] /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kcsr.o
make[5]: *** [/usr/src/linux-headers-5.10.0-15-common/Makefile:1846: /var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build] Error 2
make[4]: *** [/usr/src/linux-headers-5.10.0-15-common/Makefile:185: __sub-make] Error 2
make[4]: Leaving directory '/usr/src/linux-headers-5.10.0-15-amd64'
make[3]: *** [Makefile:136: modules] Error 2
make[3]: Leaving directory '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build'
root@nas1:/opt/iomemory-vsl4#
it's the same error in the log file
o_O
It did fill out the module_operations in my original log
make[1]: Entering directory '/opt/iomemory-vsl4/root/usr/src/iomemory-vsl4-4.3.7'
./module_operations.sh -n "iomemory-vsl4" -v "fe767c6" -d
Doing just root@nas1:/opt/iomemory-vsl4/root/usr/src/iomemory-vsl4-4.3.7# ./module_operations.sh -n "iomemory-vsl4" -v "fe767c6" -d
gives same error
make[5]: *** No rule to make target '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/kfio/x86_64_cc_libkfio.o', needed by '/var/lib/dkms/iomemory-vsl4/5.10.0-15-fe767c6/build/iomemory-vsl4.o'. Stop.
Think it might be my CROSS_COMPILE thats not set
ifneq ($(CROSS_COMPILE),)
FIOCC=$(CROSS_COMPILE)gcc
else
FIOCC=$(CC)
endif
root@nas1:/usr/src/iomemory-vsl4-5.10.0-15-fe767c6# printenv
SHELL=/bin/bash
LANGUAGE=en_US:en
MAKE_TERMOUT=/dev/pts/1
PWD=/usr/src/iomemory-vsl4-5.10.0-15-fe767c6
LOGNAME=root
HOME=/root
LANG=en_US.UTF-8
MFLAGS=-w
MAKEFLAGS=w
TERM=xterm-256color
USER=root
MAKE_TERMERR=/dev/pts/1
SHLVL=2
MAKELEVEL=2
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
MAIL=/var/mail/root
OLDPWD=/opt/iomemory-vsl4
_=/usr/bin/printenv
So fixed it.
This was the fix
make CC=gcc dkms
Bug description
Trying to build dkms, but fails.
How to reproduce
What are the steps to reproduce the reported issue.
Shell output
Last lines of make.log
dkms build
Environment information
Information about the system the module is used on
5.10.0-15-amd64
gcc (Debian 10.2.1-6) 10.2.1 20210110
Debian GNU/Linux 11 (bullseye)
main