internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: spack/spack

Issue:
openmpi links host libgpfs.so with no way to exclude
We are installing openmpi on a host that happens to have GPFS installed. openmpi detects gpfs.h and links in libgpfs.so; but this prevents the build from being used on other systems that do not have GPFS installed. (It also means that the build depends on state that isn't expressed in its spec.)

- Why does openmpi see gpfs.h or libgpfs.so? I would have expected the build environment to not expose these during `./configure`.
- If I built this package with the same spec on two similar systems, one with GPFS and one without, would I end up with two different builds that share the same hash?
- I am working on a modification to the openmpi package that would allow this to be controlled; but my first attempt hasn't had the desired effect. See https://www.mail-archive.com/users@lists.open-mpi.org//msg33758.html

### Spack version
```console
$ spack --version
0.14.1-415-cbcac72
```

### Steps to reproduce the issue

```console
$ rpm -ql gpfs.base | grep -i 'gpfs\.h'
/usr/lpp/mmfs/include/gpfs.h
$ spack install openmpi
```

### Error Message

No error message in spack; but on hosts that then don't have GPFS.

```console
   libgpfs.so => not found
   libpsm2.so.2 => not found
```
### Information on your system
```
$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.6 (Maipo)
```

### General information

- [X] I have run `spack --version` and reported the version of Spack
- [X] I have searched the issues of this repo and believe this is not a duplicate


Discussion:
I think I've got a working patch, but we're still testing internally before I submit the PR.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -239,6 +239,7 @@ class Openmpi(AutotoolsPackage):
     variant('pmi', default=False, description='Enable PMI support')
     variant('cxx', default=False, description='Enable C++ MPI bindings')
     variant('cxx_exceptions', default=False, description='Enable C++ Exception support')
+    variant('gpfs', default=True, description='Enable GPFS support (if present)')
     # Adding support to build a debug version of OpenMPI that activates
     # Memchecker, as described here:
     #
@@ -407,6 +408,11 @@ def autoreconf(self, spec, prefix):
         perl = which('perl')
         perl('autogen.pl')
 
+    def setup_build_environment(self, env):
+        if '~gpfs' in self.spec:
+            env.set('ac_cv_header_gpfs_h', 'no')
+            env.set('ac_cv_header_gpfs_fcntl_h', 'no')
+
     def configure_args(self):
         spec = self.spec
         config_args = [


Test patch:
Repository: spack/spack

Issue:
Fetch error: OpenSSL
Either the OpenSSL URL schema has changed, or a micro-revision bump caused the existing URL to become invalid.

### Spack version

```console
$ spack --version
0.14.1-449-a4b3edd68
```

### Steps to reproduce the issue

```console
$ spack install openssl
==> 16620: Installing openssl
==> Fetching http://www.openssl.org/source/openssl-1.1.1e.tar.gz
################################################################################################################################ 100.0% -=O=-          #       #       #         #
curl: (22) The requested URL returned error: 404 Not Found
==> Failed to fetch file from URL: http://www.openssl.org/source/openssl-1.1.1e.tar.gz
    URL http://www.openssl.org/source/openssl-1.1.1e.tar.gz was not found!
```

### Additional information

The `url` property on the package definition is *only* valid for the latest version of each series:
```python
    url = "http://www.openssl.org/source/openssl-1.1.1d.tar.gz"
    list_url = "http://www.openssl.org/source/old/"
```
older version URLs look like `http://www.openssl.org/source/old/1.1.1/openssl-1.1.1d.tar.gz`.

### General information

- [x] I have run `spack --version` and reported the version of Spack
- [x] I have searched the issues of this repo and believe this is not a duplicate



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py
--- a/var/spack/repos/builtin/packages/openssl/package.py
+++ b/var/spack/repos/builtin/packages/openssl/package.py
@@ -25,6 +25,7 @@ class Openssl(Package):   # Uses Fake Autotools, should subclass Package
 
     # The latest stable version is the 1.1.1 series. This is also our Long Term
     # Support (LTS) version, supported until 11th September 2023.
+    version('1.1.1f', sha256='186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35')
     version('1.1.1e', sha256='694f61ac11cb51c9bf73f54e771ff6022b0327a43bbdfa1b2f19de1662a6dcbe')
     version('1.1.1d', sha256='1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2')
     version('1.1.1c', sha256='f6fb3079ad15076154eda9413fed42877d668e7069d9b87396d0804fdb3f4c90')


Test patch:
Repository: spack/spack

Issue:
Installation issue: Fails to build fl on skylake due to x86_64 target limit
### Spack version
```console
$ spack --version
0.14.0-905-0e4d561
```

### Steps to reproduce the issue

```console
$ spack -k install fl %gcc@4.8.5
...
==> Error: InstallError: fl is built for Linux x86_64 platform only.
...
==> Error: Failed to install fl due to ChildError: InstallError: fl is built for Linux x86_64 platform only.
/lustre/home/acct-hpc/hpc-jianwen/spack/var/spack/repos/builtin/packages/fl/package.py:24, in install:
         21            with working_dir('fl_{0}'.format(spec.version)):
         22                install_tree('.', prefix)
         23        else:
  >>  24            raise InstallError('fl is built for Linux x86_64 platform only.')
...
$ spack arch
linux-centos7-skylake_avx512
```

### Platform and user environment

```commandline
$ uname -a 
Linux 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -d
Description:    CentOS Linux release 7.5.1804 (Core)
``` 

### General information

- [x] I have run `spack --version` and reported the version of Spack
- [x] I have searched the issues of this repo and believe this is not a duplicate



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/fl/package.py b/var/spack/repos/builtin/packages/fl/package.py
--- a/var/spack/repos/builtin/packages/fl/package.py
+++ b/var/spack/repos/builtin/packages/fl/package.py
@@ -17,7 +17,7 @@ class Fl(Package):
 
     def install(self, spec, prefix):
         if (self.spec.satisfies('platform=linux') and
-           self.spec.satisfies('target=x86_64')):
+           self.spec.target.family == 'x86_64'):
             with working_dir('fl_{0}'.format(spec.version)):
                 install_tree('.', prefix)
         else:


Test patch:
Repository: spack/spack

Issue:
PAPI build failure when no fortran compiler present
PAPI's build will (cryptically) fail if a fortran compiler is not installed. Is there a good way to have the package check for a fortran compiler and create a more readable error?  


Discussion:
You can check to see if `self.compiler.f77` and `self.compiler.fc` are set. See `hdf5` for an example.
@sknigh Care to submit a PR?

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py
--- a/var/spack/repos/builtin/packages/papi/package.py
+++ b/var/spack/repos/builtin/packages/papi/package.py
@@ -2,12 +2,10 @@
 # Spack Project Developers. See the top-level COPYRIGHT file for details.
 #
 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-from spack import *
 import glob
 import os
 import sys
-from llnl.util.filesystem import fix_darwin_install_name
+import llnl.util.filesystem as fs
 
 
 class Papi(AutotoolsPackage):
@@ -68,6 +66,12 @@ def configure_args(self):
             options.append('--with-components={0}'.format(' '.join(variants)))
         return options
 
+    @run_before('configure')
+    def fortran_check(self):
+        if not self.compiler.fc:
+            msg = 'PAPI requires a Fortran compiler to build'
+            raise RuntimeError(msg)
+
     @run_before('configure')
     def component_configure(self):
         configure_script = Executable('./configure')
@@ -92,4 +96,4 @@ def fix_darwin_install(self):
         if sys.platform == 'darwin':
             os.rename(join_path(self.prefix.lib, 'libpapi.so'),
                       join_path(self.prefix.lib, 'libpapi.dylib'))
-            fix_darwin_install_name(self.prefix.lib)
+            fs.fix_darwin_install_name(self.prefix.lib)


Test patch:
Repository: spack/spack

Issue:
Spack Info: Default "Bool" Switch Strings
### Steps to reproduce the issue

```console
$ spack info warpx
# ...
Variants:
    Name [Default]      Allowed values       Description
    ================    =================    ==============================

    ascent [off]        True, False          Enable Ascent in situ vis
    backend [openmp]    openmp, cuda, hip    Programming model for compute
                                             kernels
    debug [off]         True, False          Enable debugging features
    dims [3]            2, 3, rz             Number of spatial dimensions
    mpi [on]            True, False          Enable MPI support
    openpmd [on]        True, False          Enable openPMD I/O
    psatd [off]         True, False          Enable PSATD solver
    tprof [on]          True, False          Enable tiny profiling features
```

### What's off?

The `[Default]` values for boolean switches `on`/`off` to not match the allowed values `True`/`False`. This discrepancy might confuse users.



Discussion:

Resolving patch:
diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py
--- a/lib/spack/spack/cmd/info.py
+++ b/lib/spack/spack/cmd/info.py
@@ -114,10 +114,8 @@ def lines(self):
                     '{0} [{1}]'.format(k, self.default(v)),
                     width=self.column_widths[0]
                 )
