Results 1 to 3 of 3

Thread: Compiling error with missing classmap.h file

  1. #1
    Join Date
    Nov 2020

    Compiling error with missing classmap.h file

    Hello All,

    I compiled a driver source file and got a fatal error saying no such file or directory classmap.h.

    Has anyone experienced this and know how to correct it?. Below shows the steps and error from make command:

    make -C /lib/modules/5.4.0-1032-raspi/build M= modules
    make[1]: Entering directory '/usr/src/linux-headers-5.4.0-1032-raspi'
      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/[ch]
      HOSTCC  scripts/kconfig/lexer.lex.o
      HOSTCC  scripts/kconfig/
      HOSTCC  scripts/kconfig/preprocess.o
      HOSTCC  scripts/kconfig/symbol.o
      HOSTLD  scripts/kconfig/conf
    scripts/kconfig/conf  --syncconfig Kconfig
      HOSTCC  scripts/dtc/dtc.o
      HOSTCC  scripts/dtc/flattree.o
      HOSTCC  scripts/dtc/fstree.o
      HOSTCC  scripts/dtc/data.o
      HOSTCC  scripts/dtc/livetree.o
      HOSTCC  scripts/dtc/treesource.o
      HOSTCC  scripts/dtc/srcpos.o
      HOSTCC  scripts/dtc/checks.o
      HOSTCC  scripts/dtc/util.o
      LEX     scripts/dtc/dtc-lexer.lex.c
      YACC    scripts/dtc/[ch]
      HOSTCC  scripts/dtc/dtc-lexer.lex.o
      HOSTCC  scripts/dtc/
      HOSTLD  scripts/dtc/dtc
      HOSTCC  scripts/genksyms/genksyms.o
      YACC    scripts/genksyms/[ch]
      HOSTCC  scripts/genksyms/
      LEX     scripts/genksyms/lex.lex.c
      HOSTCC  scripts/genksyms/lex.lex.o
      HOSTLD  scripts/genksyms/genksyms
      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/ scripts/selinux/genheaders/genheaders] Error 1
    make[3]: *** [scripts/ scripts/selinux/genheaders] Error 2
    make[2]: *** [scripts/ scripts/selinux] Error 2
    make[1]: *** [Makefile:1153: scripts] Error 2
    make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-1032-raspi'
    make: *** [Makefile:4: all] Error 2
    I did not get this error previously with earlier version 5.4.0-1029. The current version is:

    Linux RPi4 5.4.0-1032-raspi #35-Ubuntu SMP PREEMPT Fri Mar 19 20:52:40 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

    Any help would be greatly appreciated.


  2. #2
    Join Date
    Mar 2010

    Re: Compiling error with missing classmap.h file

    What library is classmap.h for? Figure that out, then install the lib{name}-dev package to get the headers.

    SELinux isn't really used on Ubuntu/Debian systems. That's a RHEL thing, so in theory, it shouldn't hold up the linking at all.

    BTW, the make command appears to have a space in the wrong place. Is that just an artifact of the copy/paste into these forums?

  3. #3
    Join Date
    Nov 2020

    Re: Compiling error with missing classmap.h file

    TheFu... Sorry for a late reply. I have been away from this topic for the last while, doing something else. I need to get this resolved somehow and will look into your suggestion. Apparently, others also have this problem, per this link:

    I can avoid compiling this source driver and therefore get around this issue if I can make use of pre-built driver max310x.c. Basically I had to duplicate this driver and renamed it to max310y.c with some minor changes to the source max310x.c. This is where compiling comes in for every kernel update. In this design, I have three uart chips on one spi bus. Two uarts use this max310x.c driver (the third uses prebuilt sc16is752 driver) and I had a hard time getting both to work. By creating max310y.c, it works. Ideally, I 'd like to use max310x.c for both. Any idea?.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts