Repository: spack/spack

Issue:
Installation issue: Perl failed to recognize macOS Big Sur at step ‘configure’
<!-- Thanks for taking the time to report this build failure. To proceed with the report please:

1. Title the issue "Installation issue: <name-of-the-package>".
2. Provide the information required below.

We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively! -->

### Steps to reproduce the issue

<!-- Fill in the exact spec you are trying to build and the relevant part of the error message -->
```console
$ spack install -v perl
...
*** Unexpected product version 11.0.
***
*** Try running sw_vers and see what its ProductVersion says.
```

This problem is basically due to Apple's bumping the version number to 11.0. It is actually resolved by this [PR](https://github.com/Perl/perl5/pull/17946). I believe that we just have to copy what they did.

### Information on your system

<!-- Please include the output of `spack debug report` -->

* **Spack:** 0.15.4-947-1aceb38b8
* **Python:** 3.8.5
* **Platform:** darwin-macos-skylake

<!-- If you have any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.) you can add that here as well. -->

### Additional information

<!-- Please upload the following files. They should be present in the stage directory of the failing build. Also upload any config.log or similar file if one exists. -->

[spack-build-env.txt](https://github.com/spack/spack/files/5335141/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/5335142/spack-build-out.txt)

<!-- Some packages have maintainers who have volunteered to debug build failures. Run `spack maintainers <name-of-the-package>` and @mention them here if they exist. -->

### General information

<!-- These boxes can be checked by replacing [ ] with [x] or by clicking them after submitting the issue. -->
- [x] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [x] I have run `spack maintainers <name-of-the-package>` and @mentioned any maintainers
- [x] I have uploaded the build log and environment files
- [x] I have searched the issues of this repo and believe this is not a duplicate


Discussion:
Want to submit a PR? Basically you would just add that patch and apply it to whatever versions work.
@adamjstewart Well... I've got a lot to learn before submitting this PR. I may need some time. But I will try.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py
--- a/var/spack/repos/builtin/packages/perl/package.py
+++ b/var/spack/repos/builtin/packages/perl/package.py
@@ -73,6 +73,10 @@ class Perl(Package):  # Perl doesn't use Autotools, it should subclass Package
     # https://bugzilla.redhat.com/show_bug.cgi?id=1536752
     patch('https://src.fedoraproject.org/rpms/perl/raw/004cea3a67df42e92ffdf4e9ac36d47a3c6a05a4/f/perl-5.26.1-guard_old_libcrypt_fix.patch', level=1, sha256='0eac10ed90aeb0459ad8851f88081d439a4e41978e586ec743069e8b059370ac', when='@:5.26.2')
 
+    # Fix 'Unexpected product version' error on macOS 11.0 Big Sur
+    # https://github.com/Perl/perl5/pull/17946
+    patch('macos-11-version-check.patch', when='@5.24.1:5.32.0 platform=darwin')
+
     # Installing cpanm alongside the core makes it safe and simple for
     # people/projects to install their own sets of perl modules.  Not
     # having it in core increases the "energy of activation" for doing


Test patch: