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

alpm & alpm-sys rebuilds every time if the static feature is enabled #39

Open
VorpalBlade opened this issue Feb 12, 2024 · 4 comments
Open

Comments

@VorpalBlade
Copy link

I checked even with rust-analyzer not running:

cargo new reproducer
cd reproducer
cargo add alpm --features=static
cargo build
cargo build
@VorpalBlade
Copy link
Author

This seems to be part of the problem:

    #[cfg(feature = "static")]
    println!("cargo:rerun-if-changed=/usr/lib/pacman/lib/pkgconfig");

That doesn't actually exist

@Morganamilo
Copy link
Member

It exists if you have pacman-static installed. If the dir doesn't exist this shouldn't trigger a rebuild as there's no change right?

@Morganamilo
Copy link
Member

I think it's the

  env::set_var("PKG_CONFIG_LIBDIR", "/usr/lib/pacman/lib/pkgconfig");

in the build script triggering a rerun_if_env_changed set by pkgconf. I didnt think a change would trigger itself. There may be a better way to set this.

@Morganamilo
Copy link
Member

Okay no it is the line you pointed out. Will see if there's a better way to do that.

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

2 participants