diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index c2d6bbb281..e0393aab57 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -9,6 +9,7 @@ import spack.target from spack.operating_systems.mac_os import MacOs +from spack.version import Version from ._platform import Platform @@ -60,7 +61,7 @@ def setup_platform_environment(self, pkg, env): """ os = self.operating_sys[pkg.spec.os] - version = os.version + version = Version(os.version) if len(version) == 1: # Version has only one component: add a minor version to prevent # potential errors with `ld`,