Skip to content
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

Closed
johnnyjacq16 opened this issue Feb 3, 2020 · 9 comments · Fixed by #13096
Closed

Installing zfs from the repo will not build on the kernel #9935

johnnyjacq16 opened this issue Feb 3, 2020 · 9 comments · Fixed by #13096
Labels
Component: Packaging custom packages Type: Building Indicates an issue related to building binaries

Comments

@johnnyjacq16
Copy link

System information

Type Version/Name
Distribution Name Debian (Parrot OS)
Distribution Version Testing
Linux Kernel 5.4.0-1parrot1-amd64
Architecture x86_64
ZFS Version 0.8.3-1
SPL Version 0.8.3-1

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.

@bobberb
Copy link

bobberb commented Feb 3, 2020

Same here on 5.5.1. Downgraded to linux 5.4.15 and was able to build zfs 0.8.3.

@prensing
Copy link

Also a problem on Debian 10 using backports (actually Linux Mint LDME 4).

@yurikoles
Copy link

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. linux-headers-<version>-amd64. And some headers in arch-neutral package, e.g. linux-headers-<version>-common. But now they seem to be moved some headers required by ZFS to a common package and ZFS doesn't find them.

So as for current sid kernel there is following dirs:

/usr/src/linux-headers-5.6.0-1-amd64
/usr/src/linux-headers-5.6.0-1-common

A simple, but a dirty workaround is just to copy headers from common dir to arch specific one, e.g. amd64:

sudo rsync -a /usr/src/linux-headers-5.6.0-1-common/ /usr/src/linux-headers-5.6.0-1-amd64/

@johnnyjacq16
Copy link
Author

johnnyjacq16 commented Jul 3, 2020

@yurikoles also what you can do isln -s /usr/src/linux-headers-5.5.0-kali2-common/include/linux/ /usr/src/linux-headers-5.5.0-kali2-amd64/include/linux however these are temparary fixes

@johnnyjacq16
Copy link
Author

johnnyjacq16 commented Jul 3, 2020

@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:
apt list linux-headers-5.5.0-kali2-*
Listing... Done
linux-headers-5.5.0-kali2-amd64/now 5.5.17-1kali1 amd64 [installed,local]
linux-headers-5.5.0-kali2-common/now 5.5.17-1kali1 all [installed,local]

Package linux-headers-5.5.0-kali2-amd64 is installed in the location below:
dpkg -L linux-headers-5.5.0-kali2-amd64
/usr/src/linux-headers-5.5.0-kali2-amd64

Package linux-headers-5.5.0-kali2-common is installed in the location below:
dpkg -L linux-headers-5.5.0-kali2-common
/usr/src/linux-headers-5.5.0-kali2-common

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.

@behlendorf behlendorf added Type: Building Indicates an issue related to building binaries Component: Packaging custom packages labels Jul 6, 2020
@kneutron
Copy link

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
linux-image-amd64 linux-image-4.19.0-10-amd64

' reboot ' into new kernel

Using midnight commander makes this easy:

mc /usr/src
( cd down into /usr/src/linux-headers-4.19.0-10-common/include/linux ) on the left pane

^O to shell prompt
thisd=$PWD

^O back to MC, then
Tab to 2nd pane

( cd into /usr/src/linux-headers-4.19.0-10-amd64/include )
^O again
ln -sfn $thisd .

Expected result:

/usr/src/linux-headers-4.19.0-10-amd64/include # ls -l
drwxr-xr-x   4 root root    50 Sep 24 00:43 .
drwxr-xr-x   4 root root   138 Sep 24 00:13 ..
drwxr-xr-x 735 root root 36864 Sep 24 00:13 config
drwxr-xr-x   3 root root   146 Sep 24 00:13 generated
lrwxrwxrwx   1 root root    53 Sep 24 00:43 linux -> /usr/src/linux-headers-4.19.0-10-common/include/linux

At this point you should be able to ' apt update; apt-get -t buster-backports install zfs-dkms '

If you then get an error:

dpkg: dependency problems prevent configuration of zfs-zed:
 zfs-zed depends on zfsutils-linux (>= 0.8.4-2~bpo10+1); however:
  Package zfsutils-linux is not configured yet.

FIX:
apt-get -f install

zpool version
zfs-0.8.4-2bpo10+1 / zfs-kmod-0.8.4-2bpo10+1

@danieldjewell
Copy link

FWIW, this is still an issue on Debian/Sid with Kernel 5.10.0-8

