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

Issue:
Add new package: quicksilver



Discussion:
Pinging @richards12 in case he's interested in giving a few more hints on how the package for "Quicksilver" should look like.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/quicksilver/package.py b/var/spack/repos/builtin/packages/quicksilver/package.py
new file mode 100644
--- /dev/null
+++ b/var/spack/repos/builtin/packages/quicksilver/package.py
@@ -0,0 +1,63 @@
+# 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)
+
+from spack import *
+
+
+class Quicksilver(MakefilePackage):
+    """Quicksilver is a proxy application that represents some elements of the
+       Mercury workload.
+    """
+
+    tags = ['proxy-app']
+
+    homepage = "https://codesign.llnl.gov/quicksilver.php"
+    url      = "https://github.com/LLNL/Quicksilver"
+    git      = "https://github.com/LLNL/Quicksilver.git"
+
+    maintainers = ['richards12']
+
+    version('master', branch='master')
+
+    variant('openmp', default=True, description='Build with OpenMP support')
+    variant('mpi', default=True, description='Build with MPI support')
+
+    depends_on('mpi', when="+mpi")
+
+    build_directory = 'src'
+
+    @property
+    def build_targets(self):
+        targets = []
+        spec = self.spec
+
+        targets.append('CXXFLAGS={0}'.format(self.compiler.cxx11_flag))
+
+        if '+mpi' in spec:
+            targets.append('CXX={0}'.format(spec['mpi'].mpicxx))
+        else:
+            targets.append('CXX={0}'.format(spack_cxx))
+
+        if '+openmp+mpi' in spec:
+            targets.append('CPPFLAGS=-DHAVE_MPI -DHAVE_OPENMP {0}'.format(
+                self.compiler.openmp_flag))
+        elif '+openmp' in spec:
+            targets.append('CPPFLAGS=-DHAVE_OPENMP {0}'.format(
+                self.compiler.openmp_flag))
+        elif '+mpi' in spec:
+            targets.append('CPPFLAGS=-DHAVE_MPI')
+
+        if '+openmp' in self.spec:
+            targets.append('LDFLAGS={0}'.format(self.compiler.openmp_flag))
+
+        return targets
+
+    def install(self, spec, prefix):
+        mkdir(prefix.bin)
+        mkdir(prefix.doc)
+        install("src/qs", prefix.bin)
+        install('LICENSE.md', prefix.doc)
+        install('README.md', prefix.doc)
+        install_tree('Examples', prefix.Examples)


Test patch:
Repository: spack/spack

Issue:
Cannot use spack containerize with spack 0.14.2 version
<!-- Explain, in a clear and concise way, the command you ran and the result you were trying to achieve.
Example: "I ran `spack find` to list all the installed packages and ..." -->

### Steps to reproduce the issue

Using a spack.yaml with the following container fields:

```
  container:
    format: docker
    base:
      image: 'ubuntu:18.04'
      spack: '0.14.2'
```

Run

```console
$ spack containerize
```

### Error Message

```console
$ spack containerize
Traceback (most recent call last):
  File "/spack/lib/spack/spack/environment.py", line 407, in validate
    spack.schema.Validator(spack.schema.env.schema).validate(validate_data)
  File "/spack/lib/spack/external/jsonschema/validators.py", line 114, in validate
    raise error
jsonschema.exceptions.ValidationError: '0.14.2' is not one of ['develop', '0.14', '0.14.0']

Failed validating 'enum' in schema['patternProperties']['^env|spack$']['properties']['container']['properties']['base']['properties']['spack']:
    {'enum': ['develop', '0.14', '0.14.0'], 'type': 'string'}

On instance['spack']['container']['base']['spack']:
    '0.14.2'
```

### Information on your system

<!-- Please include the output of `spack debug report` -->

This did not work for me on 0.14.2.

```
spack debug report
usage: spack debug [-h] SUBCOMMAND ...
spack debug: error: argument SUBCOMMAND: invalid choice: 'report' choose from:
    create-db-tarball
```

### Additional information

- [x] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [x] I have searched the issues of this repo and believe this is not a duplicate
- [x] I have run the failing commands in debug mode and reported the output


Discussion:

Resolving patch:
diff --git a/lib/spack/spack/schema/container.py b/lib/spack/spack/schema/container.py
--- a/lib/spack/spack/schema/container.py
+++ b/lib/spack/spack/schema/container.py
@@ -29,7 +29,10 @@
                 },
                 'spack': {
                     'type': 'string',
-                    'enum': ['develop', '0.14', '0.14.0']
+                    'enum': [
+                        'develop',
+                        '0.14', '0.14.0', '0.14.1', '0.14.2', '0.14.3'
+                    ]
                 }
             },
             'required': ['image', 'spack']


