paru icon indicating copy to clipboard operation
paru copied to clipboard

Compilation fails with libalpm v16.0.1

Open jojojojojoj5564656465465 opened this issue 1 week ago • 40 comments

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 paru

Error 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 supported

Attempt 2: Build from AUR

git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

Error 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 -si

Result: Same compilation errors as Attempt 2.

Attempt 4: Previously installed binary

If paru was already installed before the pacman update:

paru --version

Error output:

paru: error while loading shared libraries: libalpm.so.15: cannot open shared object file: No such file or directory

Root 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_filesystem and alpm_option_set_disable_sandbox_syscalls no longer exist
  • Function signatures have changed (e.g., alpm_sandbox_setup_child now 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.

+1

error[E0061]: this function takes 3 arguments but 4 arguments were supplied
    --> /home/drew/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alpm-4.0.4/src/sandbox.rs:14:22
     |
  14 | ... { alpm_sandbox_setup_child(self.as_ptr(), user.as_ptr(), path.as_ptr(), false) };
     |       ^^^^^^^^^^^^^^^^^^^^^^^^                                              ----- unexpected argument #4 of type `bool`
     |
note: function defined here
    --> /home/drew/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alpm-sys-4.0.4/src/ffi.rs:2817:12
     |
2817 |     pub fn alpm_sandbox_setup_child(
     |            ^^^^^^^^^^^^^^^^^^^^^^^^
help: remove the extra argument
     |
  14 -             unsafe { alpm_sandbox_setup_child(self.as_ptr(), user.as_ptr(), path.as_ptr(), false) };
  14 +             unsafe { alpm_sandbox_setup_child(self.as_ptr(), user.as_ptr(), path.as_ptr()) };
     |

Some errors have detailed explanations: E0061, E0425.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `alpm` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'paru-2.1.0-2': 
error: packages failed to build: paru-2.1.0-2

WhitleyStriber avatar Dec 15 '25 20:12 WhitleyStriber

+1

The package from endeavouros/paru throw this error:

paru: error while loading shared libraries: libalpm.so.15: cannot open shared object file: No such file or directory

Anzar-M avatar Dec 15 '25 21:12 Anzar-M

+1

ddezaudc avatar Dec 15 '25 22:12 ddezaudc

+1

Korossuh avatar Dec 15 '25 22:12 Korossuh

+1

oppppia avatar Dec 15 '25 22:12 oppppia

+1

craigccfl avatar Dec 15 '25 22:12 craigccfl

+1

nailuj29 avatar Dec 15 '25 22:12 nailuj29

+1

yay currently works as an alternative

Swivelgames avatar Dec 15 '25 23:12 Swivelgames

+1

yay currently works as an alternative

Yes, yay is working fine. Thanks

craigccfl avatar Dec 15 '25 23:12 craigccfl

This is a duplicate of #1454.

You can find a PKGBUILD which patches Cargo.toml to use the latest alpm crates over there.

4yx avatar Dec 15 '25 23:12 4yx

+1111111111111111111111111111111111111110

mgl-pub avatar Dec 16 '25 00:12 mgl-pub

+1

webfrogs avatar Dec 16 '25 01:12 webfrogs

+1

shandilyaaryan avatar Dec 16 '25 01:12 shandilyaaryan

If you have nothing to add, please 👍 the original post rather than adding a +1 comment.

virtualdxs avatar Dec 16 '25 02:12 virtualdxs

+1

taozuqin avatar Dec 16 '25 02:12 taozuqin

Please read #1454 for fix

harshv5094 avatar Dec 16 '25 03:12 harshv5094

Available paru https://github.com/Yfengqiu/Software-package-repository

Yfengye avatar Dec 16 '25 04:12 Yfengye

+1

MeoCag avatar Dec 16 '25 08:12 MeoCag

+1

Dasa122 avatar Dec 16 '25 08:12 Dasa122

+1

dieg000w avatar Dec 16 '25 09:12 dieg000w

+1

JoseMM2002 avatar Dec 16 '25 10:12 JoseMM2002

+1

Dunravin avatar Dec 16 '25 10:12 Dunravin

+1

anir183 avatar Dec 16 '25 11:12 anir183

+1

ameyjoshi3068 avatar Dec 16 '25 11:12 ameyjoshi3068

+1

skkias avatar Dec 16 '25 13:12 skkias

+1

ethancane avatar Dec 16 '25 13:12 ethancane

+1

Love how the workaround is "use yay instead." smh.

tommangione avatar Dec 16 '25 14:12 tommangione

+1

sakuyma avatar Dec 16 '25 16:12 sakuyma

If you have nothing to add, please 👍 the original post rather than adding a +1 comment.

Also, please go back to whoever told you to come here and post '+1' comments and ask them to stop recommending it. All this does is fill people's inboxes with useless notifications.

rpdelaney avatar Dec 16 '25 18:12 rpdelaney

If you have nothing to add, please 👍 the original post rather than adding a +1 comment.

Also, please go back to whoever told you to come here and post '+1' comments and ask them to stop recommending it. All this does is fill people's inboxes with useless notifications.

Appreciate the recommendation. No one sent us, there's no conspiracy, personally I'm just a GitHub noob who doesn't know the etiquette.

tommangione avatar Dec 16 '25 18:12 tommangione