diff options
-rw-r--r-- | var/spack/repos/builtin/packages/py-torchvision/package.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index d5ea32a137..1f17b6529d 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -152,6 +152,13 @@ class PyTorchvision(PythonPackage): # Many of the datasets require additional dependencies to use. # These can be installed after the fact. + def flag_handler(self, name, flags): + # https://github.com/pytorch/vision/issues/8653 + if name == "ldflags": + if self.spec.satisfies("%apple-clang@15:"): + flags.append("-Wl,-ld_classic") + return (flags, None, None) + def setup_build_environment(self, env): # The only documentation on building is what is found in setup.py and: # https://github.com/pytorch/vision/blob/main/CONTRIBUTING.md#development-installation |