Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to run custom build command for `alpm v3.0.4 #1241

Open
FeralSmurf opened this issue Sep 15, 2024 · 7 comments
Open

failed to run custom build command for `alpm v3.0.4 #1241

FeralSmurf opened this issue Sep 15, 2024 · 7 comments

Comments

@FeralSmurf
Copy link

FeralSmurf commented Sep 15, 2024

Affected Version

paru -latest

error: failed to run custom build command for alpm v3.0.4 (https://github.com/archlinux/alpm.rs?rev=306342#306342ef)

Caused by:
process didn't exit successfully: /home/***/paru/src/paru-2.0.3/target/release/build/alpm-fe8130be9696cf00/build-script-build (exit status: 101)
--- stderr
thread 'main' panicked at /home/***/.cargo/git/checkouts/alpm.rs-a0070a235cf20bfa/306342e/alpm/build.rs:25:13:
this version of alpm.rs does not support libalpm v15.0.0 only v14.x.x is supported
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().

sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

After the latest upgrade of pacman, probably.

@BrenekH
Copy link

BrenekH commented Sep 15, 2024

Yes, Pacman 7.0.0 updated the Arch Linux Package Management (alpm) shared object to version 15.

This has also been reported in #1239 and #1240.

The fix is to use paru-git instead as the master branch builds correctly against libalpm v15

@FeralSmurf
Copy link
Author

Thanks for your kind patience, Sir! Apologies for not being able to see the previous posts.

Any idea when paru-git will be updated to the main/master branch? In the meanwhile, I use yay, they seem to get along pretty nicely together.

@BrenekH
Copy link

BrenekH commented Sep 15, 2024

Because paru-git is a -git package, it should pull the latest commit from master automatically. If you're having issues, there are a couple other PKGBUILDS in 1239 that were made with the libalpm update in mind that you can try.

@FeralSmurf
Copy link
Author

Because paru-git is a -git package, it should pull the latest commit from master automatically. If you're having issues, there are a couple other PKGBUILDS in 1239 that were made with the libalpm update in mind that you can try.

My bad, I asked the wrong question. I wanted to know who long it takes for paru, not paru-git, to be back in the AUR.

@BrenekH
Copy link

BrenekH commented Sep 15, 2024

I wanted to know who long it takes for paru, not paru-git, to be back in the AUR.

Ah ok. That I have no clue. It depends on when the Paru maintainers decide to cut a new release, which could be in a couple minutes or a couple days (hopefully not weeks or longer 🤞).

@gbin
Copy link

gbin commented Sep 16, 2024

paru (AUR) doesn't compile:

error[E0308]: mismatched types
   --> /home/gbin/.cargo/git/checkouts/alpm.rs-a0070a235cf20bfa/306342e/alpm/src/cb.rs:244:60
    |
244 |         unsafe { alpm_option_set_logcb(self.as_ptr(), Some(cb), &*ctx as *const _ as *mut _) };
    |                                                       ---- ^^ expected fn pointer, found fn item
    |                                                       |
    |                                                       arguments to this enum variant are incorrect
    |
    = note: expected fn pointer `unsafe extern "C" fn(_, _, _, *mut __va_list_tag)`
                  found fn item `extern "C" fn(_, _, _, [__va_list_tag; 1]) {logcb::<LogCbImpl<T, F>>}`
help: the type constructed contains `extern "C" fn(*mut c_void, u32, *const u8, [__va_list_tag; 1]) {logcb::<LogCbImpl<T, F>>}` due to the type of the argument passed
   --> /home/gbin/.cargo/git/checkouts/alpm.rs-a0070a235cf20bfa/306342e/alpm/src/cb.rs:244:55
    |
244 |         unsafe { alpm_option_set_logcb(self.as_ptr(), Some(cb), &*ctx as *const _ as *mut _) };
    |                                                       ^^^^^--^
    |                                                            |
    |                                                            this argument influences the type of `Some`
note: tuple variant defined here
   --> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/option.rs:582:5

For more information about this error, try `rustc --explain E0308`.
error: could not compile `alpm` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...

And paru-git (AUR) doesn't compile neither

error: failed to run custom build command for `alpm v4.0.0`

Caused by:
  process didn't exit successfully: `/home/gbin/paru-git/src/paru/target/release/build/alpm-72a59d72668beeee/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /home/gbin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-4.0.0/build.rs:25:13:
  this version of alpm.rs does not support libalpm v14.0.0 only v15.x.x is supported
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...

Neither cargo install paru

error: failed to run custom build command for `alpm v2.2.3`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installh9ecBH/release/build/alpm-ed169928b9d9b133/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /home/gbin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-2.2.3/build.rs:25:13:
  this version of alpm.rs does not support libalpm v14.0.0 only v13.x.x is supported
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `paru v1.11.0`, intermediate artifacts can be found at `/tmp/cargo-installh9ecBH`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

**Neither git cloning the repo and running cargo build**
error: failed to run custom build command for `alpm v4.0.0`

Caused by:
  process didn't exit successfully: `/home/gbin/paru/target/debug/build/alpm-1f533db3809cad75/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /home/gbin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/alpm-4.0.0/build.rs:25:13:
  this version of alpm.rs does not support libalpm v14.0.0 only v15.x.x is supported
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

All this from a fresh install.

The only solution I can find is to install paru-bin (AUR) Flagged Out Of Date 😭

@wolcen
Copy link

wolcen commented Sep 19, 2024

No idea if this is the case for you or not, but before attempting builds that require rust, if you use rustup, ensure that you've run rustup update before attempting to do the makepkg. I've just seen cases where rust updates have fixed compile errors.

Current git code compiled for me. My rustup default is also set to stable (rustc 1.81.0) and I ended up with a paru-git 2.0.3.rebuild.1.r20.g5893055-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants