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

x265: fix build on aarch64 #100807

Closed
wants to merge 1 commit into from

Conversation

thefloweringash
Copy link
Member

Motivation for this change

Fixing aarch64 build of x265 after #98091.

I'll send the patch upstream when I figure out how to do so.

As for the high bit rate support, the header file for aarch64 assembly doesn't include the the prefixed versions (x265_10bit, x265_12bit) from which I conclude it is not supported. Since it seems like it has to be explicitly implemented I made this a whitelist of just isx86_64.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS (aarch64-linux only)
    • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@thefloweringash
Copy link
Member Author

Found an upstream issue: https://bitbucket.org/multicoreware/x265_git/issues/554

Copy link
Member

@lovesegfault lovesegfault left a comment

Choose a reason for hiding this comment

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

Tested and working!

cc. @flokli for the big green button

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

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

No green button, requested changes ;-)

@@ -34,9 +34,13 @@ let
sha256 = "1jzgv2hxhcwmsdf6sbgyzm88a46dp09ll1fqj92g9vckvh9a7dsn";
};

patches = stdenv.lib.optionals stdenv.hostPlatform.isAarch64 [
Copy link
Contributor

Choose a reason for hiding this comment

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

patches shouldn't be conditional on a specific architecture - assuming the patch won't apply after a bump, this will lead to silent breakages.

If this patch doesn't break other arches, it should just be applied independent of architecture

@@ -34,9 +34,13 @@ let
sha256 = "1jzgv2hxhcwmsdf6sbgyzm88a46dp09ll1fqj92g9vckvh9a7dsn";
};

patches = stdenv.lib.optionals stdenv.hostPlatform.isAarch64 [
./0001-dynamicHDR10-update-CMakeLists.txt-for-aarch64-suppo.patch
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't bundle patches in nixpkgs, if they can be sent upstream, and fetchpatched in here.

When doing so, please also add a comment pointing to the upstream PR.

@thefloweringash
Copy link
Member Author

Sorry for the delay in getting back to this. After seeing #101594 I realized that the patch only applies to the component that is subsequently disabled, so is completely unnecessary, Oops. Closing in favor of #101594.

@thefloweringash thefloweringash deleted the x265-aarch64 branch October 25, 2020 01:49
@r-burns r-burns mentioned this pull request Oct 31, 2020
10 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

3 participants