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

gstreamer: fix darwin build #63627

Merged
merged 1 commit into from Jun 21, 2019
Merged

Conversation

LnL7
Copy link
Member

@LnL7 LnL7 commented Jun 21, 2019

Motivation for this change

Another fix to unblock qt5.qtmultimedia #63617.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jun 21, 2019
@ofborg ofborg bot requested review from ttuegel and matthewbauer June 21, 2019 18:49
@matthewbauer matthewbauer merged commit 987ec8a into NixOS:master Jun 21, 2019
@LnL7 LnL7 deleted the darwin-gstreamer branch June 21, 2019 19:29
@marzipankaiser
Copy link
Contributor

This breaks steam-run on NixOS for me (#63635)


propagatedBuildInputs = [ glib ];

mesonFlags = [
# Enables all features, so that we know when new dependencies are necessary.
"-Dauto_features=enabled"
# "-Dauto_features=enabled"
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not.

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Contributor

@jtojnar jtojnar Jun 21, 2019

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

as per https://gitlab.freedesktop.org/gstreamer/gstreamer/blob/c34fe82b5badf3c82d81f5baa4187d599aa6f9df/meson_options.txt#L22

but that will also remove unwind support on Darwin. If you want to support that, you can replace the following line

https://gitlab.freedesktop.org/gstreamer/gstreamer/blob/c34fe82b5badf3c82d81f5baa4187d599aa6f9df/meson.build#L349

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";
Copy link
Contributor

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.

Copy link
Member Author

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;
Copy link
Contributor

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;
Copy link
Contributor

@jtojnar jtojnar Jun 21, 2019

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?

@lopsided98 lopsided98 mentioned this pull request Jun 22, 2019
10 tasks
@jb55
Copy link
Contributor

jb55 commented Jul 10, 2019

this broke my system (NixOS @ channels/nixos-unstable):

$ nix-shell -p libreoffice

anonymous function at /home/jb55/nixpkgs/pkgs/development/libraries/gstreamer/default.nix:1:1 called without required argument 'CoreServices'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants