gst-plugin-rs icon indicating copy to clipboard operation
gst-plugin-rs copied to clipboard

Build issue - user error?

Open scalers-ai opened this issue 3 years ago • 1 comments

  1. building on Mac M1Max
  2. Newbie (<3 days old) Rust user
  3. Trying to build the gst-plugin-rs project
  4. Installed gstreamer "official" packages - devel + non-level
  5. gstreamer works fine (e.g. gst-launch-1.0 videotestsrc ! autovideosink)
  6. "cargo build" fails with this errors. I am probably missing a step or two - any pointers would be helpful 🙏

error occurred: Command "cc" "-O1" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-arch" "arm64" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/include/gstreamer-1.0" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/include" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/include/glib-2.0" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/lib/glib-2.0/include" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/include/gstreamer-1.0" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/include" "-I" "/Users/matt/Projects/cerbero-1.20/build/dist/darwin_universal/include/orc-0.4" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/include/gstreamer-1.0" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/include" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/include/glib-2.0" "-I" "/non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config/lib/glib-2.0/include" "-Wall" "-Wextra" "-DRTPJitterBuffer=TsRTPJitterBuffer" "-DRTPJitterBufferClass=TsRTPJitterBufferClass" "-DRTPJitterBufferPrivate=TsRTPJitterBufferClass" "-o" "/Users/cgadgil/dev/src/scalers-ai/common/tmp/gst-plugin-rs/target/debug/build/gst-plugin-threadshare-6bbad1f4e13769c6/out/src/jitterbuffer/rtpjitterbuffer.o" "-c" "src/jitterbuffer/rtpjitterbuffer.c" with args "cc" did not execute successfully (status code exit status: 1).

warning: build failed, waiting for other jobs to finish...

scalers-ai avatar Sep 01 '22 02:09 scalers-ai

The error is hidden in the command there :) "non_existent_on_purpose/please_use_framework_pkg-config/or_pass_--define-prefix_to_your_pkg-config"

You're using an incompatible version of pkg-config it seems. Which one are you using?

sdroege avatar Sep 01 '22 07:09 sdroege

I am using the Homebrew version - I guess it can't find the "official" gstreamer build

  1. pkg-config version: /opt/homebrew/bin/pkg-config
  2. Gstreamer version /Library/Frameworks/GStreamer.framework/

scalers-ai avatar Sep 03 '22 10:09 scalers-ai

Try using the one from the GStreamer binaries. Also please ask such support questions on the GStreamer mailing list please :)

sdroege avatar Sep 03 '22 10:09 sdroege

🙏

scalers-ai avatar Sep 03 '22 10:09 scalers-ai

For anyone facing a similar issue, here's the specific steps to implement the simple fix suggested (thanks @sdroege!)

i.e. to use the pkg-config with the official gstreamer build.

1a) export PATH=/Library/Frameworks/GStreamer.framework/Commands:${PATH} 2a) cargo build

scalers-ai avatar Sep 03 '22 10:09 scalers-ai