Merge pull request #310666 from annaleeleaves/torch-fix-x64-darwin
python312Packages.torch: fix aligned_alloc error on darwin
This commit is contained in:
commit
5a6b8042a0
@ -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)'
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user