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

Can not compile with CentOS 7 & 5.4 kernel #11745

Closed
jason-akw opened this issue Mar 14, 2021 · 7 comments
Closed

Can not compile with CentOS 7 & 5.4 kernel #11745

jason-akw opened this issue Mar 14, 2021 · 7 comments
Labels
Status: Understood The root cause of the issue is known Type: Building Indicates an issue related to building binaries

Comments

@jason-akw
Copy link

System information

Type Version/Name
Distribution Name CentOS
Distribution Version 7.9.2009
Linux Kernel 5.4.96-200.el7.x86_64
Architecture x86_64
ZFS Version 0.8.6

Describe the problem you're observing

I'm installing zfs through this guide: https://openzfs.github.io/openzfs-docs/Getting%20Started/RHEL%20and%20CentOS.html#dkms
But the dkms compile failed with 5.4.96-200.el7.x86_64 kernel.
(Need to enable the centos-kernel repo on /usr/yum.repos.d/CentOS-x86_64-kernel.repo to install 5.4 kernel on CentOS 7)

Describe how to reproduce the problem

The DKMS install failed, I've tried manually compile it with "dkms install -m zfs -v 0.8.6", but it still failed.

Include any warning/errors/backtraces from the system logs

# dkms install -m zfs -v 0.8.6

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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-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... /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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
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... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /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 /bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : 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... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/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... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
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 linux distribution... redhat
checking default package type... rpm
checking default init directory... ${prefix}/etc/init.d
checking default init script type... redhat
checking default init config directory... /etc/sysconfig
checking whether initramfs-tools is available... no
checking whether rpm is available... yes (4.11.3)
checking whether rpmbuild is available... yes (4.11.3)
checking whether spec files are available... yes (rpm/generic/*.spec.in)
checking whether dpkg is available... no
checking whether dpkg-buildpackage is available... no
checking whether alien is available... no
checking for ld... /bin/ld -m elf_x86_64
checking if the linker (/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... lib64,lib64
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... /bin/msgfmt
checking for gmsgfmt... /bin/msgfmt
checking for xgettext... /bin/xgettext
checking for msgmerge... /bin/msgmerge
checking zfs config... kernel
checking whether gcc supports -Wno-unused-but-set-variable... yes
checking whether gcc supports -Wno-bool-compare... no
checking whether gcc supports -Wframe-larger-than=<size>... 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 whether host toolchain supports MOVBE... yes
checking for target asm dir... asm-x86_64
checking for python3... no
checking for python2... python2
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
checking for python2.7... /bin/python2.7
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '2.7.0'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/usr/include/python2.7
checking for Python library path... -L/usr/lib64 -lpython2.7
checking for Python site-packages path... /usr/lib/python2.7/site-packages
checking python extra libraries... -lpthread -ldl  -lutil -lm
checking python extra linking flags... -Xlinker -export-dynamic
checking consistency of all components of python development environment... yes
checking for python2.7 module: setuptools... yes
checking for python2.7 module: cffi... yes
checking whether to enable pyzfs: ... yes
checking kernel source directory... /lib/modules/5.4.96-200.el7.x86_64/build
checking kernel build directory... /lib/modules/5.4.96-200.el7.x86_64/build
checking kernel source version... 5.4.96-200.el7.x86_64
checking kernel file name for module symbols... Module.symvers
checking whether modules can be built... no
configure: error: 
	*** Unable to build an empty module.
			

Building module:
cleaning build area...(bad exit status: 2)
make -j16 KERNELRELEASE=5.4.96-200.el7.x86_64...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.96-200.el7.x86_64 (x86_64)
Consult /var/lib/dkms/zfs/0.8.6/build/make.log for more information.
@jason-akw jason-akw added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Mar 14, 2021
@jason-akw
Copy link
Author

config.log file:
config.log

@angstymeat
Copy link

I've had the same failure a few weeks ago compiling it directly with autogen, configure, and make install. I didn't have time to look into it to closely and then forgot about it, but it seemed to me that the kernel-lt and associated dev packages are missing pieces.

It would be great if someone from the openzfs team could take a look and see if this is a ZFS build issue, or a kernel issue.

@behlendorf
Copy link
Contributor

This looks like it may be a duplicate of #9755. See this #9755 (comment) for details and a possible workaround.

@angstymeat
Copy link

angstymeat commented Mar 18, 2021

After reading that, I installed gcc-8 and got a lot farther, almost to the end, before I got this:

make -C /usr/src/kernels/5.4.105-1.el7.elrepo.x86_64 M=`pwd`  CONFIG_ZFS=m modules
make[3]: Entering directory `/usr/src/kernels/5.4.105-1.el7.elrepo.x86_64'
  Building modules, stage 2.
  MODPOST 9 modules
FATAL: parse error in symbol dump file
make[5]: *** [__modpost] Error 1
make[4]: *** [modules] Error 2
make[3]: *** [sub-make] Error 2
make[3]: Leaving directory `/usr/src/kernels/5.4.105-1.el7.elrepo.x86_64'
make[2]: *** [modules-Linux] Error 2
make[2]: Leaving directory `/root/src/zfs/module'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/src/zfs'

@angstymeat
Copy link

Ok, I got it to work by installing gcc-9.

Is this an issue with needing gcc-9 for kernel 5.4 & above, or specifically with ZFS?

@behlendorf
Copy link
Contributor

This isn't specific to ZFS, it's a problem for other external modules. It seems kernel 5.4 and above require gcc-9.

@behlendorf behlendorf added Type: Building Indicates an issue related to building binaries and removed Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Mar 18, 2021
@angstymeat
Copy link

Ok, thanks. I'll update that on the machines I need to install ZFS on.

@behlendorf behlendorf added the Status: Understood The root cause of the issue is known label Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Understood The root cause of the issue is known Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

No branches or pull requests

3 participants