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

Issue:
berkeley-db: add new version
Successfully builds on macOS 10.15.6 with Apple Clang 11.0.3.

The previous release had build issues on macOS, but this release doesn't seem to have any problems. There is also a newer berkeley-db 18.1.40 release out, but it has major build issues.

@aweits @AndrewGaspar @LDAmorim 


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/berkeley-db/package.py b/var/spack/repos/builtin/packages/berkeley-db/package.py
--- a/var/spack/repos/builtin/packages/berkeley-db/package.py
+++ b/var/spack/repos/builtin/packages/berkeley-db/package.py
@@ -9,26 +9,34 @@
 class BerkeleyDb(AutotoolsPackage):
     """Oracle Berkeley DB"""
 
-    homepage = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-    url      = "http://download.oracle.com/berkeley-db/db-5.3.28.tar.gz"
+    homepage = "https://www.oracle.com/database/technologies/related/berkeleydb.html"
+    url      = "http://download.oracle.com/berkeley-db/db-18.1.40.tar.gz"
 
+    version("18.1.40", sha256="0cecb2ef0c67b166de93732769abdeba0555086d51de1090df325e18ee8da9c8")
+    version('18.1.32', sha256='fa1fe7de9ba91ad472c25d026f931802597c29f28ae951960685cde487c8d654')
     version('6.2.32', sha256='a9c5e2b004a5777aa03510cfe5cd766a4a3b777713406b02809c17c8e0e7a8fb')
     version('6.1.29', sha256='b3c18180e4160d97dd197ba1d37c19f6ea2ec91d31bbfaf8972d99ba097af17d')
     version('6.0.35', sha256='24421affa8ae436fe427ae4f5f2d1634da83d3d55a5ad6354a98eeedb825de55')
     version('5.3.28', sha256='e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628')
 
     configure_directory = 'dist'
-    build_directory = 'spack-build'
+    build_directory = 'build_unix'
 
-# TODO: Gentoo's website removed the BerkeleyDB archives.
-#       Please update the function bellow with a valid mirror.
-#       Right now this package will fetch from the Oracle website,
-#       and versions 5.3.28 and 6.0.35 will fail to download.
-#
-#    def url_for_version(self, version):
-#        # newer version need oracle login, so get them from gentoo mirror
-#        url_fmt = 'http://distfiles.gentoo.org/distfiles/db-{0}.tar.gz'
-#        return url_fmt.format(version)
+    def patch(self):
+        # some of the docs are missing in 18.1.40
+        if self.spec.satisfies("@18.1.40"):
+            filter_file(r'bdb-sql', '', 'dist/Makefile.in')
+            filter_file(r'gsg_db_server', '', 'dist/Makefile.in')
 
     def configure_args(self):
-        return ['--disable-static', '--enable-cxx', '--enable-stl']
+        return [
+            '--disable-static',
+            '--enable-cxx',
+            '--enable-dbm',
+            '--enable-stl',
+            # compat with system berkeley-db on darwin
+            "--enable-compat185",
+            # SSL support requires OpenSSL, but OpenSSL depends on Perl, which
+            # depends on Berkey DB, creating a circular dependency
+            '--with-repmgr-ssl=no',
+        ]


Test patch:
Repository: spack/spack

Issue:
FFTW: "configure" script fails with Intel compilers on some systems.
As far as I can tell this issue occurs when the system GNU compilers are more recent than 6.5.0. For a more comprehensive description of the problem see https://github.com/FFTW/fftw3/issues/184.

It can be worked-around by replacing the `-no-gcc` option set in the `configure` for Intel compilers by `-gcc-sys`:
```
-no-gcc     Undefines GNU macros.
-gcc-sys    Defines GNU macros only during compilation of system headers.
```