Test patch:
Repository: spack/spack

Issue:
Installation issue: gnuplot (No spec with name wx)
<!-- 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
spack install gnuplot@5.2.8%gcc@8.4.0 +X +cairo +gd +libcerf +pbm +qt +wx 

returns error
Error: KeyError: 'No spec with name wx in gnuplot@5.2.8%gcc@8.4.0+X+cairo+gd+libcerf+pbm+qt+wx patches=ad89f23815fd925889ae78009ba22e6f9e4b12fea389280040cef519deafb052 arch=linux-rhel8-x86_64 ^at-spi2-atk@2 ... (listing all dependencies, etc)

### Information on your system
* **Spack:** 0.14.2
* **Python:** 3.8.2
* **Platform:** linux-rhel8-x86_64


### 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-out.txt]()
* [spack-build-env.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:
[spack-build-env.txt](https://github.com/spack/spack/files/4723935/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/4723938/spack-build-out.txt)
No spack-configure-args.txt created

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py
--- a/var/spack/repos/builtin/packages/gnuplot/package.py
+++ b/var/spack/repos/builtin/packages/gnuplot/package.py
@@ -122,7 +122,7 @@ def configure_args(self):
             options.append('--with-qt=no')
 
         if '+wx' in spec:
-            options.append('--with-wx=%s' % spec['wx'].prefix)
+            options.append('--with-wx=%s' % spec['wxwidgets'].prefix)
         else:
             options.append('--disable-wxwidgets')
 


Test patch:
Repository: spack/spack

Issue:
Installation issue: readline doesn't link to ncurses
### Steps to reproduce the issue

```console
$ spack install readline
```

### Information on your system

* **Spack:** 0.14.2-1394-3609f36e6
* **Python:** 3.8.2
* **Platform:** linux-ubuntu20.04-skylake (via WSL)

### Additional information

The installation succeeds just fine, and there are no errors in any logs, but the resulting readline libraries don't link to ncurses:
```console
$ ldd -r lib/libreadline.so
        linux-vdso.so.1 (0x00007fffc89c4000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fccb0930000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fccb0b85000)
undefined symbol: UP    (lib/libreadline.so)
undefined symbol: PC    (lib/libreadline.so)
undefined symbol: BC    (lib/libreadline.so)
undefined symbol: tputs (lib/libreadline.so)
undefined symbol: tgoto (lib/libreadline.so)
undefined symbol: tgetflag      (lib/libreadline.so)
undefined symbol: tgetent       (lib/libreadline.so)
undefined symbol: tgetnum       (lib/libreadline.so)
undefined symbol: tgetstr       (lib/libreadline.so)
```
From what I can tell, these symbols are supposed to be provided by ncurses. I tried modifying the package to explicitly RPATH things:
```diff
diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py
index 7a15595fa..4731ea96c 100644
--- a/var/spack/repos/builtin/packages/readline/package.py
+++ b/var/spack/repos/builtin/packages/readline/package.py
@@ -29,7 +29,10 @@ class Readline(AutotoolsPackage, GNUMirrorPackage):

     def build(self, spec, prefix):
         options = [
-            'SHLIB_LIBS=-L{0} -lncursesw'.format(spec['ncurses'].prefix.lib)
+            'SHLIB_LIBS=-L{0} {1}{0} -lncursesw'.format(
+                spec['ncurses'].prefix.lib,
+                self.compiler.cc_rpath_arg,
+            )
         ]

         make(*options)
```
but that didn't help. Because of this, my Python installation doesn't work properly with arrow keys.


Discussion:
Hmm, if I set my `LD_LIBRARY_PATH` to contain the ncurses installation, those missing symbols are still present. So maybe the issue isn't linking to ncurses.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py
--- a/var/spack/repos/builtin/packages/readline/package.py
+++ b/var/spack/repos/builtin/packages/readline/package.py
@@ -29,7 +29,8 @@ class Readline(AutotoolsPackage, GNUMirrorPackage):
 
     def build(self, spec, prefix):
         options = [
-            'SHLIB_LIBS=-L{0} -lncursesw'.format(spec['ncurses'].prefix.lib)
+            'SHLIB_LIBS=-L{0} -lncursesw -ltinfo'.format(
+                spec['ncurses'].prefix.lib)
         ]
 
         make(*options)


Test patch:
Repository: spack/spack

Issue:
Incorrect sha256sum for libjpeg-turbo@2.0.4
There is a mismatch between the shasum in the recipe and the shasum of the tarball hosted on github. (Note that the shasum matches that of the tarball at the sourceforge mirror)  Bug seems to have been introduced in #17132

### Steps to reproduce the issue

```console
$ git clone https://github.com/spack/spack.git
$ source spack/share/spack/setup-env.sh
$ spack install libjpeg-turbo@2.0.4
```
### Information on your system
Spack debug report:
```console
* **Spack:** 0.14.2-1480-1de20f0
* **Python:** 2.7.5
* **Platform:** linux-centos7-skylake
```

### Additional information
No build logs created.

<!-- 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 (N/A)
- [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/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
--- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
+++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
@@ -8,14 +8,16 @@
 
 class LibjpegTurbo(Package):
     """libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to
-       accelerate baseline JPEG compression and decompression. libjpeg is a
-       library that implements JPEG image encoding, decoding and
-       transcoding."""
+    accelerate baseline JPEG compression and decompression.
+
+    libjpeg is a library that implements JPEG image encoding, decoding and
+    transcoding.
+    """
     # https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/BUILDING.md
     homepage = "https://libjpeg-turbo.org/"
-    url      = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.3.tar.gz"
+    url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.3.tar.gz"
 
-    version('2.0.4', sha256='33dd8547efd5543639e890efbf2ef52d5a21df81faf41bb940657af916a23406')
+    version('2.0.4', sha256='7777c3c19762940cff42b3ba4d7cd5c52d1671b39a79532050c85efb99079064')
     version('2.0.3', sha256='a69598bf079463b34d45ca7268462a18b6507fdaa62bb1dfd212f02041499b5d')
     version('2.0.2', sha256='b45255bd476c19c7c6b198c07c0487e8b8536373b82f2b38346b32b4fa7bb942')
     version('1.5.90', sha256='cb948ade92561d8626fd7866a4a7ba3b952f9759ea3dd642927bc687470f60b7')


Test patch:
Repository: spack/spack

Issue:
libffi: always builds for "native" target with 3.3 despite `target= x86_64`


### Steps to reproduce the issue

- Build generic (non-processor-specific) target
- Try running a downstream code on a less capable processor, see an illegal instruction signal
- Notice that the libffi configure says `checking for gcc architecture flag` because it defaults to optimizing for the local target

```console
$ spack install libffi@3.3 libffi target=x86_64
...
```

### Information on your system

```
$ spack debug report
* **Spack:** 0.14.2-1384-31791f269
* **Python:** 3.7.6
* **Platform:** linux-rhel6-haswell
```

### Additional information

[spack-build-out.txt](https://github.com/spack/spack/files/4809873/spack-build-out.txt)
[spack-build-env.txt](https://github.com/spack/spack/files/4809874/spack-build-env.txt)

### General information

- [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:
(For me, by the way, the code I saw crashing was Python 3.7.7 called through ctypes.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py
--- a/var/spack/repos/builtin/packages/libffi/package.py
+++ b/var/spack/repos/builtin/packages/libffi/package.py
@@ -23,3 +23,11 @@ class Libffi(AutotoolsPackage, SourcewarePackage):
     def headers(self):
         # The headers are probably in self.prefix.lib but we search everywhere
         return find_headers('ffi', self.prefix, recursive=True)
+
+    def configure_args(self):
+        args = []
+        if self.spec.version >= Version('3.3'):
+            # Spack adds its own target flags, so tell libffi not to
+            # second-guess us
+            args.append('--without-gcc-arch')
+        return args


Test patch:
Repository: spack/spack

Issue:
Installation issue: root+r builds with -Dr=OFF
@chissg @HadrienG2 @drbenmorgan `spack install root+r`  does not actually build root with `-Dr=ON`. Not sure if it is a dependency issue or concerns the logic in the recipe. I think this should be easily reproducible, but let me know if you need more details on the configuration


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py
--- a/var/spack/repos/builtin/packages/root/package.py
+++ b/var/spack/repos/builtin/packages/root/package.py
@@ -235,6 +235,7 @@ class Root(CMakePackage):
     depends_on('r',         when='+r', type=('build', 'run'))
     depends_on('r-rcpp',    when='+r', type=('build', 'run'))
     depends_on('r-rinside', when='+r', type=('build', 'run'))
+    depends_on('readline',  when='+r')
     depends_on('shadow',    when='+shadow')
     depends_on('sqlite',    when='+sqlite')
     depends_on('tbb',       when='+tbb')
@@ -381,7 +382,7 @@ def cmake_args(self):
                 ['pythia8'],
                 ['qt', 'qt4'],  # See conflicts
                 ['qtgsi', 'qt4'],  # See conflicts
-                ['r', 'R'],
+                ['r', 'r'],
                 ['rfio', False],
                 ['roofit'],
                 ['root7'],  # See conflicts


Test patch:
Repository: spack/spack

Issue:
Installation issue: kallisto (why mpich dependency)
spack info kallisto 
reports that kallisto depends on mpich.

This is surprising to me because it is not optional and specific to the mpich package (and not a dependency on the virtual MPI package).  But even more surprising, is I do not see any mention of kallisto supporting MPI.  I cannot find any mention of MPI in the source code, and the only MPI dependency appears to be indirect via hdf5 built with MPI support (see e.g. 
https://github.com/pachterlab/kallisto/issues/91)


<!-- 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 <spec>
...
```

### Information on your system

<!-- Please include the output of `spack debug report` -->

<!-- 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-out.txt]()
* [spack-build-env.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:
spack debug report
* **Spack:** 0.14.2
* **Python:** 3.6.8
* **Platform:** linux-rhel8-x86_64

Package lallisto has no maintainers listed.
I have not included build log, etc. as problem occurs before that stage.


Resolving patch:
diff --git a/var/spack/repos/builtin/packages/kallisto/package.py b/var/spack/repos/builtin/packages/kallisto/package.py
--- a/var/spack/repos/builtin/packages/kallisto/package.py
+++ b/var/spack/repos/builtin/packages/kallisto/package.py
@@ -18,7 +18,6 @@ class Kallisto(CMakePackage):
 
     depends_on('zlib')
     depends_on('hdf5')
-    depends_on('mpich')
 
     # htslib isn't built in time to be used....
     parallel = False


Test patch:
Repository: spack/spack

Issue:
openfoam install missing META-INFO
The META-INFO directory contains api and patch information and should (must?) be part of the install.

- providing a fix shortly.


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/openfoam-org/package.py b/var/spack/repos/builtin/packages/openfoam-org/package.py
--- a/var/spack/repos/builtin/packages/openfoam-org/package.py
+++ b/var/spack/repos/builtin/packages/openfoam-org/package.py
@@ -332,15 +332,17 @@ def install(self, spec, prefix):
 
         # Having wmake and ~source is actually somewhat pointless...
         # Install 'etc' before 'bin' (for symlinks)
-        dirs = ['etc', 'bin', 'wmake']
+        # META-INFO for 1812 and later (or backported)
+        dirs = ['META-INFO', 'etc', 'bin', 'wmake']
         if '+source' in spec:
             dirs.extend(['applications', 'src', 'tutorials'])
 
         for d in dirs:
-            install_tree(
-                d,
-                join_path(self.projectdir, d),
-                symlinks=True)
+            if os.path.isdir(d):
+                install_tree(
+                    d,
+                    join_path(self.projectdir, d),
+                    symlinks=True)
 
         dirs = ['platforms']
         if '+source' in spec:
diff --git a/var/spack/repos/builtin/packages/openfoam/package.py b/var/spack/repos/builtin/packages/openfoam/package.py
--- a/var/spack/repos/builtin/packages/openfoam/package.py
+++ b/var/spack/repos/builtin/packages/openfoam/package.py
@@ -773,15 +773,17 @@ def install(self, spec, prefix):
 
         # Having wmake and ~source is actually somewhat pointless...
         # Install 'etc' before 'bin' (for symlinks)
-        dirs = ['etc', 'bin', 'wmake']
+        # META-INFO for 1812 and later (or backported)
+        dirs = ['META-INFO', 'etc', 'bin', 'wmake']
         if '+source' in spec:
             dirs.extend(['applications', 'src', 'tutorials'])
 
         for d in dirs:
-            install_tree(
-                d,
-                join_path(self.projectdir, d),
-                symlinks=True)
+            if os.path.isdir(d):
+                install_tree(
+                    d,
+                    join_path(self.projectdir, d),
+                    symlinks=True)
 
         dirs = ['platforms']
         if '+source' in spec:


Test patch: