-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
gstreamer: fix darwin build #63627
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
gstreamer: fix darwin build #63627
Conversation
This breaks |
|
||
propagatedBuildInputs = [ glib ]; | ||
|
||
mesonFlags = [ | ||
# Enables all features, so that we know when new dependencies are necessary. | ||
"-Dauto_features=enabled" | ||
# "-Dauto_features=enabled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you disable just the feature you do not want on darwin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how, but my changes are all darwin only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, whoops. I didn't mean to include that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if there's a way to disable the pkgconfig checks for a dependency? The other part didn't do anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than patching it, I do not think so.
You can disable it by using
-Dunwind=disabled
but that will also remove unwind support on Darwin. If you want to support that, you can replace the following line
by
unwind_dep = cc.find_library('unwind', required : get_option('libunwind'))
on Darwin.
]; | ||
] | ||
# darwin.libunwind doesn't have pkgconfig definitions so meson doesn't detect it. | ||
++ stdenv.lib.optional stdenv.isDarwin "-DHAVE_UNWIND=1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this does anything? I do not think meson supports passing compiler flags like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it only worked because of the accidental change above. The problem is that the apple libunwind sources don't contain pkgconfig definitions, I'm not very familiar with meson but we just need a way to to tell it to enable without checking.
@@ -10671,6 +10671,7 @@ in | |||
|
|||
gst_all_1 = recurseIntoAttrs(callPackage ../development/libraries/gstreamer { | |||
callPackage = newScope { libav = pkgs.ffmpeg_4; }; | |||
inherit (darwin.apple_sdk.frameworks) CoreServices; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should add that to the scope on previous line?
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec { | |||
outputs = [ "out" "dev" ]; | |||
|
|||
nativeBuildInputs = [ autoreconfHook flex perl pkgconfig libintl bison2 glib ]; | |||
buildInputs = stdenv.lib.optional stdenv.isDarwin libunwind; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional, or just a result of confusion of gst_all_1.gstreamer
with gstreamer
?
this broke my system (NixOS @ channels/nixos-unstable):
|
Motivation for this change
Another fix to unblock
qt5.qtmultimedia
#63617.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)