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

Can't compile #165

Open
adsick opened this issue Jan 2, 2022 · 3 comments
Open

Can't compile #165

adsick opened this issue Jan 2, 2022 · 3 comments

Comments

@adsick
Copy link

adsick commented Jan 2, 2022

Distribution

 94% ❯ cat /etc/os-release
NAME="Fedora Linux"
VERSION="35 (Workstation Edition)"

Issue/Bug Description:
cloned the repo, tried to compile with make && sudo make install got an error:

See full output
popsicle on  master via ⚙️ v1.47.0 took 15s
 94% ➜ make && sudo make install
cargo build --manifest-path cli/Cargo.toml --release
    Finished release [optimized] target(s) in 0.09s
cargo build --manifest-path gtk/Cargo.toml --release
   Compiling libdbus-sys v0.2.1
   Compiling futures-lite v1.11.3
   Compiling aho-corasick v0.7.18
   Compiling atomic v0.5.0
   Compiling generic-array v0.14.4
   Compiling lexical-core v0.7.6
   Compiling strum_macros v0.18.0
error: failed to run custom build command for `libdbus-sys v0.2.1`

Caused by:
  process didn't exit successfully: `/home/adsick/rust/popsicle/target/release/build/libdbus-sys-035f9be67aaefbf9/build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=DBUS_1_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=DBUS_1_STATIC
  cargo:rerun-if-env-changed=DBUS_1_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"dbus-1\" \"dbus-1 >= 1.6\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package dbus-1 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `dbus-1.pc\'\nto the PKG_CONFIG_PATH environment variable\nPackage \'dbus-1\', required by \'virtual:world\', not found\nPackage \'dbus-1\', required by \'virtual:world\', not found\n" } }', /home/adsick/.cargo/registry/src/github.com-1ecc6299db9ec823/libdbus-sys-0.2.1/build.rs:6:70
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makefile:107: target/release/popsicle-gtk] Error 101

@rbudiharso
Copy link

rbudiharso commented Jan 3, 2022

I'm also on Fedora 35 but in my case I can compile successfully but error when run sudo make install

image

@PTrottier
Copy link
Contributor

It worked for me to install libdbus-glib-1-dev (i.e. sudo apt install libdbus-glib-1-dev on Pop!_OS)

@KalenAnson
Copy link

I'm also on Fedora 35 but in my case I can compile successfully but error when run sudo make install

image

It looks like you hit the same issue I ran into. cargo is not in the path of your root user. For anyone else hitting this, you can rerun the install as follows to add cargo and rustc to your path:

sudo env "PATH=$PATH" make install

This will preserve the path to your rust toolchain when running the commands as the root user.

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