-                allowed = textwrap.wrap(
-                    v.allowed_values,
-                    width=self.column_widths[1]
-                )
+                allowed = v.allowed_values.replace('True, False', 'on, off')
+                allowed = textwrap.wrap(allowed, width=self.column_widths[1])
                 description = textwrap.wrap(
                     v.description,
                     width=self.column_widths[2]


Test patch:
Repository: spack/spack

Issue:
spack env create: show activation
### Rationale

I think we can improve usability slightly by printing the activation command of an environment after `spack env create` to the terminal. I find myself often creating and then forgettting to immediately activate an environment.

### Description

See Spack's workflow:
```console
$ spack env create test123
==> Updating view at /home/axel/src/spack/var/spack/environments/test123/.spack-env/view
==> Created environment 'test123' in /home/axel/src/spack/var/spack/environments/test123
```

versus Conda's workflow:
```console
$ conda create -y -n test123
# ... verbose bla bla ...

# To activate this environment, use
#     $ conda activate test123
# To deactivate an active environment, use
#     $ conda deactivate
```


### Additional information

Additionally, we could add a `--activate|-a` flag to `env create` to do it in one go.


Discussion:

Resolving patch:
diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py
--- a/lib/spack/spack/cmd/env.py
+++ b/lib/spack/spack/cmd/env.py
@@ -208,10 +208,14 @@ def _env_create(name_or_path, init_file=None, dir=False, with_view=None):
         env = ev.Environment(name_or_path, init_file, with_view)
         env.write()
         tty.msg("Created environment in %s" % env.path)
+        tty.msg("You can activate this environment with:")
+        tty.msg("  spack env activate %s" % env.path)
     else:
         env = ev.create(name_or_path, init_file, with_view)
         env.write()
         tty.msg("Created environment '%s' in %s" % (name_or_path, env.path))
+        tty.msg("You can activate this environment with:")
+        tty.msg("  spack env activate %s" % (name_or_path))
     return env
 
 


Test patch:
Repository: spack/spack

Issue:
Packages/tulip
Add a package for Tulip.


Discussion:
Ping @kisaacs 
ping @kisaacs 

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/tulip/package.py b/var/spack/repos/builtin/packages/tulip/package.py
new file mode 100644
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tulip/package.py
@@ -0,0 +1,42 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class Tulip(CMakePackage):
+    """ Tulip is an information visualization framework dedicated to the
+    analysis and visualization of relational data.
+
+    Tulip aims to provide the developer with a complete library, supporting
+    the design of interactive information visualization applications for
+    relational data that can be tailored to the problems he or she is
+    addressing.
+    """
+
+    homepage = "https://tulip.labri.fr"
+    url = "https://sourceforge.net/projects/auber/files/tulip/tulip-5.4.0/tulip-5.4.0_src.tar.gz"
+
+    version('5.4.0', sha256='2175e4e1a79028ab7a2479e882242f304fd3e01fedf80e1f29f8f5e9a6eb1325')
+
+    extends('python')
+    depends_on('py-pyqt5', type=('build', 'run'))
+
+    depends_on('yajl')
+    depends_on('qt')
+    depends_on('qhull')
+    depends_on('freetype')
+    depends_on('zlib')
+    depends_on('glew')
+    depends_on('jpeg')
+    depends_on('libpng')
+    depends_on('libxml2')
+
+    def cmake_args(self):
+        # The use of GL/glu.h seems to be deprecated, see:
+        # https://github.com/nigels-com/glew/issues/192
+        return [
+            '-DCMAKE_CXX_FLAGS="-DGLEW_NO_GLU"',
+            '-DCMAKE_C_FLAGS="-DGLEW_NO_GLU"',
+            '-DTULIP_BUILD_DOC:BOOL=OFF'
+        ]


Test patch:
Repository: spack/spack

Issue:
Graphviz PDF Support
The spack graphviz package does not have support for PDF. If there is a variant that enables this support, it is unclear to me which one it is. The *quartz* variant is only for macos.

### Steps to reproduce the issue

```console
$ spack install graphviz
$ dot -T?
```
No pdf in list. My linux distribution version does have pdf support, so this doesn't seem like a licensing issue.


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py
--- a/var/spack/repos/builtin/packages/graphviz/package.py
+++ b/var/spack/repos/builtin/packages/graphviz/package.py
@@ -55,6 +55,8 @@ class Graphviz(AutotoolsPackage):
             description='Build with libgd support (more output formats)')
     variant('pangocairo', default=False,
             description='Build with pango+cairo support (more output formats)')
