-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
ffmpeg: fix cross compilation #76915
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
Conversation
Would |
@jtojnar Their configure script is a custom bash script. It's not auto-generated as far as I can tell. |
Can you send this patch also upstream? |
9a10fdf
to
26400c5
Compare
I've replaced the patch step for ./configure with something a little nicer--just setting It appears at least that debian and ubuntu use these prefixed pkg-configs. Notice It's unclear to me what the "right" way to do this is. Is ffmpeg in the wrong here, and if so is there some document we could point to that says so? Maybe ffmpeg could do a conditional check for the prefixed version, and then fall back to just |
26400c5
to
f6f8f0b
Compare
That workaround looks good enough for me right now. |
This should have gone to staging... I merged it by accident and than reverted it in order to cherry-pick it to staging. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/arm-cross-compiling-libopus-not-found-by-pkg-config/5621/3 |
@@ -163,8 +163,10 @@ stdenv.mkDerivation rec { | |||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ | |||
"--cross-prefix=${stdenv.cc.targetPrefix}" | |||
"--enable-cross-compile" | |||
"--pkg-config=pkg-config" # Override ffmpeg's ./configure assumption that pkg-config is prefixed by the architecture. (e.g. aarch64-unknown-linux-gnu-pkg-config) |
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.
We should eventually prefix it, though. Fine for now.
Motivation for this change
Fix for cross compilation.
Built on x86_64 and tested on raspberry pi 1 with pkgsCross.raspberryPi.ffmpeg.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @codyopel