This can be done easily in Spack (https://github.com/RemiLacroix-IDRIS/spack/commit/d2edb5f3571674c8724360018ca4f1d488a4806a):
https://github.com/spack/spack/blob/d2edb5f3571674c8724360018ca4f1d488a4806a/var/spack/repos/builtin/packages/fftw/package.py#L105

However I not completely sure of the side-effects it might have so I am hoping to get a more definitive answer on the FFTW issue.


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -33,6 +33,7 @@ class Fftw(AutotoolsPackage):
     patch('pfft-3.3.5.patch', when="@3.3.5:+pfft_patches", level=0)
     patch('pfft-3.3.4.patch', when="@3.3.4+pfft_patches", level=0)
     patch('pgi-3.3.6-pl2.patch', when="@3.3.6-pl2%pgi", level=0)
+    patch('intel-configure.patch', when="@3:3.3.8%intel", level=0)
 
     variant(
         'precision', values=any_combination_of(


Test patch:
Repository: spack/spack

Issue:
librsb update to 1.2.0.9
Hi.
librsb-1.2.0.9 is out, at  https://sourceforge.net/projects/librsb/files/
it would be good to update its package.py
librsb update to 1.2.0.9
Hi.
librsb-1.2.0.9 is out, at  https://sourceforge.net/projects/librsb/files/
it would be good to update its package.py


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/librsb/package.py b/var/spack/repos/builtin/packages/librsb/package.py
--- a/var/spack/repos/builtin/packages/librsb/package.py
+++ b/var/spack/repos/builtin/packages/librsb/package.py
@@ -11,9 +11,10 @@ class Librsb(AutotoolsPackage):
     library for the Recursive Sparse Blocks format"""
 
     homepage = "http://librsb.sourceforge.net/"
-    url      = "http://download.sourceforge.net/librsb/librsb-1.2.0.8.tar.gz"
+    url      = "http://download.sourceforge.net/librsb/librsb-1.2.0.9.tar.gz"
     list_url = "https://sourceforge.net/projects/librsb/files/"
 
+    version('1.2.0.9',   'f421f5d572461601120933e3c1cfee2ca69e6ecc92cbb11baa4e86bdedd3d9fa')
     version('1.2.0.8',   '8bebd19a1866d80ade13eabfdd0f07ae7e8a485c0b975b5d15f531ac204d80cb')
 
     depends_on('zlib')


Test patch:
Repository: spack/spack

Issue:
"spack env update" can't handle override
When running:
```console
$ spack env update <env-dir>
```
if the `spack.yaml` file contains override with a double colon, the command will fail reporting that "Additional properties are not allowed".

### Steps to reproduce the issue
Create a `spack.yaml` file with the following content in a directory:
```yaml
spack:
  mirrors::
    test: /foo/bar
  packages:
    cmake:
      paths:
        cmake@3.18.1: /usr
  specs:
  - hdf5
```
Try then to run:
```console
$ spack env update <directory>
```

### Error Message
The command above fails with an error similar to:
```
[ ... ]
        try:
            spack.schema.Validator(schema).validate(test_data)
        except jsonschema.ValidationError as e:
            if hasattr(e.instance, 'lc'):
                line_number = e.instance.lc.line + 1
            else:
                line_number = None
>           raise ConfigFormatError(e, data, filename, line_number)
E           spack.config.ConfigFormatError: /tmp/pytest-of-culpo/pytest-0/test_can_update_attributes_wit0/spack.yaml: Additional properties are not allowed ('mirrors:' was unexpected)
```

### Information on your system

* **Spack:** 0.15.4-591-17d96b615
* **Python:** 3.7.4
* **Platform:** linux-ubuntu18.04-broadwell


### 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
- [ ] I have run the failing commands in debug mode and reported the output



Discussion:

Resolving patch:
diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py
--- a/lib/spack/spack/environment.py
+++ b/lib/spack/spack/environment.py
@@ -1787,7 +1787,7 @@ def update_yaml(manifest, backup_file):
 
     shutil.copy(manifest, backup_file)
     with open(manifest, 'w') as f:
-        _write_yaml(data, f)
+        syaml.dump_config(data, f)
     return True
 
 


Test patch:
diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py
--- a/lib/spack/spack/test/cmd/env.py
+++ b/lib/spack/spack/test/cmd/env.py
@@ -2112,3 +2112,23 @@ def test_old_format_cant_be_updated_implicitly(packages_yaml_v015):
     env('activate', str(manifest.dirname))
     with pytest.raises(spack.main.SpackCommandError):
         add('hdf5')
+
+
+@pytest.mark.regression('18147')
+def test_can_update_attributes_with_override(tmpdir):
+    spack_yaml = """
+spack:
+  mirrors::
+    test: /foo/bar
+  packages:
+    cmake:
+      paths:
+        cmake@3.18.1: /usr
+  specs:
+  - hdf5
+"""
+    abspath = tmpdir.join('spack.yaml')
+    abspath.write(spack_yaml)
+
+    # Check that an update does not raise
+    env('update', '-y', str(abspath.dirname))
Repository: spack/spack

Issue:
Installation issue: sundials `all fetchers failed` error
I am getting the following error (running from LC/Quartz) when I try to install `SUNDIALS` using `develop` at commit `bc53bb9`.

```
==> Fetching https://computing.llnl.gov/projects/sundials/download/sundials-5.3.0.tar.gz

curl: (28) Connection timed out after 10001 milliseconds
==> Failed to fetch file from URL: https://computing.llnl.gov/projects/sundials/download/sundials-5.3.0.tar.gz
    Curl failed with error 28
==> Fetching from https://computing.llnl.gov/projects/sundials/download/sundials-5.3.0.tar.gz failed.
==> Error: FetchError: All fetchers failed for spack-stage-sundials-5.3.0-ezvti26nbt3evp4gximaoygtrqd4dw6r
```

Hovering over the `SUNDIALS` link at https://computing.llnl.gov/projects/sundials/sundials-software shows the URL is accurate.  Clicking on that link in a web browser brings an Open/Save dialog box.


Discussion:
@gardner48  ping
@gardner48 Recommend adding `list_url = 'https://github.com/LLNL/sundials/releases'` to the package.  This works for me.
I have this same problem on quartz and lassen but not my laptop so it seems like this might be an LC issue. Adding
```
list_url = 'https://github.com/LLNL/sundials/releases'
``` 
or 
```
urls = ["https://computing.llnl.gov/projects/sundials/download/sundials-2.7.0.tar.gz",
           "https://github.com/LLNL/sundials/releases/download/v2.7.0/sundials-2.7.0.tar.gz"]
```
works for me. I'll put a PR to address this issue.
@gardner48 did you ever get a chance to submit this PR?

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py
--- a/var/spack/repos/builtin/packages/sundials/package.py
+++ b/var/spack/repos/builtin/packages/sundials/package.py
@@ -13,7 +13,8 @@ class Sundials(CMakePackage):
     Solvers)"""
 
     homepage = "https://computing.llnl.gov/projects/sundials"
-    url = "https://computing.llnl.gov/projects/sundials/download/sundials-2.7.0.tar.gz"
+    urls = ["https://computing.llnl.gov/projects/sundials/download/sundials-2.7.0.tar.gz",
+            "https://github.com/LLNL/sundials/releases/download/v2.7.0/sundials-2.7.0.tar.gz"]
     git = "https://github.com/llnl/sundials.git"
     maintainers = ['cswoodward', 'gardner48', 'balos1']
 


Test patch:
Repository: spack/spack

Issue:
Revert "openmpi: Update hwloc version bounds"
Reverts spack/spack#18040

```
$ spack spec openmpi
Input spec
--------------------------------
openmpi

Concretized
--------------------------------
==> Error: An unsatisfiable version constraint has been detected for spec:

    hwloc@2.2.0%gcc@8.4.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-ubuntu18.04-skylake


while trying to concretize the partial spec:

    openmpi@3.1.6%gcc@8.4.0~atomics~cuda~cxx~cxx_exceptions+gpfs~java~legacylaunchers~lustre~memchecker~pmi~singularity~sqlite3+static~thread_multiple+vt+wrapper-rpath fabrics=none schedulers=none arch=linux-ubuntu18.04-skylake
        ^numactl@2.0.12%gcc@8.4.0 arch=linux-ubuntu18.04-skylake
            ^autoconf@2.69%gcc@8.4.0 arch=linux-ubuntu18.04-skylake
                ^m4@1.4.18%gcc@8.4.0+sigsegv arch=linux-ubuntu18.04-skylake
                    ^libsigsegv
                ^perl@5.30.3%gcc@8.4.0+cpanm+shared+threads arch=linux-ubuntu18.04-skylake
                    ^berkeley-db@18.1.40%gcc@8.4.0 arch=linux-ubuntu18.04-skylake
                    ^gdbm@1.18.1%gcc@8.4.0 arch=linux-ubuntu18.04-skylake
                        ^readline@8.0%gcc@8.4.0 arch=linux-ubuntu18.04-skylake
                            ^ncurses@6.2%gcc@8.4.0~symlinks+termlib arch=linux-ubuntu18.04-skylake
                                ^pkgconf@1.7.3%gcc@8.4.0 arch=linux-ubuntu18.04-skylake
            ^automake@1.16.2%gcc@8.4.0 arch=linux-ubuntu18.04-skylake
            ^libtool@2.4.6%gcc@8.4.0 arch=linux-ubuntu18.04-skylake


openmpi requires hwloc version :1.999, but spec asked for 2.2.0
```

ping @eschnett 

bisected to this commit:

```
$ git bisect good 
488d8ae747b9e9151c38a959243755ddc768bb84 is the first bad commit
commit 488d8ae747b9e9151c38a959243755ddc768bb84
Author: Erik Schnetter <schnetter@gmail.com>
Date:   Sat Aug 22 14:10:11 2020 -0400

    openmpi: Update hwloc version bounds (#18040)
    
    `openmpi @4:` can use `hwloc @2:`.

:040000 040000 930f51f2f25507e6225ef1b500a8e44a3a119c35 115fc1dcf87716e58b2b69f451e9b1bd83037fc3 M	var
```


Discussion:

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
@@ -257,7 +257,7 @@ class Openmpi(AutotoolsPackage):
 
     depends_on('pkgconfig', type='build')
 
-    depends_on('hwloc')
+    depends_on('hwloc', when='@4:')
     # ompi@:3.0.0 doesn't support newer hwloc releases:
     # "configure: error: OMPI does not currently support hwloc v2 API"
     depends_on('hwloc@:1.999', when='@:3.999.999')


Test patch:
Repository: spack/spack

Issue:
Installation issue: older versions of ocaml should have fcommon to compile with gcc10
### Steps to reproduce the issue
```console
$ spack install whizard@2.8.2

This will pull in older version of ocaml and heppdt which will break on gcc10 without -fcommon
...
```

### Information on your system

* **Spack:** 0.15.4
* **Python:** 3.8.5
* **Platform:** linux-mageia8-skylake
```
ocaml
     450    /lib/spack/env/gcc/gcc -O2 -fno-strict-aliasing -fwrapv -Wall -fno-
            tree-vrp -g -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE  
            -DOCAML_STDLIB_DIR='"/opt/spack/linux-mageia8-skylake/gcc-10.2.0/oc
            aml-4.08.1-f3m2tsdrxfzvn2gthrbthev4n2wnuth5/lib/ocaml"'  -Wl,-E -o 
            ocamlruni prims.o libcamlruni.a -lm -ldl  -lpthread
     451    /usr/bin/ld/usr/bin/ld: : libcamlrund.a(backtrace_bd.o):/tmp/user/s
            pack-stage/spack-stage-ocaml-4.08.1-f3m2tsdrxfzvn2gthrbthev4n2wnuth
            5/spack-src/runtime/backtrace.c:libcamlruni.a(backtrace_bi.o)31: mu
            ltiple definition of `caml_debug_info'; :/tmp/user/spack-stage/spac
            k-stage-ocaml-4.08.1-f3m2tsdrxfzvn2gthrbthev4n2wnuth5/spack-src/run
            time/backtrace.c:31: multiple definition of `caml_debug_info'; libc
            amlrund.a(backtrace_byt_bd.o):/tmp/user/spack-stage/spack-stage-oca
            ml-4.08.1-f3m2tsdrxfzvn2gthrbthev4n2wnuth5/spack-src/runtime/backtr
            ace_byt.c:47: first defined here
     452    libcamlruni.a(backtrace_byt_bi.o):/tmp/user/spack-stage/spack-stage
            -ocaml-4.08.1-f3m2tsdrxfzvn2gthrbthev4n2wnuth5/spack-src/runtime/ba
            cktrace_byt.c:47: first defined here
```

### Additional information 

@scemama

<!-- 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
- [ ] I have searched the issues of this repo and believe this is not a duplicate



Discussion:
Removed issue with heppdt since that doesn't seem to be a build issue.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/ocaml/package.py b/var/spack/repos/builtin/packages/ocaml/package.py
--- a/var/spack/repos/builtin/packages/ocaml/package.py
+++ b/var/spack/repos/builtin/packages/ocaml/package.py
@@ -25,6 +25,7 @@ class Ocaml(Package):
     version('4.06.0', sha256='c17578e243c4b889fe53a104d8927eb8749c7be2e6b622db8b3c7b386723bf50')
     version('4.03.0', sha256='7fdf280cc6c0a2de4fc9891d0bf4633ea417046ece619f011fd44540fcfc8da2')
 
+    patch('fix-duplicate-defs.patch', when="@4.08.0:4.09.0 %gcc@10.0:")
     depends_on('ncurses')
 
     sanity_check_file = ['bin/ocaml']


Test patch:
Repository: spack/spack

Issue:
Installation issue: dbus (missing libsm dependency)

<!-- 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! -->

I am trying to install visit, and I am hitting an error when it tries to install dbus.  This appears
to be due to dbus depending on libSM (and through that libuuid), but not declaring that dependency in Spack. So in my build of visit, the libuuid dependency is picked up and set to use the spack installed libuuid via some other package visit depends on, but dbus ends up using the system installed libSM, and there is a mismatch between the two.  But the dbus
package should not be linking against system libSM.

### Steps to reproduce the issue
I am trying to install visit, and I am hitting an error when it tries to install dbus.  This appears
to be 
spack install dbus@1.12.8%gcc@8.4.0 ^libuuid@1.0.3
eventually aborts with
  CCLD     dbus-run-session
/lib/../lib64/libSM.so: undefined reference to `uuid_unparse_lower@UUID_1.0'
/lib/../lib64/libSM.so: undefined reference to `uuid_generate@UUID_1.0'
collect2: error: ld returned 1 exit status

Error appears due to the attempt to link the system /lib64/libSM.so

### Information on your system
spack debug report
* **Spack:** 0.14.2
* **Python:** 2.7.16
* **Platform:** linux-rhel7-broadwell

### Additional information
[spack-build-env.txt](https://github.com/spack/spack/files/5125717/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/5125718/spack-build-out.txt)

No maintainers for dbus

### 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:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py
--- a/var/spack/repos/builtin/packages/dbus/package.py
+++ b/var/spack/repos/builtin/packages/dbus/package.py
@@ -30,6 +30,7 @@ class Dbus(Package):
     depends_on('pkgconfig', type='build')
     depends_on('expat')
     depends_on('glib')
+    depends_on('libsm')
 
     def install(self, spec, prefix):
         configure(


Test patch:
Repository: spack/spack

Issue:
Installation issue: py-lxml doesn't use the spack libxslt and libexslt libraries
It looks like py-lxml should have AUTO_RPATH set to true. Otherwise it picks up the OS versions of libxslt instead of the spack built versions. I added this to the package.py and the library dependencies were correct:

```
    def setup_build_environment(self, env):
        env.set('AUTO_RPATH', 'true')
```


Discussion:
Want to submit a PR?

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/py-lxml/package.py b/var/spack/repos/builtin/packages/py-lxml/package.py
--- a/var/spack/repos/builtin/packages/py-lxml/package.py
+++ b/var/spack/repos/builtin/packages/py-lxml/package.py
@@ -13,6 +13,7 @@ class PyLxml(PythonPackage):
     homepage = "http://lxml.de/"
     url      = "https://pypi.io/packages/source/l/lxml/lxml-4.4.1.tar.gz"
 
+    version('4.5.2', sha256='cdc13a1682b2a6241080745b1953719e7fe0850b40a5c71ca574f090a1391df6')
     version('4.4.1', sha256='c81cb40bff373ab7a7446d6bbca0190bccc5be3448b47b51d729e37799bb5692')
     version('4.3.3', sha256='4a03dd682f8e35a10234904e0b9508d705ff98cf962c5851ed052e9340df3d90')
     version('4.2.5', sha256='36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f')
@@ -25,8 +26,8 @@ class PyLxml(PythonPackage):
 
     depends_on('python@2.7:2.8,3.5:', type=('build', 'run'))
     depends_on('py-setuptools', type='build')
-    depends_on('libxml2', type=('build', 'run'))
-    depends_on('libxslt', type=('build', 'run'))
+    depends_on('libxml2', type=('build', 'link', 'run'))
+    depends_on('libxslt', type=('build', 'link', 'run'))
     depends_on('py-html5lib', when='+html5', type=('build', 'run'))
     depends_on('py-beautifulsoup4', when='+htmlsoup', type=('build', 'run'))
     depends_on('py-cssselect@0.7:', when='+cssselect', type=('build', 'run'))


Test patch: