steven-omaha / pacdef

multi-backend declarative package manager for Linux
GNU General Public License v3.0
332 stars 13 forks source link

[Bug]: libalpm.so.14: cannot open shared object file #90

Open Marco98 opened 2 weeks ago

Marco98 commented 2 weeks ago

In one sentence, what did you try to achieve?

compiling or running pacdef on up-to-date archlinux

What did you expect to happen?

run pacdef on latest stable archlinux w/ pacman 7.0.0

What happened?

run fails with: pacdef: error while loading shared libraries: libalpm.so.14: cannot open shared object file: No such file or directory

compile fails with:

error: failed to run custom build command for `alpm v3.0.5`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/home/marco/.cache/yay/pacdef/src/pacdef-1.6.0/target/release/build/alpm-3198e09dd8f1f138/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /home/marco/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-3.0.5/build.rs:25:13:
  this version of alpm.rs does not support libalpm v15.0.0 only v14.x.x is supported

How can we reproduce this?

  1. update archlinux
  2. run or compile pacdef

Version of pacdef

1.6.0

Pacdef config

n/a

What operating system and version are you encountering this issue on?

archlinux

Relevant log output

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

Additional information

No response

keilmillerjr commented 2 weeks ago

Trying to decipher the error.

$ pacman -V
Pacman v7.0.0 - libalpm v15.0.0

So we are at version 15 for the package management library for pacman. Any updated Arch system should have the latest version. The rust crate used to provide the bindings has yet to be updated. The readme within the source for the package alpm.rs says Currently alpm.rs supports libalpm v14.x.x..

Support was added for pacman 7.0. Version was later bumped to 4.0. However, there is no tagged release yet.

Magniquick commented 2 weeks ago

Related: https://github.com/archlinux/alpm.rs/issues/48

moberer commented 2 weeks ago

paru had the same issue and solved this in https://github.com/Morganamilo/paru/commit/90656a901479b77cb3b7a54e393dff9a0ca6a45f

(as of yet not released, but available in paru-git)

polandy commented 1 week ago

I changed the alpm version from 3.0 to 4.0 in https://github.com/steven-omaha/pacdef/blob/main/crates/pacdef/Cargo.toml and then built pacdef locally with cargo build --release --features arch. That seems to work so far but I'm not sure if more needs to be done.

keilmillerjr commented 1 week ago

@polandy We could use alpm version 4.0.1.

https://crates.io/crates/alpm

This PR attempts to resolve the issue by pulling directly from git. Using the crate version would be better to prevent accidental breakage.

https://github.com/steven-omaha/pacdef/pull/91