Unable to install faceblur element from source in Mac M1

I already have Gstreamer installed using MacOS runtime and development installers: Installing on Mac OS X

Details about my Mac M1:

System Version: macOS 14.5 (23F79)
Kernel Version: Darwin 23.5.0
Boot Volume: Macintosh HD
Boot Mode: Normal

This is how my ~/.zshrc looks:

export PKG_CONFIG_PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig
export PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/bin:$PATH

faceblur is not present by default. I tried running gst-inspect-1.0 faceblur but nothing showed up.
So, I tried installing it from source.

Steps:

  1. clone gstreamer repo

  2. pip3 install --user meson

  3. meson setup builddir -Dintrospection=disabled.
    a. Not using the flag -Dintrospection=disabled will lead to this error: ERROR: Tried to override finding of executable "g-ir-scanner" which has already been found.

  4. meson compile -C builddir.
    This lead to following errors:
    #1:

    fatal error: 'absl/types/optional.h' file not found
    #include "absl/types/optional.h"
    

    To fix this, I cloned GitHub - abseil/abseil-cpp: Abseil Common Libraries (C++) and copied /absl to relevant folder:
    cp -r absl/ /Library/Frameworks/GStreamer.framework/Versions/1.0/include/webrtc-audio-processing-1/absl
    After this #1 got fixed but I got a new error #2 below.

    #2:

    ninja: Entering directory `/Users/vivekchandela/sharechat/gstreamer/builddir'
    [1/1016] Linking target subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib
    FAILED: subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib
    clang  -o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstopengl.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglelement.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglalpha.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstgluploadelement.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstgldownloadelement.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglcolorconvertelement.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglfilterbin.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglsinkbin.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglsrcbin.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglimagesink.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglfiltercube.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstgleffects.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectscurves.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectssources.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectidentity.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectmirror.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectsqueeze.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectstretch.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectfisheye.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffecttwirl.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectbulge.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffecttunnel.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectsquare.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectlumatocurve.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectrgbtocurve.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectsin.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectxray.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectglow.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectblur.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectsobel.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/effects_gstgleffectlaplacian.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglcolorscale.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglcolorbalance.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstgldeinterlace.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglfiltershader.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglfilterapp.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglmixerbin.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglvideomixer.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglstereomix.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglstereosplit.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglviewconvert.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gltestsrc.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstgltestsrc.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstgloverlaycompositorelement.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglutils.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglfilterglass.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglmosaic.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstgltransformation.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstglvideoflip.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstgldifferencematte.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/gstgloverlay.c.o subprojects/gst-plugins-base/ext/gl/libgstopengl.dylib.p/caopengllayersink.m.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -shared -install_name @rpath/libgstopengl.dylib -Wl,-rpath,@loader_path/../../gst-libs/gst/gl -Wl,-rpath,@loader_path/../../../gstreamer/libs/gst/base -Wl,-rpath,@loader_path/../../../gstreamer/gst -Wl,-rpath,@loader_path/../../gst-libs/gst/video -Wl,-rpath,@loader_path/../../../orc/orc -Wl,-rpath,@loader_path/../../../gstreamer/libs/gst/controller -Wl,-rpath,/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib -Wl,-rpath,/opt/homebrew/lib subprojects/gst-plugins-base/gst-libs/gst/gl/libgstgl-1.0.0.dylib subprojects/gst-plugins-base/gst-libs/gst/video/libgstvideo-1.0.0.dylib subprojects/gstreamer/libs/gst/base/libgstbase-1.0.0.dylib subprojects/gstreamer/gst/libgstreamer-1.0.0.dylib subprojects/orc/orc/liborc-0.4.0.dylib subprojects/gstreamer/libs/gst/controller/libgstcontroller-1.0.0.dylib -Wl,-rpath,/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libglib-2.0.dylib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libintl.dylib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libgobject-2.0.dylib -Wl,-rpath,/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libgmodule-2.0.dylib -Wl,-rpath,/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib -lm -framework Cocoa /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libgraphene-1.0.dylib -Wl,-rpath,/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libpng16.dylib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libz.dylib -L/Users/matt/Projects/cerbero-1.24/build/dist/darwin_universal/lib -ljpeg -framework QuartzCore -framework Foundation -framework CoreFoundation /opt/homebrew/lib/libX11.dylib
    ld: warning: duplicate -rpath '/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib' ignored
    ld: warning: duplicate -rpath '/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib' ignored
    ld: warning: duplicate -rpath '/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib' ignored
    ld: warning: duplicate -rpath '/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib' ignored
    ld: warning: search path '/Users/matt/Projects/cerbero-1.24/build/dist/darwin_universal/lib' not found
    ld: library 'jpeg' not found
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    [2/1016] Linking target subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib
    FAILED: subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib
    clang  -o subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib.p/gstvorbis.c.o subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib.p/gstvorbiselement.c.o subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib.p/gstvorbisdec.c.o subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib.p/gstvorbisdeclib.c.o subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib.p/gstvorbisenc.c.o subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib.p/gstvorbisparse.c.o subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib.p/gstvorbistag.c.o subprojects/gst-plugins-base/ext/vorbis/libgstvorbis.dylib.p/gstvorbiscommon.c.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -shared -install_name @rpath/libgstvorbis.dylib -Wl,-rpath,@loader_path/../../gst-libs/gst/audio -Wl,-rpath,@loader_path/../../gst-libs/gst/tag -Wl,-rpath,@loader_path/../../../gstreamer/libs/gst/base -Wl,-rpath,@loader_path/../../../gstreamer/gst -Wl,-rpath,@loader_path/../../../orc/orc -Wl,-rpath,/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib subprojects/gst-plugins-base/gst-libs/gst/audio/libgstaudio-1.0.0.dylib subprojects/gst-plugins-base/gst-libs/gst/tag/libgsttag-1.0.0.dylib subprojects/gstreamer/libs/gst/base/libgstbase-1.0.0.dylib subprojects/gstreamer/gst/libgstreamer-1.0.0.dylib subprojects/orc/orc/liborc-0.4.0.dylib -L/Users/matt/Projects/cerbero-1.24/build/dist/darwin_universal/lib -lvorbis -L/Users/matt/Projects/cerbero-1.24/build/dist/darwin_universal/lib -lvorbisenc -Wl,-rpath,/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libglib-2.0.dylib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libintl.dylib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libgobject-2.0.dylib -Wl,-rpath,/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libgmodule-2.0.dylib -Wl,-rpath,/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib -lm /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib/libz.dylib
    ld: warning: duplicate -rpath '/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib' ignored
    ld: warning: duplicate -rpath '/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib' ignored
    ld: warning: duplicate -rpath '/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../lib' ignored
    ld: warning: search path '/Users/matt/Projects/cerbero-1.24/build/dist/darwin_universal/lib' not found
    ld: warning: search path '/Users/matt/Projects/cerbero-1.24/build/dist/darwin_universal/lib' not found
    ld: library 'vorbis' not found
    clang: error: linker command failed with exit code 1 (use -v to see invocation)1
    

libgstopengl.dylib and libgstvorbis.dylib are present in /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0 but not in /Library/Frameworks/GStreamer.framework/Versions/1.0/lib

I tried copying the following files from /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0 to /Library/Frameworks/GStreamer.framework/Versions/1.0/lib but this also didn’t solve the issue:

  1. libgstopengl.a
  2. libgstopengl.dylib
  3. libgstopengl.la
  4. libgstvorbis.a
  5. libgstvorbis.dylib
  6. libgstvorbis.la

I’ve not been able to fix this yet. Any help would be appreciated.