Unverified Commit 08ba9034 authored by Cabia Rangris's avatar Cabia Rangris Committed by GitHub
Browse files

klipper: fix cross (#511549)

parents 7199e480 de106f53
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py
index c26196e..b00bd97 100644
--- a/chelper/__init__.py
+++ b/chelper/__init__.py
@@ -318,11 +318,6 @@ def get_ffi():
         FFI_main = cffi.FFI()
         for d in defs_all:
             FFI_main.cdef(d)
-        FFI_lib = FFI_main.dlopen(destlib)
-        # Setup error logging
-        pyhelper_logging_callback = FFI_main.callback("void func(const char *)",
-                                                      logging_callback)
-        FFI_lib.set_python_logging_callback(pyhelper_logging_callback)
     return FFI_main, FFI_lib
+7 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  lib,
  fetchFromGitHub,
  python3,
  python3Packages,
  extraPythonPackages ? ps: [ ],
  unstableGitUpdater,
  makeWrapper,
@@ -24,7 +25,7 @@ stdenv.mkDerivation rec {

  # NB: This is needed for the postBuild step
  nativeBuildInputs = [
    (python3.withPackages (p: with p; [ cffi ]))
    python3Packages.cffi
    makeWrapper
  ];

@@ -62,6 +63,11 @@ stdenv.mkDerivation rec {
      --replace 'GCC_CMD = "gcc"' 'GCC_CMD = "${stdenv.cc.targetPrefix}cc"'
  '';

  patches = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
    # https://github.com/Klipper3d/klipper/pull/7254
    ./cross-ffi.patch
  ];

  pythonInterpreter =
    (python3.withPackages (
      p: with p; [