Skip to content

x265: fix build on aarch64#100807

Closed
thefloweringash wants to merge 1 commit intoNixOS:stagingfrom
thefloweringash:x265-aarch64
Closed

x265: fix build on aarch64#100807
thefloweringash wants to merge 1 commit intoNixOS:stagingfrom
thefloweringash:x265-aarch64

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

@ofborg ofborg bot requested a review from codyopel October 17, 2020 06:56
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Oct 17, 2020
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
Member

@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 ;-)

sha256 = "1jzgv2hxhcwmsdf6sbgyzm88a46dp09ll1fqj92g9vckvh9a7dsn";
};

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

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

};

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

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

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments