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

Issue:
Lammps install issue with adios2 variant not found error
Please see this 

spack spec lammps@20210310%gcc@10.2.0 +mpi +exceptions +granular +kspace +latte +manybody +mc +misc +molecule +mpiio +peri +poems +python +qeq +replica +rigid +shock +snap +spin +srd +voronoi +user-atc +user-h5md +user-lb +user-meamc +user-misc +user-netcdf +user-omp +user-reaxc ^netcdf-c@4.7.4/k5w4qtp ^adios2@2.7.1/mpffptq +mpi +parallel-netcdf ^parallel-netcdf@1.12.1/r5b7kru 
openblas@0.3.14/2zqwbx6

Concretized
--------------------------------
==> Error: variant "adios" not found in package "lammps" [required from package "lammps"]

It is missing variant in lammps package.py file? Can we get this fixed for new concretizer.

Thanks


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py
--- a/var/spack/repos/builtin/packages/lammps/package.py
+++ b/var/spack/repos/builtin/packages/lammps/package.py
@@ -2,7 +2,6 @@
 # Spack Project Developers. See the top-level COPYRIGHT file for details.
 #
 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
 from spack import *
 import datetime as dt
 
@@ -149,11 +148,11 @@ def url_for_version(self, version):
         msg='+user-reaction only supported for version 20200505 and later')
     conflicts('+mliap', when='~snap')
     conflicts(
-        '+adios +mpi', when='^adios2~mpi',
-        msg='With +adios, mpi setting for adios2 and lammps must be the same')
+        '+user-adios +mpi', when='^adios2~mpi',
+        msg='With +user-adios, mpi setting for adios2 and lammps must be the same')
     conflicts(
-        '+adios ~mpi', when='^adios2+mpi',
-        msg='With +adios, mpi setting for adios2 and lammps must be the same')
+        '+user-adios ~mpi', when='^adios2+mpi',
+        msg='With +user-adios, mpi setting for adios2 and lammps must be the same')
 
     patch("lib.patch", when="@20170901")
     patch("660.patch", when="@20170922")


Test patch:
Repository: spack/spack

Issue:
Installation issue: fontconfig 2.12.3
### Steps to reproduce the issue

```console
$ spack install fontconfig@2.12.3%gcc8.3.1 arch=linux-rhel7-broadwell
```

### Information on your system

* **Spack:** 0.16.1-2245-4cca69f4ed
* **Python:** 3.7.2
* **Platform:** linux-rhel7-broadwell
* **Concretizer:** clingo

### Additional information

This is a known issue with tarballs.  Refer to https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/10 for more information about the work-around.

### 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
- [ ] 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/fontconfig/package.py b/var/spack/repos/builtin/packages/fontconfig/package.py
--- a/var/spack/repos/builtin/packages/fontconfig/package.py
+++ b/var/spack/repos/builtin/packages/fontconfig/package.py
@@ -23,6 +23,12 @@ class Fontconfig(AutotoolsPackage):
     depends_on('font-util')
     depends_on('uuid', when='@2.13.1:')
 
+    # Resolve known issue with tarballs 2.12.3 - 2.13.0 plus
+    # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/10
+    @run_before('configure')
+    def _rm_offending_header(self):
+        force_remove(join_path('src', 'fcobjshash.h'))
+
     def configure_args(self):
         font_path = join_path(self.spec['font-util'].prefix, 'share', 'fonts')
 


Test patch:
Repository: spack/spack

Issue:
Installation issue: bzip2: python error in package.py
#23230 appeared to introduce a typo/python error in package.py

### Steps to reproduce the issue

```console
$ spack install bzip2
...
==> Installing bzip2-1.0.8-4efigg64jltb6topl5suvz4dmpvupmei
==> No binary for bzip2-1.0.8-4efigg64jltb6topl5suvz4dmpvupmei found: installing from source
==> Warning: included configuration files should be updated manually [files=/software/spack/dev-environments/gcc840/packages-gcc840.yaml, /software/spack/dev-environments/common/packages-common.yaml]
==> Using cached archive: /software/spack/git.2021.04.28/var/spack/cache/_source-cache/archive/ab/ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269.tar.gz
==> Error: NameError: name 'spec' is not defined

/software/spack/git.2021.04.28/var/spack/repos/builtin/packages/bzip2/package.py:57, in patch:
         56    def patch(self):
  >>     57        if spec.satisfies('+debug'):
         58            for makefile in ['Makefile', 'Makefile-libbz2_so']:
         59                filter_file(r'-O ', '-O0 ', makefile)
         60                filter_file(r'-O2 ', '-O0 ', makefile)
...
```

### Information on your system
```console
$ spack debug report
* **Spack:** 0.16.1-2429-f5e6c32495
* **Python:** 3.6.8
* **Platform:** linux-rhel8-x86_64
* **Concretizer:** original
```

### Additional information
Does not reach point of creating spack-build-out.txt, etc

No maintainers, I believe issue was added by @scheibelp  in #23230


### 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 
(Not applicable/none generated)
- [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/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py
--- a/var/spack/repos/builtin/packages/bzip2/package.py
+++ b/var/spack/repos/builtin/packages/bzip2/package.py
@@ -54,7 +54,7 @@ def flag_handler(self, name, flags):
         return(flags, None, None)
 
     def patch(self):
-        if spec.satisfies('+debug'):
+        if self.spec.satisfies('+debug'):
             for makefile in ['Makefile', 'Makefile-libbz2_so']:
                 filter_file(r'-O ', '-O0 ', makefile)
                 filter_file(r'-O2 ', '-O0 ', makefile)


Test patch:
Repository: spack/spack

Issue:
Installation issue: hdf-eos2 failing to build with ^hdf+szip
When trying to build hdf-eos2 using an hdf built with +szip, I get an error during configure
about lack of an --with-szlib flag.

It also looks like the checks for jpeg and zlib libraries will fail if hdf was not built with them
(e.g. using ``` if self.spec['jpeg']:``` instead of ``if 'jpeg' in self.spec:```)

### Steps to reproduce the issue

```console
$ spack install hdf-eos2 ^hdf+szip
...
configure: error: HDF4 was linked with SZIP, but --with-szlib was not given
...
```

### Information on your system

```console
$ spack debug report
* **Spack:** 0.16.1-2431-da8039bf29
* **Python:** 3.6.8
* **Platform:** linux-rhel8-x86_64
* **Concretizer:** original
```
### Additional information

* [spack-build-out.txt](https://github.com/spack/spack/files/6400592/spack-build-out.txt)
* [spack-build-env.txt](https://github.com/spack/spack/files/6400593/spack-build-env.txt)

No maintainers for hdf-eos2, but IIRC I (@payerle) am the one who uploaded the original version.

### 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:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/hdf-eos2/package.py b/var/spack/repos/builtin/packages/hdf-eos2/package.py
--- a/var/spack/repos/builtin/packages/hdf-eos2/package.py
+++ b/var/spack/repos/builtin/packages/hdf-eos2/package.py
@@ -86,10 +86,13 @@ def configure_args(self):
 
         # Provide config args for dependencies
         extra_args.append('--with-hdf4={0}'.format(self.spec['hdf'].prefix))
-        if self.spec['jpeg']:
+        if 'jpeg' in self.spec:
             extra_args.append('--with-jpeg={0}'.format(
                 self.spec['jpeg'].prefix))
-        if self.spec['zlib']:
+        if 'libszip' in self.spec:
+            extra_args.append('--with-szlib={0}'.format(
+                self.spec['libszip'].prefix))
+        if 'zlib' in self.spec:
             extra_args.append('--with-zlib={0}'.format(
                 self.spec['zlib'].prefix))
 


Test patch:
Repository: spack/spack

Issue:
Installation issue: py-hatchet v1.3.0 checksum mismatch
I've been having problems building v1.3.0 due to checksum mismatch and I confirm that the checksum in the package oddly no longer matches that calculated by spack.

### Steps to reproduce the issue

```console
$ spack checksum py-hatchet@1.3.0
==> Found 1 version of py-hatchet:
  
  1.3.0  https://github.com/hatchet/hatchet/archive/v1.3.0.tar.gz

==> Fetching https://github.com/hatchet/hatchet/archive/v1.3.0.tar.gz
######################################################################## 100.0%

    version('1.3.0', sha256='d77d071fc37863fdc9abc3fd9ea1088904cd98c6980a014a31e44595d2deac5e')
```

BUT the checksum in the package is:

```
    version('1.3.0', sha256='d38212aec6272558e25538ff23b54ec0f2b4dbf6ef4b0e77f7f05c37c0d17815')
```


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/py-hatchet/package.py b/var/spack/repos/builtin/packages/py-hatchet/package.py
--- a/var/spack/repos/builtin/packages/py-hatchet/package.py
+++ b/var/spack/repos/builtin/packages/py-hatchet/package.py
@@ -15,7 +15,7 @@ class PyHatchet(PythonPackage):
 
     maintainers = ["slabasan", "bhatele", "tgamblin"]
 
-    version('1.3.0', sha256='d38212aec6272558e25538ff23b54ec0f2b4dbf6ef4b0e77f7f05c37c0d17815')
+    version('1.3.0', sha256='d77d071fc37863fdc9abc3fd9ea1088904cd98c6980a014a31e44595d2deac5e')
     version('1.2.0', sha256='1d5f80abfa69d1a379dff7263908c5c915023f18f26d50b639556e2f43ac755e')
     version('1.1.0', sha256='71bfa2881ef295294e5b4493acb8cce98d14c354e9ae59b42fb56a76d8ec7056')
     version('1.0.1', sha256='e5a4b455ab6bfbccbce3260673d9af8d1e4b21e19a2b6d0b6c1e1d7727613b7a')


Test patch:
Repository: spack/spack

Issue:
Installation issue: mpip
### Steps to reproduce the issue


```console
$ spack install mpip
```
produces

```log
checking libunwind.h usability... no
checking libunwind.h presence... no
checking for libunwind.h... no

  mpiP on x86_64 platforms requires libunwind.
  Please install libunwind and, if necessary, configure mpiP with
  appropriate CFLAGS and LDFLAGS settings.
```

The issue can be resolved by adding:
```spack
depends_on('libunwind', when='target=x86_64:')
```

### Information on your system

* **Spack:** 0.16.1-2331-a97ef832d9
* **Python:** 3.6.8
* **Platform:** linux-centos8-sandybridge
* **Concretizer:** clingo

Both packages.yml and modules.yml are unmodified.

### 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](https://gist.github.com/maxim-belkin/eb626707ee47f4097a2dad7af771e5cd#file-spack-build-out-txt)
* [spack-build-env.txt](https://gist.github.com/maxim-belkin/eb626707ee47f4097a2dad7af771e5cd#file-spack-build-env-txt)

CC @cchambreau

### 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/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py
--- a/var/spack/repos/builtin/packages/mpip/package.py
+++ b/var/spack/repos/builtin/packages/mpip/package.py
@@ -59,9 +59,8 @@ class Mpip(AutotoolsPackage):
     depends_on('python@:2', when='@3.4.1', type='build')
     depends_on('mpi')
 
-    #  Ideally would use libunwind, but provide backtrace and
-    #    setjmp functionality, if needed
-    #  depends_on('unwind')
+    #  '+setjmp' adds '--disable-libunwind' to the confiure args
+    depends_on('unwind', when='@3.5: +libunwind ~setjmp')
 
     @when('@3.5:')
     def configure_args(self):


Test patch:
Repository: spack/spack

Issue:
Don't warn about missing source id for external packages
I build a rather large stack of Python packages. They all depend on Python, which depends on uuid. `apple-libuuid` is an external package that comes pre-installed on macOS. When I build my environment, I see hundreds of lines like:
```
==> Warning: Missing a source id for apple-libuuid@1353.100.2
==> Warning: Missing a source id for apple-libuuid@1353.100.2
==> Warning: Missing a source id for apple-libuuid@1353.100.2
```
For Spack-built packages, this is a good warning to have, because it warns you that Spack will ask if you're sure you want to fetch without a checksum. But for external packages, this warning is meaningless. We should silence this warning.


Discussion:

Resolving patch:
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1529,8 +1529,9 @@ def content_hash(self, content=None):
             # should this attempt to download the source and set one? This
             # probably only happens for source repositories which are
             # referenced by branch name rather than tag or commit ID.
-            message = 'Missing a source id for {s.name}@{s.version}'
-            tty.warn(message.format(s=self))
+            if not self.spec.external:
+                message = 'Missing a source id for {s.name}@{s.version}'
+                tty.warn(message.format(s=self))
             hash_content.append(''.encode('utf-8'))
         else:
             hash_content.append(source_id.encode('utf-8'))


Test patch:
Repository: spack/spack

Issue:
Installation issue: libtirpc%nvhpc fails due to -pipe flag in Makefile
Attempting to build libtirpc using nvhpc compilers generates an error due to an unrecognized '-pipe' flag being passed to the
compiler.  This appears to be due to the -pipe flag being hardcoded in some Makefiles.

### 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 libtircp@1.2.6 %nvhpc
...
==> libtirpc: Executing phase: 'build'
==> [2021-07-09-09:59:33.518276] 'make'
make  all-recursive
make[1]: Entering directory '/tmp/devspackswinst/spack-stage/spack-stage-libtirpc-1.2.6-2zmucfzyo6ukrt7qwcn4d6zlkevhibqp/spack-src'
Making all in src
make[2]: Entering directory '/tmp/devspackswinst/spack-stage/spack-stage-libtirpc-1.2.6-2zmucfzyo6ukrt7qwcn4d6zlkevhibqp/spack-src/src'
  CC       libtirpc_la-auth_none.lo
nvc-Error-Unknown switch: -pipe
make[2]: *** [Makefile:660: libtirpc_la-auth_none.lo] Error 1
```

### Information on your system
```console
> spack debug report
* **Spack:** 0.16.1-2429-f5e6c32495
* **Python:** 3.6.8
* **Platform:** linux-rhel8-x86_64
* **Concretizer:** original
```

I am using an manually installed (external to spack) nvhpc@21.5, but I expect the issue should be present with any version
of nvhpc.

### Additional information

No maintainers for libtirpc
@samcmill is the maintainer for nvhpc.

* [spack-build-env.txt](https://github.com/spack/spack/files/6792509/spack-build-env.txt)
* [spack-build-out.txt](https://github.com/spack/spack/files/6792510/spack-build-out.txt)

### 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/libtirpc/package.py b/var/spack/repos/builtin/packages/libtirpc/package.py
--- a/var/spack/repos/builtin/packages/libtirpc/package.py
+++ b/var/spack/repos/builtin/packages/libtirpc/package.py
@@ -20,6 +20,9 @@ class Libtirpc(AutotoolsPackage):
 
     provides('rpc')
 
+    # Remove -pipe flag to compiler in Makefiles when using nvhpc
+    patch('libtirpc-remove-pipe-flag-for-nvhpc.patch', when='%nvhpc')
+
     # FIXME: build error on macOS
     # auth_none.c:81:9: error: unknown type name 'mutex_t'
     conflicts('platform=darwin', msg='Does not build on macOS')


Test patch:
Repository: spack/spack

Issue:
Default font of white for spack stdout messages a bit hard to read on a white background



Discussion:
This is fixed by 73774c1.  Message text is now just bold instead of bold white.


Resolving patch:
diff --git a/var/spack/repos/builtin/packages/giflib/package.py b/var/spack/repos/builtin/packages/giflib/package.py
--- a/var/spack/repos/builtin/packages/giflib/package.py
+++ b/var/spack/repos/builtin/packages/giflib/package.py
@@ -29,6 +29,8 @@ def install_targets(self):
         targets = ['install']
         if self.spec.satisfies('@5.2.0:'):
             targets.append('PREFIX={0}'.format(self.spec.prefix))
+            targets.append('LIBMAJOR={0}'.format(self.spec.version.up_to(1)))
+            targets.append('LIBVER={0}'.format(self.spec.version))
 
         return targets
 


Test patch:
Repository: spack/spack

Issue:
Style: 'spack style --fix' fails with isort v4.2.15
### Steps to reproduce

Spack is using a newer `isort` option for the settings file than is supported by the earliest version listed in `py-isort`.  I ran into this problem when, IIRC, Spack bootstrapped to the earlier version when I ran the `spack stye` command.

Current `isort` documentation lists three other options that *might* work on older versions.  I tried two (`--settings` and `--settings-file`) despite the help below only showing the third, or shortcut (i.e., `-sp`).  Both of those options worked so it's just the `--settings-file` one that doesn't.

```
$ spack style --fix hash_types.py
==> Running style checks on spack
  selected: isort, mypy, flake8
==> Modified files
  hash_types.py
==> Running isort checks
  usage: isort [-h] [-y] [-l LINE_LENGTH] [-w LINE_LENGTH] [-s SKIP]
               [-ns NOT_SKIP] [-sg SKIP_GLOB] [-t FORCE_TO_TOP]
               [-f KNOWN_FUTURE_LIBRARY] [-b KNOWN_STANDARD_LIBRARY]
               [-o KNOWN_THIRD_PARTY] [-p KNOWN_FIRST_PARTY] [-m {0,1,2,3,4,5}]
               [-i INDENT] [-a ADD_IMPORTS] [-af] [-r REMOVE_IMPORTS] [-ls] [-d]
               [-c] [-sl] [-ds] [-sd DEFAULT_SECTION] [-df] [-e] [-rc] [-ot]
               [-dt] [-ac] [-cs] [-ca] [-tc] [-v] [-vb] [-q] [-sp SETTINGS_PATH]
               [-ff FROM_FIRST] [-wl WRAP_LENGTH] [-fgw] [-fass] [-fas] [-fss]
               [-lbt LINES_BETWEEN_TYPES]
               [files [files ...]]
  isort: error: unrecognized arguments: --settings-file
  isort found errors
==> Running mypy checks
...
```

The file with the problem was reportedly modified BUT `git diff` did not show any changes until I changed the code to use one of the alternatives above.

### Error message

See `Steps to reproduce`.

### Information on your system

* **Spack:** 0.16.2-3877-1f7d825ea9
* **Python:** 3.7.2
* **Platform:** linux-rhel7-broadwell
* **Concretizer:** original

Note: Checking (but skipping) step 3 in `General information` below since it wasn't necessary to run the debug command BUT this template requires it be checked.

### General 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/cmd/style.py b/lib/spack/spack/cmd/style.py
--- a/lib/spack/spack/cmd/style.py
+++ b/lib/spack/spack/cmd/style.py
@@ -312,7 +312,7 @@ def run_mypy(mypy_cmd, file_list, args):
 @tool("isort")
 def run_isort(isort_cmd, file_list, args):
     # always run with config from running spack prefix
-    isort_args = ("--settings-file", os.path.join(spack.paths.prefix, "pyproject.toml"))
+    isort_args = ("--settings-path", os.path.join(spack.paths.prefix, "pyproject.toml"))
     if not args.fix:
         isort_args += ("--check", "--diff")
 


Test patch:
Repository: spack/spack

Issue:
Spack -ddd install results in failed builds
### Steps to reproduce

You can no longer use the triple debug option (for seeing detailed lock debug messages) when installing a package.  

```
$ spack -ddd install libsigsegv
```

This issue was mentioned in #24794 and appears to be related to a bug introduced in #18205.

### Error message

```
==> [2021-08-24-14:59:14.820240, 35507] Error: AttributeError: 'Libsigsegv' object has no attribute 'pid'

/usr/WS1/dahlgren/releases/spack/lib/spack/spack/build_environment.py:1029, in _setup_pkg_and_run:
       1026        tb_string = traceback.format_exc()
       1027
       1028        # build up some context from the offending package so we can
  >>   1029        # show that, too.
       1030        package_context = get_package_context(tb)
       1031
       1032        logfile = None


Traceback (most recent call last):
  File "/usr/WS1/dahlgren/releases/spack/lib/spack/spack/build_environment.py", line 1013, in _setup_pkg_and_run
    return_value = function(pkg, kwargs)
  File "/usr/WS1/dahlgren/releases/spack/lib/spack/spack/installer.py", line 1886, in build_process
    installer = BuildProcessInstaller(pkg, install_args)
  File "/usr/WS1/dahlgren/releases/spack/lib/spack/spack/installer.py", line 1718, in __init__
    pid = '{0}: '.format(pkg.pid) if tty.show_pid() else ''
AttributeError: 'Libsigsegv' object has no attribute 'pid'
==> [2021-08-24-14:59:14.820730, 35507] Flagging libsigsegv-2.13-zfnnzbn4waysxe65i2zcahkksulrxfif as failed: AttributeError: 'Libsigsegv' object has no attribute 'pid'
```

### Information on your system

* **Spack:** 0.16.2-4019-80713e234c
* **Python:** 3.7.2
* **Platform:** linux-rhel7-broadwell
* **Concretizer:** original

### General 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/installer.py b/lib/spack/spack/installer.py
--- a/lib/spack/spack/installer.py
+++ b/lib/spack/spack/installer.py
@@ -1163,7 +1163,7 @@ def _install_task(self, task):
         except spack.build_environment.StopPhase as e:
             # A StopPhase exception means that do_install was asked to
             # stop early from clients, and is not an error at this point
-            pid = '{0}: '.format(pkg.pid) if tty.show_pid() else ''
+            pid = '{0}: '.format(self.pid) if tty.show_pid() else ''
             tty.debug('{0}{1}'.format(pid, str(e)))
             tty.debug('Package stage directory: {0}' .format(pkg.stage.source_path))
 
@@ -1715,7 +1715,7 @@ def __init__(self, pkg, install_args):
         self.filter_fn = spack.util.path.padding_filter if filter_padding else None
 
         # info/debug information
-        pid = '{0}: '.format(pkg.pid) if tty.show_pid() else ''
+        pid = '{0}: '.format(os.getpid()) if tty.show_pid() else ''
         self.pre = '{0}{1}:'.format(pid, pkg.name)
         self.pkg_id = package_id(pkg)
 


Test patch: