-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
ffmpeg_7: fix darwin build #322724
ffmpeg_7: fix darwin build #322724
Conversation
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.
Diff LGTM but I can't test this myself.
If Darwin CI is green though, that'd be good enough for me.
@@ -47,6 +47,6 @@ stdenv.mkDerivation (finalAttrs: { | |||
pkgConfigModules = [ "xevd" ]; | |||
maintainers = with lib.maintainers; [ jopejoe1 ]; | |||
platforms = lib.platforms.all; | |||
broken = !stdenv.hostPlatform.isx86 || stdenv.hostPlatform.isDarwin; | |||
broken = !stdenv.hostPlatform.isx86 || !stdenv.cc.isGNU; |
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.
A comment with the error and/or an upstream reference would be great.
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.
and from reading the cmake file
@@ -39,7 +39,7 @@ | |||
, withAribcaption ? withFullDeps && lib.versionAtLeast version "6.1" # ARIB STD-B24 Caption Decoder/Renderer | |||
, withAss ? withHeadlessDeps && stdenv.hostPlatform == stdenv.buildPlatform # (Advanced) SubStation Alpha subtitle rendering | |||
, withAudioToolbox ? withHeadlessDeps && stdenv.isDarwin # Apple AudioToolbox | |||
, withAvFoundation ? withHeadlessDeps && stdenv.isDarwin # Apple AVFoundation framework | |||
, withAvFoundation ? withHeadlessDeps && stdenv.isDarwin && !(lib.versionAtLeast version "7" && stdenv.hostPlatform.isx86) # Apple AVFoundation framework |
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.
Again, a comment briefly describing the current situation would be great.
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.
Done
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.
Built on aarch64-darwin
@JohnRTitor could you build on x86 via rosetta? That's what's being fixed here. aarch64-darwin was working already. |
Result of |
@DontEatOreo I assume you cross compiled it on x86-darwin? |
Result of 1 package marked as broken and skipped:
7 packages failed to build:
14 packages built:
|
Huh, full failed? Could you post the log? @ofborg build ffmpeg_7-full |
|
The issue on ffmpeg_7-full on Darwin has something to do with ffmpeg not finding libquirc. |
The paste link is dead. |
If nobody figures this out before I finish dealing with FFmpeg 4, I’ll try to take a look at it then. |
ce04ecb
to
6c65f6f
Compare
Found the issue it seems libquirc was not linked correctly it was found during compile time but wen trying to run the build ffmpeg binary it failed to find it. For now i disabled it as i do not know why it was linked incorrectly. |
@ofborg build ffmpeg_7-full |
Building It seems dodgy that Perhaps we could consider including that patch or bumping to that commit and see if it fixes the issue? |
It does build! |
Result of 1 package marked as broken and skipped:
7 packages built:
|
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.
LGTM!
My branch fixing ffmpeg_7-full includes avfoundation, quirc and xev{d,e} patches, PR incoming later today. Re |
The combination of #328420, #328422, #328424 and #328428 should fix both ffmpeg_7 and ffmpeg_7-full on Darwin (and as a bonus potentially fix xev{d,e} support on aarch64-linux pending testing). The changes are mostly simple but #328422 might hold things up a bit due to its complexity. I don't mind fixing things up if this PR gets merged but it would be nice if #328424 is considered (would imply changes to this PR) so that we never need to disable AVFoundation support. |
I personally prefer @toonn’s changes as they avoid regressing functionality and don’t seem too complex to me. |
This PR was already partially incorrect because of @toonn's merged changes :( Hopefully we can get the xev{d,e} changes in soon and revert the unnecessary AVFoundation disabling. |
This was disabled in NixOS#322724 after NixOS#328424 provided a patch fixing it.
This was disabled in NixOS#322724 after NixOS#328420 fixed quirc.
Description of changes
FFmpeg 7 on x86_64-darwin currently fails to compile with AV Foundation enabled, so disabling for x86_64-darwin on ffmpeg 7 or newer.
Also, xeve and xevd fail to compile with non GCC compilers, so disabling them on non gnu cc.
A Test for ffmpef_7-full on Darwin both architectures is currently still failing.
Full build log https://hydra.nixos.org/build/263289438/nixlog/1
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.