diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-05-11 10:55:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-11 10:55:00 +0200 |
commit | 5a6b8042a04a1643b766156469d637628b45bf4c (patch) | |
tree | a415c71b2d494f78345f05204d3b10e2b8f08be2 /pkgs | |
parent | 10fe3323b751343a57201ad5604f85fe879caf12 (diff) | |
parent | 74c787a03e19d7aa7f1159880410ce2bd1e9995a (diff) |
Merge pull request #310666 from annaleeleaves/torch-fix-x64-darwin
python312Packages.torch: fix aligned_alloc error on darwin
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/torch/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index c98b0ac920c5c..d8d3a6532a504 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -205,8 +205,8 @@ in buildPythonPackage rec { # error: no member named 'aligned_alloc' in the global namespace; did you mean simply 'aligned_alloc' # This lib overrided aligned_alloc hence the error message. Tltr: his function is linkable but not in header. + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0") '' - substituteInPlace third_party/pocketfft/pocketfft_hdronly.h --replace '#if __cplusplus >= 201703L - inline void *aligned_alloc(size_t align, size_t size)' '#if __cplusplus >= 201703L && 0 + substituteInPlace third_party/pocketfft/pocketfft_hdronly.h --replace-fail '#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER)) + inline void *aligned_alloc(size_t align, size_t size)' '#if 0 inline void *aligned_alloc(size_t align, size_t size)' ''; |