Description of problem: Rehash of the same problem described in closed bug https://bugzilla.redhat.com/show_bug.cgi?id=1758710 Attempting to build NV video drivers for F31 Kernel driver build fails citing absence of classmap.h on disk. Reinstall of kernel-headers fails to clear the error. "make scripts" fails, citing the absence of classmap.h Version-Release number of selected component (if applicable): /usr/src/kernels/5.5.15-200.fc31.x86_64 How reproducible: Always. Steps to Reproduce: 1. dnf --enablerepo=fedora-debuginfo install kernel kernel-core kernel-devel kernel-modules kernel-headers kernel-debuginfo-common 2. cd /usr/src/kernels/5.5.15-200.fc31.x86_64 3. make oldconfig && make prepare . Actual results: [root@localhost 5.5.15-200.fc31.x86_64]# make oldconfig && make prepare scripts/kconfig/conf --oldconfig Kconfig # # No change to .config # HOSTCC arch/x86/tools/relocs_32.o HOSTCC arch/x86/tools/relocs_64.o HOSTCC arch/x86/tools/relocs_common.o HOSTLD arch/x86/tools/relocs HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[3]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[2]: *** [scripts/Makefile.build:503: scripts/selinux/genheaders] Error 2 make[1]: *** [scripts/Makefile.build:503: scripts/selinux] Error 2 make: *** [Makefile:1098: scripts] Error 2 [root@localhost 5.5.15-200.fc31.x86_64]# uname -a Linux localhost 5.5.15-200.fc31.x86_64 #1 SMP Thu Apr 2 19:16:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Expected results: "make prepare" should work Additional info:
I have the same behaviour, with fedora 31 with kernel version, 5.5.9-200.fc31.x86_64. Packages kernel-devel, kernel, kernel-core kernel-modules & kernel-modules-extra are installed. When trying to build a kernel module for a new PCI A/D board from source, I get: === make[1]: Entering directory '/usr/src/kernels/5.5.9-200.fc31.x86_64' HOSTCC arch/x86/tools/relocs_32.o HOSTCC arch/x86/tools/relocs_64.o HOSTCC arch/x86/tools/relocs_common.o HOSTLD arch/x86/tools/relocs HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[4]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[3]: *** [scripts/Makefile.build:503: scripts/selinux/genheaders] Error 2 make[2]: *** [scripts/Makefile.build:503: scripts/selinux] Error 2 make[1]: *** [Makefile:1098: scripts] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.5.9-200.fc31.x86_64' make: *** [Makefile:54: default] Error 2 === Moreover, the aforementioned package kernel-debuginfo-common does not exist, at least for this kernel version, in F31 repo: === # dnf --enablerepo=fedora-debuginfo install kernel-debuginfo-common-5.5.9-200.fc31.x86_64 Last metadata expiration check: 0:02:12 ago on Wed 08 Apr 2020 02:51:49 PM -03. No match for argument: kernel-debuginfo-common-5.5.9-200.fc31.x86_64 Error: Unable to find a match: kernel-debuginfo-common-5.5.9-200.fc31.x86_64 ===
Adding to my previous comment, not even kernel can be built: === [rmd@ryzen7gtx580 kernel]$ make oldconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --oldconfig Kconfig # # configuration written to .config # [rmd@ryzen7gtx580 kernel]$ make scripts/kconfig/conf --syncconfig Kconfig HOSTCC arch/x86/tools/relocs_32.o HOSTCC arch/x86/tools/relocs_64.o HOSTCC arch/x86/tools/relocs_common.o HOSTLD arch/x86/tools/relocs HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[3]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[2]: *** [scripts/Makefile.build:503: scripts/selinux/genheaders] Error 2 make[1]: *** [scripts/Makefile.build:503: scripts/selinux] Error 2 make: *** [Makefile:1098: scripts] Error 2 === I think it's a fairly nasty bug Regards
I'm seeing the same problem on my F31 host as well when trying to compile kernel modules for VMware Workstation. ===== [root@aries]# uname -a Linux aries 5.5.15-200.fc31.x86_64 #1 SMP Thu Apr 2 19:16:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [root@aries vmnet-only]# make Using kernel build system. make -C /lib/modules/5.5.15-200.fc31.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[1]: Entering directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' HOSTLD arch/x86/tools/relocs HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[4]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[3]: *** [scripts/Makefile.build:503: scripts/selinux/genheaders] Error 2 make[2]: *** [scripts/Makefile.build:503: scripts/selinux] Error 2 make[1]: *** [Makefile:1098: scripts] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' make: *** [Makefile:110: vmnet.ko] Error 2 ===== Interesting aside: The latest NVidia Unix driver installer compiled its modules without issue.
Update: I downloaded the 5.5.15-200.fc31 SOURCE rpm and built out the source tree, then copied over the missing header files to the appropriate location in my /usr/scr/kernels tree. Suffice to say that classmap.h wasn't the only missing file that the compiler expected to find. After locating and copying over several others, I hit this snag: ====== [root@aries vmnet-only]# make Using kernel build system. make -C /lib/modules/5.5.15-200.fc31.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[1]: Entering directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' DESCEND objtool make[5]: *** No rule to make target '/usr/src/kernels/5.5.15-200.fc31.x86_64/tools/objtool/fixdep.o', needed by '/usr/src/kernels/5.5.15-200.fc31.x86_64/tools/objtool/fixdep-in.o'. Stop. make[4]: *** [Makefile:43: /usr/src/kernels/5.5.15-200.fc31.x86_64/tools/objtool/fixdep-in.o] Error 2 make[3]: *** [/usr/src/kernels/5.5.15-200.fc31.x86_64/tools/build/Makefile.include:5: fixdep] Error 2 make[2]: *** [Makefile:67: objtool] Error 2 make[1]: *** [Makefile:1797: tools/objtool] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' make: *** [Makefile:110: vmnet.ko] Error 2 ======= I've seen some notes from Gentoo forums indicating that this error originated due to a missing file /usr/include/bits/byteswap-16.h This file is NOT present on my F31 system, nor can DNF tell me which package provides it. However, /usr/include/bits/byteswap.h is provided in glibc-headers-2.30-11.fc31.x86_64
After doing a forced reinstallation of kernel-devel and kernel-headers, then running "make clean" on both this vmware module directory and on my /usr/src/kernel/5.5.15-xxxx tree, here's the full output: ======= [root@aries vmnet-only]# make Using kernel build system. make -C /lib/modules/5.5.15-200.fc31.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[1]: Entering directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' HOSTLD scripts/kconfig/conf scripts/kconfig/conf --syncconfig Kconfig MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/modpost.o CC scripts/mod/devicetable-offsets.s HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost DESCEND objtool make[5]: *** No rule to make target '/usr/src/kernels/5.5.15-200.fc31.x86_64/tools/objtool/fixdep.o', needed by '/usr/src/kernels/5.5.15-200.fc31.x86_64/tools/objtool/fixdep-in.o'. Stop. make[4]: *** [Makefile:43: /usr/src/kernels/5.5.15-200.fc31.x86_64/tools/objtool/fixdep-in.o] Error 2 make[3]: *** [/usr/src/kernels/5.5.15-200.fc31.x86_64/tools/build/Makefile.include:5: fixdep] Error 2 make[2]: *** [Makefile:67: objtool] Error 2 make[1]: *** [Makefile:1797: tools/objtool] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' make: *** [Makefile:110: vmnet.ko] Error 2
Same issue when trying to build (patched) AMD RAIDCORE drivers All required as well as possibly unnecessary dependencies were installed prior to attempting the compilation below: {kernel-devel, kernel-headers, libselinux-devel, selinux-policy-devel, policycoreutils-devel, kernel source rpm installed to ~/rpmbuild/SOURCES} ======= $ sudo /bin/bash ./install ------------------------------------------------------------ - building for kernel 5.5.15-200.fc31.x86_64 ------------------------------------------------------------ make -C /lib/modules/5.5.15-200.fc31.x86_64/build SUBDIRS=/home/sai/Downloads/raid_linux_driver_8_01_00_039_public/driver_sdk/src modules make[1]: Entering directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[4]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[3]: *** [scripts/Makefile.build:503: scripts/selinux/genheaders] Error 2 make[2]: *** [scripts/Makefile.build:503: scripts/selinux] Error 2 make[1]: *** [Makefile:1098: scripts] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' make: *** [Makefile:60: all] Error 2 ERROR: Failed to build the RAIDCORE Drivers. Please make sure kernel source rpm is installed for 5.5.15-200.fc31.x86_64. ======= Definitely seems to be a kernel-side issue.
How to reproduce the issue (1) Create a simple kernel source == nothing.c === #include <linux/module.h> #include <linux/kernel.h> MODULE_DESCRIPTION("Do nothing kernel module"); /* MODULE_AUTHOR("anonymous"); */ MODULE_LICENSE("GPL"); ================ (2) Create a Makefile KERNELSRCDIR = /usr/src/kernels/5.5.15-200.fc31.x86_64 BUILD_DIR := $(shell pwd) VERBOSE = 1 CPPFLAGS = -Wno-error=implicit-function-declaration # module name obj-m := nothing.o all: make -C $(KERNELSRCDIR) SUBDIRS=$(BUILD_DIR) KBUILD_VERBOSE=$(VERBOSE) modules clean: rm -f *.o rm -f *.ko rm -f *.obj rm -f *.mod.c rm -f *~ rm -f modules.order rm -f Module.symvers rm -f .*.cmd (3) compile the kernel source # make make -C /usr/src/kernels/5.5.15-200.fc31.x86_64 SUBDIRS=/root/module_source KBUILD_VERBOSE=1 modules make[1]: Entering directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' make -f ./scripts/Makefile.build obj=arch/x86/entry/syscalls all make -f ./scripts/Makefile.build obj=scripts/basic rm -f .tmp_quiet_recordmcount make -f ./scripts/Makefile.build obj=arch/x86/tools relocs make -f ./scripts/Makefile.build obj=scripts/dtc make -f ./scripts/Makefile.build obj=scripts make -f ./scripts/Makefile.build obj=scripts/selinux \ \ need-builtin= \ need-modorder= make -f ./scripts/Makefile.build obj=scripts/selinux/genheaders \ \ need-builtin= \ need-modorder= gcc -Wp,-MD,scripts/selinux/genheaders/.genheaders.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I./include/uapi -I./include -I./security/selinux/include -o scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[4]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[3]: *** [scripts/Makefile.build:503: scripts/selinux/genheaders] Error 2 make[2]: *** [scripts/Makefile.build:503: scripts/selinux] Error 2 make[1]: *** [Makefile:1098: scripts] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.5.15-200.fc31.x86_64' make: *** [Makefile:43: all] Error 2 Test Environment Linux masabert.localdomain 5.5.15-200.fc31.x86_64 #1 SMP Thu Apr 2 19:16:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux kernel-devel-5.5.15-200.fc31.x86_64 kernel-core-5.5.15-200.fc31.x86_64 kernel-debuginfo-5.5.15-200.fc31.x86_64 kernel-modules-extra-5.5.15-200.fc31.x86_64 kernel-modules-5.5.15-200.fc31.x86_64 kernel-headers-5.5.15-200.fc31.x86_64 kernel-debuginfo-common-x86_64-5.5.15-200.fc31.x86_64 kernel-5.5.15-200.fc31.x86_64 This symptom reproduce with SELinux Enforce and Permissive.
Occurs in 5.5.17 Linux lajiao 5.5.17-200.fc31.x86_64 #1 SMP Mon Apr 13 15:29:42 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux make[1]: Entering directory '/usr/src/kernels/5.5.17-200.fc31.x86_64' HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[4]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[3]: *** [scripts/Makefile.build:503: scripts/selinux/genheaders] Error 2 make[2]: *** [scripts/Makefile.build:503: scripts/selinux] Error 2 make[1]: *** [Makefile:1098: scripts] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.5.17-200.fc31.x86_64' make: *** [Makefile:167: compile] Error 2
Still happens in 5.6.6-200 on FC31 <<insert clutch head>>
Same thing trying to compile the DAHDI drivers under 5.5.16-100 and 5.5.17-200.
Still an issue for me in F32
I will get src.rpm here https://koji.fedoraproject.org/koji/packageinfo?packageID=8 Extract linux-5.6/security/selinux to my /usr/src linux-5.6/Documentation and some linux-5.6/tools
Still have this issue on 5.6.13-200.fc31 make scripts/kconfig/conf --syncconfig Kconfig HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[3]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[2]: *** [scripts/Makefile.build:505: scripts/selinux/genheaders] Error 2 make[1]: *** [scripts/Makefile.build:505: scripts/selinux] Error 2 make: *** [Makefile:1098: scripts] Error 2
I am seeing this problem on F31 with all updates installed, I believe all relevant kernel packages installed, and kernel 5.6.19-200. [root@jrgruher-wc2-cspp ptusys]# yum -y update Last metadata expiration check: 5:37:38 ago on Wed 24 Jun 2020 02:50:04 PM PDT. Dependencies resolved. Nothing to do. Complete! [root@jrgruher-wc2-cspp ptusys]# uname -a Linux jrgruher-wc2-cspp.jf.intel.com 5.6.19-200.fc31.x86_64 #1 SMP Wed Jun 17 16:54:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [root@jrgruher-wc2-cspp ptusys]# cat /etc/os-release |grep -i fedora NAME=Fedora ID=fedora PRETTY_NAME="Fedora 31 (Server Edition)" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:31" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f31/system-administrators-guide/" SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT="Fedora" PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" [root@jrgruher-wc2-cspp ptusys]# make clean all rm -f *.o *.ko *.mod.c Module.symvers modules.order rm -f \.*.o.cmd \.*.ko.cmd \.*.o.d rm -rf \.tmp_versions make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules make[1]: Entering directory '/usr/src/kernels/5.6.19-200.fc31.x86_64' HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[4]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[3]: *** [scripts/Makefile.build:505: scripts/selinux/genheaders] Error 2 make[2]: *** [scripts/Makefile.build:505: scripts/selinux] Error 2 make[1]: *** [Makefile:1106: scripts] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.6.19-200.fc31.x86_64' make: *** [Makefile:44: ptusys] Error 2 [root@jrgruher-wc2-cspp ptusys]# rpm -qa|grep kernel kernel-5.6.19-200.fc31.x86_64 kernel-modules-5.6.19-200.fc31.x86_64 kernel-core-5.3.7-301.fc31.x86_64 kernel-headers-5.6.18-200.fc31.x86_64 kernel-modules-5.3.7-301.fc31.x86_64 libreport-plugin-kerneloops-2.13.1-3.fc31.x86_64 abrt-addon-kerneloops-2.14.2-2.fc31.x86_64 kernel-devel-5.6.19-200.fc31.x86_64 kernel-core-5.6.19-200.fc31.x86_64 kernel-5.3.7-301.fc31.x86_64
This is bloody awful! People need to be able to install hardware and the drivers for it. This is what happened when I tried to make for the Panda WiFi adapter with the following kernel and modules. kernel-5.6.19-200.fc31.x86_64 kernel-devel-5.6.19-200.fc31.x86_64 kernel-modules-5.6.19-200.fc31.x86_64 kernel-modules-extra-5.6.19-200.fc31.x86_64 kernel-core-5.6.19-200.fc31.x86_64 # make make -C tools make[1]: Entering directory '/home/tcamuso/Downloads/panda/LinuxDriver4Fedora_v2.5.0.3/tools' gcc -g bin2h.c -o bin2h make[1]: Leaving directory '/home/tcamuso/Downloads/panda/LinuxDriver4Fedora_v2.5.0.3/tools' /home/tcamuso/Downloads/panda/LinuxDriver4Fedora_v2.5.0.3/tools/bin2h cp -f os/linux/Makefile.6 /home/tcamuso/Downloads/panda/LinuxDriver4Fedora_v2.5.0.3/os/linux/Makefile make -C /lib/modules/5.6.19-200.fc31.x86_64/build SUBDIRS=/home/tcamuso/Downloads/panda/LinuxDriver4Fedora_v2.5.0.3/os/linux modules make[1]: Entering directory '/usr/src/kernels/5.6.19-200.fc31.x86_64' HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[4]: *** [scripts/Makefile.host:107: scripts/selinux/genheaders/genheaders] Error 1 make[3]: *** [scripts/Makefile.build:505: scripts/selinux/genheaders] Error 2 make[2]: *** [scripts/Makefile.build:505: scripts/selinux] Error 2 make[1]: *** [Makefile:1106: scripts] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.6.19-200.fc31.x86_64' make: *** [Makefile:357: LINUX] Error 2
I'm trying to build HP's firmware update module on a fully up to date fedora 32 system. After extracting the Documentation folder from the kernel srpm and placing it in /usr/src/kernels/.. I get this far: make -C /lib/modules/5.6.19-300.fc32.x86_64/build SUBDIRS=/root/rpmbuild/BUILD/hpuefi-mod-3.01/hpuefi-mod-3.01 modules make[1]: Entering directory '/usr/src/kernels/5.6.19-300.fc32.x86_64' scripts/kconfig/conf --syncconfig Kconfig HOSTCC arch/x86/tools/relocs_32.o HOSTCC arch/x86/tools/relocs_64.o HOSTCC arch/x86/tools/relocs_common.o HOSTLD arch/x86/tools/relocs HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ I miss kernel-doc, and I miss being able to tinker with my kernel.
Still happening in 5.7.9. Serious issue.
Still not fixed in 5.7.10-201
Still not fixed in 5.7.11-200.fc32.x86_64, confirmed just now.
Still not fixed in 5.7.14-200.fc32.x86_64
This bug has been reported for months, with little more response than user-blaming from Fedora. Clearly the only real resolution is to switch to a better distro.
My experience is nearly the same with Ubuntu LTS. It still fails there but for a different reason. In my case, all I want is to build a driver for a PCI-E serial card. What a PITA.
this appears to continue to be an issue for F32. could OP, or admin, bump version to reflect that? it's @ F31 atm ...
It continues to be an issue for Linux fff523933ca1 5.7.16-200.fc32.x86_64, I do not know how it is not fixed or patched, or at least, some kind of answer from Fedora developers. I agree that the version should be updated. Regards.
OS: F32 Kernel 5.8.4-200 Linux masabert.localdomain 5.8.4-200.fc32.x86_64 #1 SMP Wed Aug 26 22:28:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux gcc -Wp,-MMD,scripts/selinux/genheaders/.genheaders.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I./include/uapi -I./include -I./security/selinux/include -o scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[4]: *** [scripts/Makefile.host:103: scripts/selinux/genheaders/genheaders] Error 1 make[3]: *** [scripts/Makefile.build:497: scripts/selinux/genheaders] Error 2 make[2]: *** [scripts/Makefile.build:497: scripts/selinux] Error 2 make[1]: *** [Makefile:1159: scripts] Error 2 make[1]: Leaving directory '/usr/src/kernels/5.8.4-200.fc32.x86_64' make: *** [Makefile:43: all] Error 2
Bumped version accordingly. Confirmed it's an issue on F32.
Same problem when installing the Parallels Tools. Linux fedora32 5.8.7-200.fc32.x86_64 #1 SMP Mon Sep 7 15:26:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[5]: *** [scripts/Makefile.host:103: scripts/selinux/genheaders/genheaders] Error 1 make[4]: *** [scripts/Makefile.build:497: scripts/selinux/genheaders] Error 2 make[3]: *** [scripts/Makefile.build:497: scripts/selinux] Error 2 make[2]: *** [Makefile:1159: scripts] Error 2 make[1]: *** [/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile.v26:18: prl_tg] Error 2 make: *** [Makefile.kmods:50: compile] Error 2 Error: could not build kernel modules
It looks like genheaders executable is already built, but make is trying to rebuilt it and fails because there is not classmap.h included in the kernel-devel. According to the make file there should be a classmap.h in $(srctree)/include/uapi, $(srctree)/include, or $(srctree)/security/selinux/include. $ ls -l /usr/src/kernels/5.8.8-200.fc32.x86_64/scripts/selinux/genheaders/ total 96 -rwxr-xr-x. 1 root root 86544 Sep 9 15:46 genheaders -rw-r--r--. 1 root root 3534 Sep 9 15:44 genheaders.c -rw-r--r--. 1 root root 196 Sep 9 15:44 Makefile This problem can also be seen on kernel-5.8.8-200 with a number of things building out-of-tree modules for the kernel. Can also see this failure with the systemtap-testsuite: sudo dnf debuginfo-install kernel-5.8.8-200.fc32.x86_64 sudo dnf install systemtap-testsuite cd /usr/share/systemtap/testsuite sudo make installcheck RUNTESTFLAGS="systemtap.base/hw_breakpoint.exp" cat systemtap.log .... HOSTCC scripts/selinux/genheaders/genheaders make[3]: Leaving directory '/usr/src/kernels/5.8.8-200.fc32.x86_64' make[2]: Leaving directory '/tmp/staptestA8KkAa' scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[6]: *** [scripts/Makefile.host:103: scripts/selinux/genheaders/genheaders] Error 1 make[5]: *** [scripts/Makefile.build:497: scripts/selinux/genheaders] Error 2
coming up on a year since this 1st appeared @ https://bugzilla.redhat.com/show_bug.cgi?id=1758710 can we perhaps get some comment/status from a kernel-developer &/or QA? in particular, what specific, additional information is needed from end-users to facilitate getting this resolved?
I saw the message in devel. I build a custom kernel from the src.rpm. The classmap.h file is in the kernel src, at security/selinux/include/classmap.h. But, even though I build and install headers locally, it is not installed on the system when I install the custom kernel. That is, it is not included in the binary rpm. I will attach the latest version (from kernel 5.9) to this bugzilla. If you put it in /usr/include/selinux/include/ and set the context and permissions, it will probably solve your problem. It appears to be a bug in the kernel spec file that this is not installed with the headers package.
Created attachment 1715608 [details] classmap.h header file from kernel 5.9 Attached the latest version of the classmap.h file so it can be manually placed in the file hierarchy as a workaround for this bug.
Heh. I just checked, and the directory security/selinux/include doesn't exist under /usr/include. There is a directory /usr/include/selinux so that might be a better place to put the file classmap.h as a workaround.
There's more to it that just classmap.h. Having been down that road once already, it just kicks the can down the road to the next problem. There's a nasty string of them as I tried in vain to fix each in turn. The only fix I came up with was to dnl the sources, put my driver in the actual source tree and build it there. But what a pain what with the time all that takes and the frequent kernel updates. I think there may be a better/simpler solution since all the executables are delivered pre-built, but cmake insists on building all of them over again.
I guess your experience explains why this bug is still languishing after 1 year. :-) Your suggestion might be the correct way to fix this, but I don't know how to do that, though it sounds like a configuration issue, or an option setting.
perhaps relevant https://patchwork.openembedded.org/patch/155873/ https://bugs.launchpad.net/ubuntu/+source/linux-kernel-headers/+bug/1895470
I believe this should be fixed with: https://gitlab.com/cki-project/kernel-ark/commit/aa819a0f3a8a4ee75672669dfd67afca59882a09 (The fix is probably only in rawhide yet.)
...and the relevant dist-git commit is here: https://src.fedoraproject.org/rpms/kernel/c/bec7366f489c9a4e7aef141e9cd8246c06716c85 Seems it might be fixed already in F33.
The patch in comment#37 does get things further along, but there is another script rebuild fails farther down the line. Using the systemtap reproducer from comment #29: sudo make installcheck RUNTESTFLAGS="systemtap.base/hw_breakpoint.exp" See the following in the systemtap.log: scripts/kconfig/conf --syncconfig Kconfig HOSTCC arch/x86/tools/relocs_32.o HOSTCC arch/x86/tools/relocs_64.o HOSTCC arch/x86/tools/relocs_common.o HOSTLD arch/x86/tools/relocs HOSTCC scripts/selinux/genheaders/genheaders HOSTCC scripts/selinux/mdp/mdp HOSTCC scripts/bin2c HOSTCC scripts/kallsyms HOSTCC scripts/recordmcount HOSTCC scripts/sorttable make[3]: Leaving directory '/usr/src/kernels/5.8.10-200.fc32class.x86_64' make[2]: Leaving directory '/tmp/staptest4fF74t' In file included from scripts/sorttable.c:191: scripts/sorttable.h:89:10: fatal error: asm/orc_types.h: No such file or directo ry 89 | #include <asm/orc_types.h> | ^~~~~~~~~~~~~~~~~ compilation terminated. make[4]: *** [scripts/Makefile.host:103: scripts/sorttable] Error 1 make[3]: *** [Makefile:1155: scripts] Error 2 make[2]: *** [Makefile:5: default] Error 2 BUILD FAILED
@ondrej I'm afraid it ain't fixed in F33 either yet ... :( dnf --enablerepo=fedora-debuginfo install kernel kernel-core kernel-devel kernel-modules kernel-headers dnf install -y make gcc flex bison [root@localhost cloud-user]# cd /usr/src/kernels/5.8.10-300.fc33.x86_64/ [root@localhost 5.8.10-300.fc33.x86_64]# uname -a Linux localhost.wormholenet.local 5.8.10-300.fc33.x86_64 #1 SMP Thu Sep 17 18:20:53 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [root@localhost 5.8.10-300.fc33.x86_64]# make oldconfig && make prepare scripts/kconfig/conf --oldconfig Kconfig # # No change to .config # HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:18:10: fatal error: classmap.h: No such file or directory 18 | #include "classmap.h" | ^~~~~~~~~~~~ compilation terminated. make[3]: *** [scripts/Makefile.host:103: scripts/selinux/genheaders/genheaders] Error 1 make[2]: *** [scripts/Makefile.build:497: scripts/selinux/genheaders] Error 2 make[1]: *** [scripts/Makefile.build:497: scripts/selinux] Error 2 make: *** [Makefile:1155: scripts] Error 2 [root@localhost 5.8.10-300.fc33.x86_64]# dnf update -y Last metadata expiration check: 0:12:55 ago on Wed 23 Sep 2020 00:05:13 BST. Dependencies resolved. Nothing to do. Complete! [root@localhost 5.8.10-300.fc33.x86_64]#
[root@localhost 5.8.10-300.fc33.x86_64]# dnf whatprovides "*/classmap.h" Last metadata expiration check: 0:16:17 ago on Wed 23 Sep 2020 00:05:13 BST. Error: No Matches found
Not a Fedora issue, but FYI, I get something similar with Ubuntu LTS 20.04 which I am pretty sure is using all the same kernel scripts/makefiles/etc: But this particular error just might be a 64 bit vs. 32 bit problem? I'm wondering if the whole issue is not with Fedora developers but it gets kicked back upstream to the kernel developers who either don't have time or don't know how to fix it either? It's obvious nobody tests kernel builds (from just a kernel-devel kit rather than full sources) either on Fedora or Ubuntu before shipping. root@dot-41:~/iocrest# make rm -f *.mod.c *.o *.ko .*.cmd *.symvers make -C /lib/modules/5.4.0-48-generic/build/ SUBDIRS=/root/iocrest modules make[1]: Entering directory '/usr/src/linux-headers-5.4.0-48-generic' HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --syncconfig Kconfig make[2]: *** No rule to make target 'arch/x86/tools/relocs_32.c', needed by 'arch/x86/tools/relocs_32.o'. Stop. make[1]: *** [arch/x86/Makefile:232: archscripts] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-48-generic' make: *** [Makefile:34: default] Error 2
(In reply to Paulo Castro from comment #40) > @ondrej I'm afraid it ain't fixed in F33 either yet ... :( Yep, I was wrong... It is fixed (I mean. the scripts/selinux part at least) only in rawhide right now.
FEDORA-2020-79cff1718c has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-79cff1718c
FEDORA-2020-03fdb07c90 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-03fdb07c90
FEDORA-2020-5aba194675 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5aba194675
FEDORA-2020-03fdb07c90 has been pushed to the Fedora 33 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-03fdb07c90` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-03fdb07c90 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-5aba194675 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-5aba194675` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5aba194675 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-79cff1718c has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-79cff1718c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-79cff1718c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
It feels like it's almost there ... but not quite. :( [root@localhost cloud-user]# uname -a Linux localhost.wormholenet.local 5.8.11-300.fc33.x86_64 #1 SMP Wed Sep 23 14:34:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [root@localhost cloud-user]# cd /usr/src/kernels/$(uname -r ) [root@localhost 5.8.11-300.fc33.x86_64]# make oldconfig && make prepare HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --oldconfig Kconfig # # configuration written to .config # scripts/kconfig/conf --syncconfig Kconfig HOSTCC arch/x86/tools/relocs_32.o HOSTCC arch/x86/tools/relocs_64.o HOSTCC arch/x86/tools/relocs_common.o HOSTLD arch/x86/tools/relocs HOSTCC scripts/selinux/genheaders/genheaders HOSTCC scripts/selinux/mdp/mdp HOSTCC scripts/bin2c HOSTCC scripts/kallsyms HOSTCC scripts/recordmcount HOSTCC scripts/sorttable In file included from scripts/sorttable.c:191: scripts/sorttable.h:89:10: fatal error: asm/orc_types.h: No such file or directory 89 | #include <asm/orc_types.h> | ^~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.host:103: scripts/sorttable] Error 1 make: *** [Makefile:1155: scripts] Error 2 [root@localhost 5.8.11-300.fc33.x86_64]# dnf whatprovides "asm/orc_types.h" Last metadata expiration check: 0:11:56 ago on Thu 24 Sep 2020 22:12:38 BST. Error: No Matches found [root@localhost 5.8.11-300.fc33.x86_64]# dnf whatprovides "*/asm/orc_types.h" Last metadata expiration check: 0:12:13 ago on Thu 24 Sep 2020 22:12:38 BST. kernel-debug-devel-5.8.6-301.fc33.x86_64 : Development package for building kernel modules to match the kernel Repo : fedora Matched from: Filename : /usr/src/kernels/5.8.6-301.fc33.x86_64+debug/arch/x86/include/asm/orc_types.h kernel-debug-devel-5.8.11-300.fc33.x86_64 : Development package for building kernel modules to match the kernel Repo : updates-testing Matched from: Filename : /usr/src/kernels/5.8.11-300.fc33.x86_64+debug/arch/x86/include/asm/orc_types.h kernel-devel-5.8.6-301.fc33.x86_64 : Development package for building kernel modules to match the kernel Repo : fedora Matched from: Filename : /usr/src/kernels/5.8.6-301.fc33.x86_64/arch/x86/include/asm/orc_types.h kernel-devel-5.8.10-300.fc33.x86_64 : Development package for building kernel modules to match the kernel Repo : @System Matched from: Filename : /usr/src/kernels/5.8.10-300.fc33.x86_64/arch/x86/include/asm/orc_types.h kernel-devel-5.8.11-300.fc33.x86_64 : Development package for building kernel modules to match the kernel Repo : @System Matched from: Filename : /usr/src/kernels/5.8.11-300.fc33.x86_64/arch/x86/include/asm/orc_types.h kernel-devel-5.8.11-300.fc33.x86_64 : Development package for building kernel modules to match the kernel Repo : updates-testing Matched from: Filename : /usr/src/kernels/5.8.11-300.fc33.x86_64/arch/x86/include/asm/orc_types.h [root@localhost 5.8.11-300.fc33.x86_64]# dnf --enablerepo=fedora-debuginfo install kernel kernel-core kernel-devel kernel-modules kernel-headers Last metadata expiration check: 0:12:41 ago on Thu 24 Sep 2020 22:12:38 BST. Package kernel-5.8.6-301.fc33.x86_64 is already installed. Package kernel-5.8.10-300.fc33.x86_64 is already installed. Package kernel-5.8.11-300.fc33.x86_64 is already installed. Package kernel-core-5.8.6-301.fc33.x86_64 is already installed. Package kernel-core-5.8.10-300.fc33.x86_64 is already installed. Package kernel-core-5.8.11-300.fc33.x86_64 is already installed. Package kernel-devel-5.8.10-300.fc33.x86_64 is already installed. Package kernel-devel-5.8.11-300.fc33.x86_64 is already installed. Package kernel-modules-5.8.6-301.fc33.x86_64 is already installed. Package kernel-modules-5.8.10-300.fc33.x86_64 is already installed. Package kernel-modules-5.8.11-300.fc33.x86_64 is already installed. Package kernel-headers-5.8.11-300.fc33.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! [root@localhost 5.8.11-300.fc33.x86_64]#
FEDORA-2020-03fdb07c90 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.
Exactly the same error as listed in comment #50 happens with F32 (5.8.11-200.fc32.x86_64). So the problem persists.
FEDORA-2020-5aba194675 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-79cff1718c has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.
This issue is not solved. Reopening ticket just in case. Raised ticket against F33 https://bugzilla.redhat.com/show_bug.cgi?id=1882854
Issue is not solved - cannot build modules on F32. F32 with FEDORA-2020-5aba194675. RPMs installed kernel-5.8.13-200.fc32.x86_64 kernel-modules-5.8.13-200.fc32.x86_64 kernel-devel-5.8.13-200.fc32.x86_64 kernel-core-5.8.13-200.fc32.x86_64 Building https://github.com/pcengines/linux-gpio-nct5104d (a very basic module) make -C /lib/modules/5.8.13-200.fc32.x86_64/build SUBDIRS=/root/linux-gpio-nct5104d modules make[1]: Entering directory '/usr/src/kernels/5.8.13-200.fc32.x86_64' HOSTCC scripts/sorttable In file included from scripts/sorttable.c:191: scripts/sorttable.h:89:10: fatal error: asm/orc_types.h: No such file or directory 89 | #include <asm/orc_types.h> | ^~~~~~~~~~~~~~~~~ compilation terminated.
# rpm -qa | grep kernel-headers kernel-headers-5.8.11-200.fc32.x86_64 It looks like the kernel headers are from another version (even older than the one available with F32). Did I miss something here? The file is present on the filesystem # find / -name orc_types.h /usr/src/kernels/5.8.12-200.fc32.x86_64/arch/x86/include/asm/orc_types.h /usr/src/kernels/5.8.13-200.fc32.x86_64/arch/x86/include/asm/orc_types.h
> It looks like the kernel headers are from another version (even older than > the one available with F32). Did I miss something here? The file is present > on the filesystem The headers in a stable cycle don't change regularly so this package is only updated if they change so this is expected.
Updated to 5.8.16-200.fc32.x86_64, still the same. I cannot understand why this is not disturbing for more people. In my personal understanding no kernel module can be built with these kernels.
(In reply to Calin Rotaru from comment #59) > Updated to 5.8.16-200.fc32.x86_64, still the same. > > I cannot understand why this is not disturbing for more people. In my > personal understanding no kernel module can be built with these kernels. You are building the module wrong (looking at comment #56). Try this instead: make -C /lib/modules/$(uname -r)/build M=/root/linux-gpio-nct5104d
(In reply to Ondrej Mosnacek from comment #60) > You are building the module wrong (looking at comment #56). Try this instead: > > make -C /lib/modules/$(uname -r)/build M=/root/linux-gpio-nct5104d Thank you! You made my day. It works, I will communicate this to the module provider.
I've raised https://gitlab.com/pecastro/kernel-ark/-/jobs/839041017 against the `os-build` branch even though development was done against the ark-latest which seems to be more stable than os-build. Every time I've tried building `os-build` there's config issues. The fix in there allowed me to run `make prepare` against the latest kernel.
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
As your MR was merged, I am guessing this can be closed when 5.12 rebases happen.
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days