+    variant('poppler', default=False,
+            description='Build with poppler support (pdf formats)')
     variant('qt', default=False,
             description='Build with Qt support')
     variant('quartz', default=(MACOS_VERSION is not None),
@@ -99,6 +101,7 @@ class Graphviz(AutotoolsPackage):
     depends_on('glib', when='+pangocairo')
     depends_on('libpng', when='+pangocairo')
     depends_on('pango', when='+pangocairo')
+    depends_on('poppler+glib', when='+poppler')
     depends_on('zlib')
     depends_on('qt', when='+qt')
     depends_on('libx11', when="+x")
@@ -147,7 +150,7 @@ def configure_args(self):
         args.append('--{0}-swig'.format('enable' if use_swig else 'disable'))
 
         for var in ["expat", "gts", "ghostscript", "libgd", "pangocairo",
-                    "qt", "quartz", "x"]:
+                    "poppler", "qt", "quartz", "x"]:
             args += self.with_or_without(var)
 
         args.append('--{0}-gtk'.format(
diff --git a/var/spack/repos/builtin/packages/poppler/package.py b/var/spack/repos/builtin/packages/poppler/package.py
--- a/var/spack/repos/builtin/packages/poppler/package.py
+++ b/var/spack/repos/builtin/packages/poppler/package.py
@@ -15,6 +15,7 @@ class Poppler(CMakePackage):
     git      = "https://gitlab.freedesktop.org/poppler/poppler.git"
 
     version('master', branch='master')
+    version('0.87.0', sha256='6f602b9c24c2d05780be93e7306201012e41459f289b8279a27a79431ad4150e')
     version('0.79.0', sha256='f985a4608fe592d2546d9d37d4182e502ff6b4c42f8db4be0a021a1c369528c8')
     version('0.77.0', sha256='7267eb4cbccd64a58244b8211603c1c1b6bf32c7f6a4ced2642865346102f36b')
     version('0.72.0', sha256='c1747eb8f26e9e753c4001ed951db2896edc1021b6d0f547a0bd2a27c30ada51')
@@ -48,7 +49,7 @@ class Poppler(CMakePackage):
     depends_on('openjpeg', when='+openjpeg')
     depends_on('qt@4.0:', when='+qt')
     depends_on('zlib', when='+zlib')
-    depends_on('cairo@1.10.0:', when='+glib')
+    depends_on('cairo+ft@1.10.0:', when='+glib')
     depends_on('iconv', when='+iconv')
     depends_on('jpeg', when='+jpeg')
     depends_on('libpng', when='+png')


Test patch:
Repository: spack/spack

Issue:
Installation issue: kokkos-kernels
Trying to build `kokkos-kernels` is failing using gcc@7.3.0 on x86_64 for:
* Ubuntu 18.04
* RHEL 7, RHEL 8

Using spack@develop, commit id `3a3f87171858` from 30 April 2020, the build fails with the following error message:
```
$> spack install kokkos-kernels%gcc@7.3.0

==> Error: Failed to install kokkos-kernels due to ChildError: ValueError: too many values to unpack (expected 2)
/opt/spack/var/spack/repos/builtin/packages/kokkos-kernels/package.py:125, in cmake_args:
        122                    options.append("-D%s=OFF" % cmake_option)
        123
        124        for eti in self.space_etis:
  >>    125            deflt, descr = self.space_etis[eti]
        126            if deflt == "auto":
        127                value = spec.variants[eti].value
        128                # spack does these as strings, not reg booleans

See build log for details:
  /tmp/root/spack-stage/spack-stage-kokkos-kernels-3.1-kspudgkm52bb64kvyywhqog2it5ivsz2/spack-build-out.txt
Traceback (most recent call last):
  File "/opt/spack/lib/spack/spack/build_environment.py", line 802, in child_process
    return_value = function()
  File "/opt/spack/lib/spack/spack/installer.py", line 1123, in build_process
    phase(pkg.spec, pkg.prefix)
  File "/opt/spack/lib/spack/spack/package.py", line 108, in phase_wrapper
    phase(spec, prefix)
  File "/opt/spack/lib/spack/spack/build_systems/cmake.py", line 336, in cmake
    options += self.cmake_args()
  File "/opt/spack/var/spack/repos/builtin/packages/kokkos-kernels/package.py", line 126, in cmake_args
    if deflt == "auto":
ValueError: too many values to unpack (expected 2)
```

[spack-build-out.txt](https://github.com/spack/spack/files/4559340/spack-build-out.txt)

@junghans @jjwilke 



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/kokkos-kernels/package.py b/var/spack/repos/builtin/packages/kokkos-kernels/package.py
--- a/var/spack/repos/builtin/packages/kokkos-kernels/package.py
+++ b/var/spack/repos/builtin/packages/kokkos-kernels/package.py
@@ -122,7 +122,7 @@ def cmake_args(self):
                     options.append("-D%s=OFF" % cmake_option)
 
         for eti in self.space_etis:
-            deflt, descr = self.space_etis[eti]
+            deflt, descr, _ = self.space_etis[eti]
             if deflt == "auto":
                 value = spec.variants[eti].value
                 # spack does these as strings, not reg booleans


Test patch:
Repository: spack/spack

Issue:
Installation issue: unifyfs
After #16458 (which marked `argobots` 1.0 as preferred) was merged, we can no longer concretize the `unifyfs` package.  The `unifyfs` package depends indirectly on `argobots` through it's `margo` dependency.

To reproduce the issue, on either linux or osx, just attempt to concretize the `unifyfs` package using `spack spec unifyfs`:

```
$ spack spec unifyfs
Input spec
--------------------------------
unifyfs

Concretized
--------------------------------
==> Error: Invalid Version range: 1.0rc1:1.0
``` 

Tagging maintainers from `spack blame argobots`:

@shintaro-iwasaki @roblatham00 @tgamblin @dorier @raffenet 


Discussion:
fyi @eugeneswalker 
The margo package should be updated to depend on argobots@1.0 instead of rc1.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/margo/package.py b/var/spack/repos/builtin/packages/margo/package.py
--- a/var/spack/repos/builtin/packages/margo/package.py
+++ b/var/spack/repos/builtin/packages/margo/package.py
@@ -28,7 +28,7 @@ class Margo(AutotoolsPackage):
     depends_on('pkgconfig', type='build')
 
     depends_on('mercury')
-    depends_on('argobots@1.0rc1:')
+    depends_on('argobots@1.0:')
 
     build_directory = 'spack-build'
 


Test patch:
Repository: spack/spack

Issue:
Adding external support for m4.
I couldn't detect whether m4 had been compiled with libsigsegv,
but I estimate that 99% of users don't care about this.

Following a wishlist here:
https://github.com/spack/spack/wiki/Most-wanted-packages-for-external-detection


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py
--- a/var/spack/repos/builtin/packages/m4/package.py
+++ b/var/spack/repos/builtin/packages/m4/package.py
@@ -3,7 +3,7 @@
 #
 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
 
-from spack import *
+import re
 
 
 class M4(AutotoolsPackage, GNUMirrorPackage):
@@ -32,6 +32,18 @@ class M4(AutotoolsPackage, GNUMirrorPackage):
 
     build_directory = 'spack-build'
 
+    executables = ['^g?m4$']
+
+    @classmethod
+    def determine_version(cls, exe):
+        # Output on macOS:
+        #   GNU M4 1.4.6
+        # Output on Linux:
+        #   m4 (GNU M4) 1.4.18
+        output = Executable(exe)('--version', output=str, error=str)
+        match = re.search(r'GNU M4\)?\s+(\S+)', output)
+        return match.group(1) if match else None
+
     def configure_args(self):
         spec = self.spec
         args = ['--enable-c++']


Test patch:
Repository: spack/spack

Issue:
some mistake in package cdo-1.9.8 download address
package cdo-1.9.8 download address should be ：
https://code.mpimet.mpg.de/attachments/download/20826/cdo-1.9.8.tar.gz
not
https://code.mpimet.mpg.de/attachments/download/20286/cdo-1.9.8.tar.gz



Discussion:
@hgrhgy Can you submit a PR for this issue?
@skosukhin is the maintainer

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py
--- a/var/spack/repos/builtin/packages/cdo/package.py
+++ b/var/spack/repos/builtin/packages/cdo/package.py
@@ -17,7 +17,7 @@ class Cdo(AutotoolsPackage):
 
     maintainers = ['skosukhin']
 
-    version('1.9.8', sha256='f2660ac6f8bf3fa071cf2a3a196b3ec75ad007deb3a782455e80f28680c5252a', url='https://code.mpimet.mpg.de/attachments/download/20286/cdo-1.9.8.tar.gz')
+    version('1.9.8', sha256='f2660ac6f8bf3fa071cf2a3a196b3ec75ad007deb3a782455e80f28680c5252a', url='https://code.mpimet.mpg.de/attachments/download/20826/cdo-1.9.8.tar.gz')
     version('1.9.7.1', sha256='3771952e065bcf935d43e492707370ed2a0ecb59a06bea24f9ab69d77943962c',
             url='https://code.mpimet.mpg.de/attachments/download/20124/cdo-1.9.7.1.tar.gz')
     version('1.9.6', sha256='b31474c94548d21393758caa33f35cf7f423d5dfc84562ad80a2bdcb725b5585', url='https://code.mpimet.mpg.de/attachments/download/19299/cdo-1.9.6.tar.gz')


Test patch: