How do I disable gtk4 when building gstreamer?
I am trying to build gstreamer on my Debian computer. I am working on the main-branch (commit gstreamer@289bc9c9). I have enabled gst-plugins-rs, since I am investigating the 'isofmp4mux'-element. When enabling gst-plugins-rs I ran into trouble with gtk4. Since gtk4 isn't available for Debian 11 I choosed to disable gtk4. I have configured gstreamer in the following way:
$ meson setup -Dgpl=enabled -Drs=enabled -Dugly=enabled -Ddoc=disabled -Dgst-plugins-rs:gtk4=disabled builddir
Even if I have, to the best of my knowledge, disabled gtk4 i still run into gtk4-issues when building:
$ meson compile -C builddir
Build Output:
error: failed to run custom build command for `gdk4-sys v0.7.0 (https://github.com/gtk-rs/gtk4-rs#77752e4a)`
Caused by:
process didn't exit successfully: `/mnt/storage/GIT/gstreamer/builddir/subprojects/gst-plugins-rs/target/debug/build/gdk4-sys-08e710a046477452/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=GTK4_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
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
`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_PATH="/mnt/storage/GIT/gstreamer/builddir/meson-uninstalled" "pkg-config" "--libs" "--cflags" "gtk4" "gtk4 >= 4.6"` did not exit successfully: exit status: 1
error: could not find system library 'gtk4' required by the 'gdk4-sys' crate
--- stderr
Package gtk4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk4.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk4' found
Package gtk4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk4.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk4' found
warning: build failed, waiting for other jobs to finish...
Error: CliError { error: Some(1 job failed), exit_code: 101 }
while executing ['/usr/bin/python3', '/mnt/storage/GIT/gstreamer/subprojects/gst-plugins-rs/cargo_wrapper.py', 'build', '/mnt/storage/GIT/gstreamer/builddir/subprojects/gst-plugins-rs', '/mnt/storage/GIT/gstreamer/subprojects/gst-plugins-rs', '/mnt/storage/GIT/gstreamer/builddir', 'debug', '/usr/local', 'lib/x86_64-linux-gnu', '--packages', 'gst-plugin-audiofx', 'gst-plugin-claxon', 'gst-plugin-lewton', 'gst-plugin-spotify', 'gst-plugin-file', 'gst-plugin-threadshare', 'gst-plugin-mp4', 'gst-plugin-fmp4', 'gst-plugin-aws', 'gst-plugin-hlssink3', 'gst-plugin-ndi', 'gst-plugin-onvif', 'gst-plugin-raptorq', 'gst-plugin-reqwest', 'gst-plugin-rtp', 'gst-plugin-webrtchttp', 'gst-plugin-webrtc', 'gst-plugin-textahead', 'gst-plugin-json', 'gst-plugin-regex', 'gst-plugin-textwrap', 'gst-plugin-fallbackswitch', 'gst-plugin-livesync', 'gst-plugin-togglerecord', 'gst-plugin-tracers', 'gst-plugin-uriplaylistbin', 'gst-plugin-cdg', 'gst-plugin-closedcaption', 'gst-plugin-ffv1', 'gst-plugin-flavors', 'gst-plugin-gif', 'gst-plugin-hsv', 'gst-plugin-png', 'gst-plugin-rav1e', 'gst-plugin-videofx', 'gst-plugin-sodium', '--depfile', 'subprojects/gst-plugins-rs/gst-plugins-rs.dep', '--lib-suffixes', 'so', '--features', 'gst-webrtc/v1_22', 'gst/v1_22', 'gst-app/v1_22', 'gst-plugin-webrtc/gst1_22', 'gst-video/v1_22', 'gst-rtp/v1_22', 'gst-sdp/v1_22', 'gtk', 'gio', 'gst-plugin-gtk4', 'gst/v1_20', 'gtk', 'gio', 'gst-plugin-gtk4', 'gtk', 'gio', 'gst-plugin-gtk4', 'gst/v1_22', 'clap', 'serde', 'serde_json', 'clap', '--disable-doc']
FAILED: subprojects/gst-plugins-rs/libgstrsaudiofx.so subprojects/gst-plugins-rs/libgstclaxon.so subprojects/gst-plugins-rs/libgstlewton.so subprojects/gst-plugins-rs/libgstspotify.so subprojects/gst-plugins-rs/libgstrsfile.so subprojects/gst-plugins-rs/libgstthreadshare.so subprojects/gst-plugins-rs/libgstmp4.so subprojects/gst-plugins-rs/libgstfmp4.so subprojects/gst-plugins-rs/libgstaws.so subprojects/gst-plugins-rs/libgsthlssink3.so subprojects/gst-plugins-rs/libgstndi.so subprojects/gst-plugins-rs/libgstrsonvif.so subprojects/gst-plugins-rs/libgstraptorq.so subprojects/gst-plugins-rs/libgstreqwest.so subprojects/gst-plugins-rs/libgstrsrtp.so subprojects/gst-plugins-rs/libgstwebrtchttp.so subprojects/gst-plugins-rs/libgstrswebrtc.so subprojects/gst-plugins-rs/libgsttextahead.so subprojects/gst-plugins-rs/libgstjson.so subprojects/gst-plugins-rs/libgstregex.so subprojects/gst-plugins-rs/libgsttextwrap.so subprojects/gst-plugins-rs/libgstfallbackswitch.so subprojects/gst-plugins-rs/libgstlivesync.so subprojects/gst-plugins-rs/libgsttogglerecord.so subprojects/gst-plugins-rs/libgstrstracers.so subprojects/gst-plugins-rs/libgsturiplaylistbin.so subprojects/gst-plugins-rs/libgstcdg.so subprojects/gst-plugins-rs/libgstrsclosedcaption.so subprojects/gst-plugins-rs/libgstffv1.so subprojects/gst-plugins-rs/libgstrsflv.so subprojects/gst-plugins-rs/libgstgif.so subprojects/gst-plugins-rs/libgsthsv.so subprojects/gst-plugins-rs/libgstrspng.so subprojects/gst-plugins-rs/libgstrav1e.so subprojects/gst-plugins-rs/libgstrsvideofx.so subprojects/gst-plugins-rs/libgstsodium.so
/usr/bin/python3 /mnt/storage/Tools/meson/meson.py --internal exe --unpickle /mnt/storage/GIT/gstreamer/builddir/meson-private/meson_exe_python3_b11c21fffc3860b933b90c1e76c15c67800baf47.dat
ninja: build stopped: subcommand failed.
How do I go about disabling gtk4? To me it seems that gtk4 still is needed.
BR
Edited by Nirbheek Chauhan