Skip to content

Debian DKMS issue because of separate linux common headers #11

Open

Description

@andvgal

As Debian uses separate arch and common linux header packages with different locations, stdarg.h is not getting found at build time.

The latest GIM 8.2.0 package from releases.

Some quick&dirty workaround fixed the build issue, but more clean solution is desired. Maybe there is one, but I could not find that with a quick search. Likely, automake needs to be involved like in some other modules.

--- Makefile.bak        2025-07-10 23:33:42.794099537 +0300
+++ Makefile    2025-07-10 23:42:27.823828145 +0300
@@ -76,6 +76,10 @@
 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
 subdir-ccflags-y += -I $(KERNELDIR)/include/linux
 
+COMMON_HEADERS_PATH = /usr/src/linux-headers-$(shell uname -r | sed -r "s,-[^-]+\$$,-common,")
+subdir-ccflags-y += -I $(COMMON_HEADERS_PATH)/include/linux
+
+
 ifeq ($(exclude_dcore_debug), true)
        subdir-ccflags-y += -DEXCLUDE_DCORE_DEBUG
 endif

Activity

  1. yunxiali commented on Jul 11, 2025

    @yunxiali
    Collaborator

    Interesting, I wonder what is the proper way to handle this...

  2. andvgal commented on Jul 11, 2025

    @andvgal
    Author

    Interesting, I wonder what is the proper way to handle this...

    I would create a PR, if that would be. The snippet is only a demonstration of the problem. I see other DKMS module examples use auto generated Makefile, and that auto-detection is likely buried inside of patched Debian version of autoconf/automake.

  3. yunxiali commented on Aug 19, 2025

    @yunxiali
    Collaborator

    I did some experiment, I think the real issue here is that we should be using #include <linux/stdarg.h> instead. will fix this in the future.

  4. codambro commented on Jun 2, 2026

    @codambro

    Can this please be addressed? Running into this in SLES as well, should be linux/stdarg.h

  5. yunxiali commented on Jun 2, 2026

    @yunxiali
    Collaborator

    Is this still an issue after

    AC_KERNEL_TEST_HEADER_FILE_EXIST([linux/stdarg.h], [
    ? maybe there's some reason causing this test to fail?

  6. codambro commented on Jun 2, 2026

    @codambro

    Yes.

    # rpm -ql kernel-devel | grep stdarg
    /usr/src/linux-6.4.0-150700.53.19/include/linux/stdarg.h
    

    Not sure why the test for it isn't finding it. But if I force it, I can successfully build:

    make EXTRA_CFLAGS+=' -DHAVE_LINUX_STDARG_H=1' all -j
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions