Memo/build-python-kornia-rs-on-arch-linux
1 分钟阅读
ArchLinux 编译 python-kornia-rs
修复 Arch Linux 构建 python-kornia-rs 的交叉编译检测。
安装 python-kornia-rs 失败,构建的时候 g 了。
直接一把梭搞定。
user@host [23:50:58] [~/.cache/yay/python-kornia-rs] [master *]
-> % makepkg -s
==> Making package: python-kornia-rs 0.1.9-5 (Thu 24 Jul 2025 11:51:05 PM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found kornia-rs-0.1.9.tar.gz
==> Validating source files with sha256sums...
kornia-rs-0.1.9.tar.gz ... Passed
==> Extracting sources...
-> Extracting kornia-rs-0.1.9.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
* Getting build dependencies for wheel...
* Building wheel...
Running `maturin pep517 build-wheel -i /usr/bin/python --compatibility off`
🔗 Found pyo3 bindings
💥 maturin failed
Caused by: Python interpreter should be a kind of interpreter (e.g. 'python3.8' or 'pypy3.9') when cross-compiling, got path to interpreter: /usr/bin/python
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/usr/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
ERROR Backend subprocess exited when trying to invoke build_wheel
==> ERROR: A failure occurred in build().
Aborting...
export PYO3_CROSS_PYTHON_VERSION=3.13 export PYO3_CROSS_LIB_DIR=/usr/lib export CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu
makepkg -sf -> % ls -lah total 2.8M drwxr-xr-x 1 user user 310 Jul 24 23:53 . drwxr-xr-x 1 user user 358 Jul 24 23:17 .. drwxr-xr-x 1 user user 140 Jul 24 23:49 .git -rw-r--r-- 1 user user 235K Jul 24 23:17 kornia-rs-0.1.9.tar.gz -rw-r--r-- 1 user user 96 Jul 24 23:17 .nvchecker.toml drwxr-xr-x 1 user user 76 Jul 24 23:53 pkg -rw-r--r-- 1 user user 1.1K Jul 24 23:52 PKGBUILD -rw-r--r-- 1 user user 2.3M Jul 24 23:53 python-kornia-rs-0.1.9-5-x86_64.pkg.tar.zst -rw-r--r-- 1 user user 252K Jul 24 23:53 python-kornia-rs-debug-0.1.9-5-x86_64.pkg.tar.zst drwxr-xr-x 1 user user 74 Jul 24 23:52 src -rw-r--r-- 1 user user 793 Jul 24 23:17 .SRCINFO -> % sudo pacman -U python-kornia-rs-0.1.9-5-x86_64.pkg.tar.zst
讨论
邮箱用于身份识别和回复通知,并由 Waline 存储。