Notes:

  • The process of building the *.deb files from source (https://openzfs.github.io/openzfs-docs/Developer%20Resources/Custom%20Packages.html#dkms-1) does work to make the package files. But they won't install - the DKMS build fails.
  • Symlinking /usr/src/linux-headers-{version}-common/include/linux to /usr/src/linux-headers-{version}-amd64/include appears to work
  • There are some naming differences in the packages made from source and those available in the debian repository (at least between v2.0.3 in debian/sid and master as of now) creating some conflicts when upgrading

@szubersk
Copy link
Contributor

szubersk commented Feb 12, 2022

Can't confirm issues reported here.

buster

root@laptop:/# apt list zfs-dkms linux-headers-amd64; ls  /lib/modules/*/updates/dkms/
Listing... Done
linux-headers-amd64/oldstable,now 4.19+105+deb10u13 amd64 [installed]
zfs-dkms/oldstable,now 0.7.12-2+deb10u2 all [installed]
icp.ko  spl.ko  splat.ko  zavl.ko  zcommon.ko  zfs.ko  znvpair.ko  zpios.ko  zunicode.ko

buster + backports

root@laptop:/# apt list zfs-dkms linux-headers-amd64; ls  /lib/modules/*/updates/dkms/
Listing... Done
linux-headers-amd64/buster-backports,now 5.10.70-1~bpo10+1 amd64 [installed]
zfs-dkms/buster-backports,now 2.0.3-9~bpo10+1 all [installed]
icp.ko  spl.ko  zavl.ko  zcommon.ko  zfs.ko  zlua.ko  znvpair.ko  zunicode.ko  zzstd.ko

zfs 2.0.X from git + Debian kernel 5.10

checking kernel source directory... /usr/lib/linux-kbuild-5.10
checking kernel build directory... /usr/lib/linux-kbuild-5.10
checking kernel source version... Not found
configure: error: 
        *** Cannot find UTS_RELEASE definition.

root@laptop:/ZFS# ls -l /usr/src/
total 0
drwxr-xr-x 4 root root 200 Feb 12 16:53 linux-headers-5.10.0-10-amd64
drwxr-xr-x 4 root root 140 Feb 12 16:53 linux-headers-5.10.0-10-common
lrwxrwxrwx 1 root root  24 Dec  8 16:21 linux-kbuild-5.10 -> ../lib/linux-kbuild-5.10

configure incorrectly detects kernel source and build directory. As a workaround I'd suggest passing

--with-linux=/lib/modules/$(KERNEL_VERSION)/source --with-linux-obj=/lib/modules/$(KERNEL_VERSION)/build

to configure.

zfs 0.8.X from git + vanilla kernel 5.9

Mamma mia! Build went fine. dpkg -i *.deb produces:

make: [Makefile:1557: gitrev] Error 128 (ignored)
/var/lib/dkms/zfs/0.8.6/build/module/spl/spl-cred.c:88:11: error: 'NGROUPS_PER_BLOCK' undeclared (first use in this function)
/var/lib/dkms/zfs/0.8.6/build/module/spl/spl-cred.c:113:8: error: 'struct group_info' has no member named 'nblocks'
/var/lib/dkms/zfs/0.8.6/build/module/spl/spl-cred.c:114:27: error: 'struct group_info' has no member named 'blocks'
make[5]: *** [scripts/Makefile.build:283: /var/lib/dkms/zfs/0.8.6/build/module/spl/spl-cred.o] Error 1
make[4]: *** [scripts/Makefile.build:500: /var/lib/dkms/zfs/0.8.6/build/module/spl] Error 2
/var/lib/dkms/zfs/0.8.6/build/module/icp/asm-x86_64/aes/aesopt.h:219:2: error: #error Assembler code is only available for x86 and AMD64 systems
  219 | #error Assembler code is only available for x86 and AMD64 systems

On top of those make deb-utils deb-dkms cannot have -j any bigger than 1 because build fails right away. Seems to be fixed in 2.0.X.

@szubersk
Copy link
Contributor

szubersk commented Feb 14, 2022

@johnnyjacq16 @bobberb @prensing @yurikoles @kneutron @danieldjewell Please try cherry-picking #13096 on top of desired branch and confirm if it solved your issues.

behlendorf pushed a commit that referenced this issue Feb 16, 2022
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
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Feb 24, 2022
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
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
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
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Aug 30, 2022
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
lundman pushed a commit to openzfsonwindows/openzfs that referenced this issue Sep 1, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this issue Sep 23, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Packaging custom packages Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants