-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing zfs from the repo will not build on the kernel #9935
Comments
Same here on 5.5.1. Downgraded to linux 5.4.15 and was able to build zfs 0.8.3. |
Also a problem on Debian 10 using backports (actually Linux Mint LDME 4). |
The Debian bug tracker is full of similar reports. This issue is reproducible on recent kernels from buster-backports (10), bullseye (11), sid (unstable), but I didn't try experimental yet. I can confirm this on ZFS 0.8.3, 0.8.4 and current master. It seems like Debian made some changes in how they split kernel headers. They always put some headers in arch-specific package, e.g. So as for current sid kernel there is following dirs:
A simple, but a dirty workaround is just to copy headers from common dir to arch specific one, e.g. amd64:
|
@yurikoles also what you can do is |
@behlendorf @ahrens there is a zfs compilation issue on debian and debian based distros when installing zfs from the repo this is due to the headers files being installed by two different packages into two different locations show below: header pacakges are that required: Package linux-headers-5.5.0-kali2-amd64 is installed in the location below: Package linux-headers-5.5.0-kali2-common is installed in the location below: The bug is also on debian bug tracker shown by @yurikoles the same issue can be viewed on https://bugs.debian.org/cgi-bin/bugreport.cgi?att=2;bug=958121;filename=dkms.log;msg=5 scroll to the botom of the page. |
This helped me get ZFS 084 running on Linux Mint LMDE, so let me provide the full process: Install updated kernel: apt install linux-headers-4.19.0-10-amd64 linux-image-4.19.0-10-amd64-dbg ' reboot ' into new kernel Using midnight commander makes this easy: mc /usr/src ^O to shell prompt ^O back to MC, then ( cd into /usr/src/linux-headers-4.19.0-10-amd64/include ) Expected result:
At this point you should be able to ' apt update; apt-get -t buster-backports install zfs-dkms ' If you then get an error:
FIX: zpool version |
FWIW, this is still an issue on Debian/Sid with Kernel 5.10.0-8 Notes:
|
Can't confirm issues reported here. buster
buster + backports
zfs 2.0.X from git + Debian kernel 5.10
to configure. zfs 0.8.X from git + vanilla kernel 5.9Mamma mia! Build went fine.
On top of those |
@johnnyjacq16 @bobberb @prensing @yurikoles @kneutron @danieldjewell Please try cherry-picking #13096 on top of desired branch and confirm if it solved your issues. |
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes #9935 Closes #13096
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes openzfs#9935 Closes openzfs#13096
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes openzfs#9935 Closes openzfs#13096
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes openzfs#9935 Closes openzfs#13096
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes openzfs#9935 Closes openzfs#13096
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes openzfs#9935 Closes openzfs#13096
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes openzfs#9935 Closes openzfs#13096
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes openzfs#9935 Closes openzfs#13096
Most modern Linux distributions have separate locations for bare source and prebuilt ("build") files. Additionally, there are `source` and `build` symlinks in `/lib/modules/$(KERNEL_VERSION)` pointing to them. The order of directory search is now: - `configure` command line values if both `--with-linux` and `--with-linux-obj` were defined - If only `--with-linux` was defined, `--with-linux-obj` is assumed to have the same value as `--with-linux` - If neither `--with-linux` nor `--with-linux-obj` were defined autodetection is used: - `/lib/modules/$(uname -r)/{source,build}` respectively, if exist - The first directory in `/lib/modules` with the highest version number according to `sort -V` which contains `source` and `build` symlinks/directories - The first directory matching `/usr/src/kernels/*` and `/usr/src/linux-*` with the highest version number according to `sort -V`. Here the source and prebuilt directories are assumed to be the same. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes openzfs#9935 Closes openzfs#13096
System information
Describe the problem you're observing
NR_FILE_PAGES in either node_stat_item or zone_stat_item: NOT FOUND
configure: error:
*** None of the expected "global page state" interfaces were detected.
*** This may be because your kernel version is newer than what is
*** supported, or you are using a patched custom kernel with
*** incompatible modifications.
***
*** ZFS Version: zfs-0.8.3-1
*** Compatible Kernels: 2.6.32 - 5.4
Building module:
cleaning build area...(bad exit status: 2)
make -j4 KERNELRELEASE=5.4.0-3parrot1-amd64...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.0-3parrot1-amd64 (x86_64)
Consult /var/lib/dkms/zfs/0.8.3/build/make.log for more information.
Describe how to reproduce the problem
#apt install linux-image-5.4.0-3parrot1-amd64 linux-headers-5.4.0-3parrot1-amd64 zfs-dkms zfs-initramfs
when trying to using dkms to build the module:
#dkms install -m zfs -v 0.8.3 -k 5.4.0-3parrot1-amd64
Kernel preparation unnecessary for this kernel. Skipping...
Running the pre_build script:
checking for gawk... gawk
checking metadata... META file
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... none
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking dependency style of gcc... none
checking whether to build with code coverage support... no
checking how to create a pax tar archive... gnutar
checking zfs author... OpenZFS on Linux
checking zfs license... CDDL
checking for ld... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... no
checking for the common suffixes of directories in the library search path... lib,lib
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration... extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking zfs config... kernel
checking whether gcc supports -Wno-unused-but-set-variable... yes
checking whether gcc supports -Wno-bool-compare... yes
checking whether gcc supports -Wframe-larger-than=... yes
checking whether gcc supports -Wno-format-truncation... yes
checking whether gcc supports -fno-omit-frame-pointer... yes
checking whether to build with -fsanitize=address support... no
checking whether host toolchain supports SSE... yes
checking whether host toolchain supports SSE2... yes
checking whether host toolchain supports SSE3... yes
checking whether host toolchain supports SSSE3... yes
checking whether host toolchain supports SSE4.1... yes
checking whether host toolchain supports SSE4.2... yes
checking whether host toolchain supports AVX... yes
checking whether host toolchain supports AVX2... yes
checking whether host toolchain supports AVX512F... yes
checking whether host toolchain supports AVX512CD... yes
checking whether host toolchain supports AVX512DQ... yes
checking whether host toolchain supports AVX512BW... yes
checking whether host toolchain supports AVX512IFMA... yes
checking whether host toolchain supports AVX512VBMI... yes
checking whether host toolchain supports AVX512PF... yes
checking whether host toolchain supports AVX512ER... yes
checking whether host toolchain supports AVX512VL... yes
checking whether host toolchain supports AES... yes
checking whether host toolchain supports PCLMULQDQ... yes
checking for target asm dir... asm-x86_64
checking for python3... python3
checking for python version... 3.7
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.7/site-packages
checking for python3.7... /usr/bin/python3.7
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '3.4.0'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/usr/include/python3.7m
checking for Python library path... -L/usr/lib -lpython3.7m
checking for Python site-packages path... /usr/lib/python3/dist-packages
checking python extra libraries... -lcrypt -lpthread -ldl -lutil -lm
checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
checking consistency of all components of python development environment... yes
checking for python3.7 module: setuptools... yes
checking for python3.7 module: cffi... yes
checking whether to enable pyzfs: ... yes
checking kernel source directory... /lib/modules/5.4.0-3parrot1-amd64/build
checking kernel build directory... /lib/modules/5.4.0-3parrot1-amd64/build
checking kernel source version... 5.4.0-3parrot1-amd64
checking kernel file name for module symbols... Module.symvers
checking whether modules can be built... yes
checking for kernel config option compatibility... done
checking whether kernel was built with 16K or larger stacks... yes
checking whether mutex_lock() is GPL-only... no
checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... yes
checking whether CONFIG_ZLIB_INFLATE is defined... yes
checking whether CONFIG_ZLIB_DEFLATE is defined... yes
checking whether fpu headers are available... asm/fpu/api.h
checking whether wait_queue_entry_t exists... yes
checking whether /dev/zfs minor is available... grep: /lib/modules/5.4.0-3parrot1-amd64/build/include/linux/miscdevice.h: No such file or directory
249
checking whether DECLARE_EVENT_CLASS() is available... no
checking for available kernel interfaces... done
checking whether access_ok() has 'type' parameter... no
checking whether global_node_page_state() exists... yes
checking whether global_zone_page_state() exists... yes
checking whether enum node_stat_item contains NR_FILE_PAGES... no
checking whether enum node_stat_item contains NR_INACTIVE_ANON... no
checking whether enum node_stat_item contains NR_INACTIVE_FILE... no
checking whether enum node_stat_item contains NR_SLAB_RECLAIMABLE... no
checking whether enum zone_stat_item contains NR_FILE_PAGES... no
checking whether enum zone_stat_item contains NR_INACTIVE_ANON... no
checking whether enum zone_stat_item contains NR_INACTIVE_FILE... no
checking whether enum zone_stat_item contains NR_SLAB_RECLAIMABLE... no
checking whether global_page_state enums are sane... no
NR_FILE_PAGES in either node_stat_item or zone_stat_item: NOT FOUND
configure: error:
*** None of the expected "global page state" interfaces were detected.
*** This may be because your kernel version is newer than what is
*** supported, or you are using a patched custom kernel with
*** incompatible modifications.
***
*** ZFS Version: zfs-0.8.3-1
*** Compatible Kernels: 2.6.32 - 5.4
Building module:
cleaning build area...(bad exit status: 2)
make -j4 KERNELRELEASE=5.4.0-3parrot1-amd64...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.0-3parrot1-amd64 (x86_64)
Consult /var/lib/dkms/zfs/0.8.3/build/make.log for more information.
Include any warning/errors/backtraces from the system logs
#cat /var/lib/dkms/zfs/0.8.3/build/make.log
DKMS make.log for zfs-0.8.3 for kernel 5.4.0-3parrot1-amd64 (x86_64)
Mon 3 Feb 18:51:46 GMT 2020
make: *** No targets specified and no makefile found. Stop.
The text was updated successfully, but these errors were encountered: