Compilation fails with libalpm v16.0.1
Environment
- OS: Arch Linux
- libalpm version: 16.0.1 (from pacman 7.0.0+)
- paru version attempted: 1.11.0 (stable) and latest git
- Rust/Cargo: Latest from official repositories
Problem Description
Paru fails to compile on systems with the latest pacman update that includes libalpm v16.0.1. Both the stable release and the git version fail to build.
Steps to Reproduce
Attempt 1: Install via cargo
cargo install paruError output:
error: failed to run custom build command for `alpm v2.2.3`
thread 'main' panicked at build.rs:25:13:
this version of alpm.rs does not support libalpm v16.0.1 only v13.x.x is supportedAttempt 2: Build from AUR
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -siError output:
error[E0425]: cannot find function `alpm_option_set_disable_sandbox_filesystem` in this scope
--> alpm-4.0.4/src/handle.rs:181:18
|
| unsafe { alpm_option_set_disable_sandbox_filesystem(self.as_ptr()...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `alpm_option_set_disable_sandbox`
error[E0425]: cannot find function `alpm_option_set_disable_sandbox_syscalls` in this scope
--> alpm-4.0.4/src/handle.rs:182:18
|
| unsafe { alpm_option_set_disable_sandbox_syscalls(self.as_ptr()...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `alpm_option_set_disable_sandbox`
error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> alpm-4.0.4/src/sandbox.rs:14:22
|
| { alpm_sandbox_setup_child(self.as_ptr(), user.as_ptr(), path.as_ptr(), false) };
| ^^^^^^^^^^^^^^^^^^^^^^^^ ----- unexpected argument #4 of type `bool`Attempt 3: Build from paru-git
git clone https://aur.archlinux.org/paru-git.git
cd paru-git
makepkg -siResult: Same compilation errors as Attempt 2.
Attempt 4: Previously installed binary
If paru was already installed before the pacman update:
paru --versionError output:
paru: error while loading shared libraries: libalpm.so.15: cannot open shared object file: No such file or directoryRoot Cause
The Rust bindings for libalpm (alpm and alpm-sys crates) are not yet compatible with libalpm v16.0.1. The API has changed:
- Functions like
alpm_option_set_disable_sandbox_filesystemandalpm_option_set_disable_sandbox_syscallsno longer exist - Function signatures have changed (e.g.,
alpm_sandbox_setup_childnow takes 3 arguments instead of 4)
Expected Behavior
Paru should compile and run successfully on Arch Linux systems with the latest pacman/libalpm version.
Workaround
Currently using yay as an alternative AUR helper until paru is updated to support libalpm v16.
Additional Context
This affects all Arch Linux users who have updated to pacman 7.0.0+ (released recently). The alpm-rs crate needs to be updated to support the new libalpm API before paru can be compiled successfully.
Related
This is likely related to upstream changes in the alpm crate. Consider updating dependencies or pinning to a compatible version of alpm-rs that supports libalpm v16.
Source: Morganamilo/paru