如何配置用于重建当前(Mantic)内核包的环境?

如何配置用于重建当前(Mantic)内核包的环境?

我正在尝试构建当前 Mantic 内核 (6.5.0-14) 的修补版本。但我甚至无法构建未修补的版本。似乎我没有正确安装 Rust,但我不知道原因。

到目前为止,我已经从我的中删除了货物目录$PATH,然后执行以下操作:

$ sudo apt install rustc-1.68 bindgen-0.56 build-dep libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf llvm
$ apt-get source linux-image-unsigned-$(uname -r)
$ cd linux-6.5.0
$ fakeroot debian/rules clean
$ fakeroot debian/rules binary-headers
$ fakeroot debian/rules binary-generic

最后一个失败了:

make[1]: Entering directory '/home/tkcook/linux-6.5.0'
make[2]: Entering directory '/home/tkcook/linux-6.5.0/debian/build/build-generic'
***
*** Running 'bindgen-0.56' to check the libclang version (used by the Rust
*** bindings generator) failed with code 101. This may be caused by
*** a failure to locate libclang. See output and docs below for details:
***
thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', src/lib.rs:1922:31
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
***
make[3]: *** [/home/tkcook/linux-6.5.0/Makefile:1833: rustavailable] Error 1
make[2]: *** [/home/tkcook/linux-6.5.0/Makefile:234: __sub-make] Error 2
make[2]: Leaving directory '/home/tkcook/linux-6.5.0/debian/build/build-generic'
make[1]: *** [Makefile:234: __sub-make] Error 2

那里的错误消息建议设置LIBCLANG_PATH为 libclang.so.1 的位置,但是这样做(将其设置为/usr/lib/llvm-17/lib/usr/lib/llvm-17/lib/libclang.so.1)没有任何区别,我怀疑是因为fakerootdebian/rules破坏了设置。

有人能告诉我该如何做吗?

相关内容