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

qtwebengine: Use system ffmpeg on aarch64 #45122

Merged
merged 1 commit into from Aug 25, 2018

Conversation

Thra11
Copy link
Member

@Thra11 Thra11 commented Aug 16, 2018

On aarch64, linking against the vendored ffmpeg fails. Including ffmpeg
as a dependency and passing -system-ffmpeg to qmake fixes this.

Motivation for this change

QtWebengine fails to build on aarch64 due to problems linking against the bundled ffmpeg.

Things done

Added a qmake flag -system-ffmpeg when building for Aarch64 or Aarch32
Added ffmpeg as an optional dependency

Note: So far, I have only tested Qt 5.11's qtwebengine.

  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

cc @matthewbauer

@Thra11 Thra11 requested a review from ttuegel as a code owner August 16, 2018 17:37
@dezgeg
Copy link
Contributor

dezgeg commented Aug 16, 2018

Maybe it could be done on all platforms? Having the build time of qtwebengine go down would be pretty useful.

@Thra11
Copy link
Member Author

Thra11 commented Aug 16, 2018

Yes, I wondered about doing it on all platforms. I decided (at least initially) to err on the side of caution and not risk breaking things which currently work.

@@ -117,7 +118,9 @@ EOF
fi
'';

qmakeFlags = optional enableProprietaryCodecs "-- -proprietary-codecs";
Copy link
Member

Choose a reason for hiding this comment

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

This is causing a rebuild on other platforms (I think) because the number of list elements changes. Until we decide to use -system-ffmpeg on all platforms, could you change this so that it does not rebuild on other platforms?

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've just noticed I also made a mistake in my addition to propagatedBuildInputs, which means ffmpeg gets added on other platforms, when it shouldn't.

@Thra11
Copy link
Member Author

Thra11 commented Aug 20, 2018

I've made a few changes:

  • Rephrased the qmakeFlags expression so that it evaluates to exactly the same list as before on non arm platforms
  • Fixed the change to propagatedBuildInputs (previously it said (!stdenv.isAarch32 || stdenv.isAarch64))
  • Replaced stdenv.isAarch* with stdenv.hostPlatform.isArm so as to be correct for cross-compilation

On aarch64, linking against the vendored ffmpeg fails. Including ffmpeg
as a dependency and passing -system-ffmpeg to qmake fixes this.

Slightly odd conditional in qmakeFlags to avoid altering the list on
non-arm platforms, so that the change doesn't trigger an unneccessary
rebuild.
@Thra11
Copy link
Member Author

Thra11 commented Aug 24, 2018

Fixed mistake: Replaced isArm, as it is a synonym for isAarch32 and so doesn't cover isAarch64.

@ttuegel ttuegel merged commit b74dc6f into NixOS:master Aug 25, 2018
@Thra11 Thra11 deleted the qtwebengine-aarch64 branch August 25, 2018 16:56
@Thra11 Thra11 mentioned this pull request Aug 26, 2018
9 tasks
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