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

Install from cargo fails #90

Closed
sarmong opened this issue Apr 16, 2020 · 4 comments
Closed

Install from cargo fails #90

sarmong opened this issue Apr 16, 2020 · 4 comments

Comments

@sarmong
Copy link

sarmong commented Apr 16, 2020

I'm trying to install hunter from cargo with cargo install hunter and get the following error.

MacOS Mojave

error: failed to run custom build command for `gstreamer-sys v0.8.1`

Caused by:
  process didn't exit successfully: `/var/folders/6g/x2w6kspd73jcx_bw8h7gmd400000gn/T/cargo-installlMmyER/release/build/gstreamer-sys-48139b3acb15290a/build-script-build` (exit code: 1)
--- stderr
`"pkg-config" "--libs" "--cflags" "gstreamer-1.0" "gstreamer-1.0 >= 1.12"` did not exit successfully: exit code: 1
--- stderr
Package gstreamer-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-1.0' found
Package gstreamer-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-1.0' found


warning: build failed, waiting for other jobs to finish...
error: failed to compile `hunter v1.3.5`, intermediate artifacts can be found at `/var/folders/6g/x2w6kspd73jcx_bw8h7gmd400000gn/T/cargo-installlMmyER`

Caused by:
  build failed
@straussdd
Copy link
Collaborator

Unfortunately, compiling hunter with all features enabled, i.e. image and video support, isn't very streamlined yet. I'm currently trying to improve that, but meanwhile, you have two options here:

  1. Install hunter without those features: cargo install --no-default-features hunter

  2. Fix the problem:

    • Make sure you have the required packages installed:
      brew install gst-editing-services gst-libav gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly gstreamer gst-rtsp-server

    • Prepend the environment variable for pkg-config when installing hunter, like this:
      PKG_CONFIG_PATH='/Library/Frameworks/GStreamer.framework/Versions/Current/lib/pkgconfig' cargo install hunter

@sarmong
Copy link
Author

sarmong commented Apr 17, 2020

@straussdd Thanks.

I tried the second option. Installed brew packages. Run the second command and got the error below. Then run rustup toolchain install nightly as recommended. And rerun second command again. Got the same error.

error: failed to run custom build command for `hunter v1.3.5`

Caused by:
  process didn't exit successfully: `/var/folders/6g/x2w6kspd73jcx_bw8h7gmd400000gn/T/cargo-installqO023d/release/build/hunter-07403f1317860899/build-script-build` (exit code: 1)
--- stderr
NIHGTLY COMPILER required
Please install a nighlty compiler to proceed: https://rustup.rs/
rustup toolchain install nightly
source ~/.cargo/env
Error: ()

warning: build failed, waiting for other jobs to finish...
error: failed to compile `hunter v1.3.5`, intermediate artifacts can be found at `/var/folders/6g/x2w6kspd73jcx_bw8h7gmd400000gn/T/cargo-installqO023d`

Caused by:
  build failed

@straussdd
Copy link
Collaborator

straussdd commented Apr 17, 2020

@michalens I'm not 100% sure now, but I think the problem is, that nightly isn't set as your default toolchain in cargo. You could either:

  • Set it as the default toolchain: rustup default nightly
  • Explicitly state which toolchain cargo should use:
    PKG_CONFIG_PATH='/Library/Frameworks/GStreamer.framework/Versions/Current/lib/pkgconfig' cargo +nightly install hunter

@sarmong
Copy link
Author

sarmong commented Apr 17, 2020

Second option worked. Thank you!

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