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

kvmfr: No longer compiles with kernel 6.13 due to MODULE_IMPORT_NS change #379503

Open
aqxa1 opened this issue Feb 5, 2025 · 5 comments
Open

Comments

@aqxa1
Copy link

aqxa1 commented Feb 5, 2025

Fix: gnif/LookingGlass#1149

Apparently, there are no compatibility issues for any older kernels supported by the module either.

I tried applying the patch myself but couldn't get it to apply cleanly.

@Svenum
Copy link
Contributor

Svenum commented Feb 6, 2025

Working on an overlay

@Svenum
Copy link
Contributor

Svenum commented Feb 7, 2025

linuxPackages_latest = prev.linuxPackages_latest.extend (lfinal: lprev: {
    kvmfr = prev.linuxPackages_latest.kvmfr.overrideAttrs (old: {
      patches = [
        (prev.fetchpatch {
          url = "https://github.com/gnif/LookingGlass/commit/4251a5c5fe7723c5dc068839debd76a5148953b2.diff";
          sha256 = "sha256-CswVgctC4G58cNFHrAh3sHsgOlB2ENJ/snyWQAHO6Ks=";
          stripLen = 1;
          includes = [
            "dkms.conf"
            "kvmfr.c"
          ];
        })
      ];
    });
  });
looking-glass-client = prev.looking-glass-client.overrideAttrs (old: {
    version = "master";
    src = prev.fetchFromGitHub {
      owner = "gnif";
      repo = "LookingGlass";
      sha256 = "sha256-DBmCJRlB7KzbWXZqKA0X4VTpe+DhhYG5uoxsblPXVzg=";
      rev = "e25492a3a36f7e1fde6e3c3014620525a712a64a";
      fetchSubmodules = true;
    };
    patches = [ ./nanosvg-unvendor.diff ];
  });

./nanosvg-unvendor.diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3755adc..55e1eb3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,7 @@ include(OptimizeForNative) # option(OPTIMIZE_FOR_NATIVE)
 include(UninstallTarget)

 find_package(PkgConfig)
+find_package(NanoSVG REQUIRED)
 pkg_check_modules(FONTCONFIG REQUIRED IMPORTED_TARGET fontconfig)

 option(ENABLE_OPENGL "Enable the OpenGL renderer"       ON)
@@ -106,7 +107,6 @@ include_directories(
   ${PROJECT_SOURCE_DIR}/include
   ${CMAKE_BINARY_DIR}
   ${CMAKE_BINARY_DIR}/include
-  ${PROJECT_TOP}/repos/nanosvg/src
 )

 link_libraries(
@@ -161,6 +161,7 @@ target_compile_definitions(looking-glass-client PRIVATE CIMGUI_DEFINE_ENUMS_AND_
 target_link_libraries(looking-glass-client
   ${EXE_FLAGS}
   PkgConfig::FONTCONFIG
+  NanoSVG::nanosvg
   lg_resources
   lg_common
   displayservers

@aqxa1
Copy link
Author

aqxa1 commented Feb 11, 2025

Thanks. I'm adding additional kernel patches too and couldn't figure out how to adapt that to the overlay syntax, but I can confirm that patching nixpkgs directly fixes the issue (so the fetchpatch block works at least).

I'm guessing the nanosvg patch is only needed for git looking-glass-client. As B7-RC1 still works with just the kernel patch.

@Svenum
Copy link
Contributor

Svenum commented Feb 11, 2025

Thats right, the nanosvg patch is only needed for looking-glass-client.

@aqxa1
Copy link
Author

aqxa1 commented Feb 24, 2025

I'll add that the patch does break on 6.12 and earlier, according to my own testing, and further discussion here: gnif/LookingGlass#1149 (comment)

So a check will need to be added for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants