prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  PMIx build fails on aarch64
  
  PMIx up through version 2.1.0 has a bug in its test code that causes problems on strict alignment architectures like aarch64.  (The issue is explained in this commit: pmix/pmix@3a8bc4503a04158e3be072c92eb0253c6c77e534)  The fix is included in the 2.1.1 release.  The issue is exacerbated by building with optimizations turned on (which Spack does by default); it doesn't seem to happen when compiling with ```-O0```.
  
  Since the issue is in test code, the work-around is to just not build that code.
  ### Expected Result
  
  The install should work.
  
  ### Actual Result
  
  The install fails attempting to link pmix_test.
  
  ### Steps to reproduce the issue
  
  On an aarch64 machine:
  ```console
  $ spack install -j 56 pmix %gcc@7.3.0
  ```
  
  ### Information on your system
  
  1. HPE (pre-production) Apache servers (w/ Cavium ThunderX2 CPU's)
  1. RHEL 7.4
  1. GCC 7.3.0 (built by Spack) and GCC 4.8.5 (RHEL 7 default version)
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `var/spack/repos/builtin/packages/pmix/package.py`
  Content:
  ```
  1 ##############################################################################
  2 # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
  3 # Produced at the Lawrence Livermore National Laboratory.
  4 #
  5 # This file is part of Spack.
  6 # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
  7 # LLNL-CODE-647188
  8 #
  9 # For details, see https://github.com/spack/spack
  10 # Please also see the NOTICE and LICENSE files for our notice and the LGPL.
  11 #
  12 # This program is free software; you can redistribute it and/or modify
  13 # it under the terms of the GNU Lesser General Public License (as
  14 # published by the Free Software Foundation) version 2.1, February 1999.
  15 #
  16 # This program is distributed in the hope that it will be useful, but
  17 # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
  18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
  19 # conditions of the GNU Lesser General Public License for more details.
  20 #
  21 # You should have received a copy of the GNU Lesser General Public
  22 # License along with this program; if not, write to the Free Software
  23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  24 ##############################################################################
  25 
  26 from spack import *
  27 
  28 
  29 class Pmix(AutotoolsPackage):
  30     """The Process Management Interface (PMI) has been used for quite some time
  31        as a means of exchanging wireup information needed for interprocess
  32        communication. Two versions (PMI-1 and PMI-2) have been released as part
  33        of the MPICH effort. While PMI-2 demonstrates better scaling properties
  34        than its PMI-1 predecessor, attaining rapid launch and wireup of the
  35        roughly 1M processes executing across 100k nodes expected for exascale
  36        operations remains challenging.  PMI Exascale (PMIx) represents an
  37         attempt to resolve these questions by providing an extended version
  38        of the PMI definitions specifically designed to support clusters up
  39        to and including exascale sizes.  The overall objective of the project
  40        is not to branch the existing definitions - in fact, PMIx fully
  41        supports both of the existing PMI-1 and PMI-2 APIs - but rather to
  42        (a) augment and extend those APIs to eliminate some current restrictions
  43        that impact scalability, (b) establish a standards-like body for
  44        maintaining the definitions, and (c) provide a reference implementation
  45        of the PMIx standard that demonstrates the desired level of
  46        scalability."""
  47 
  48     homepage = "https://pmix.github.io/pmix"
  49     url      = "https://github.com/pmix/pmix/releases/download/v2.0.1/pmix-2.0.1.tar.bz2"
  50 
  51     version('2.1.0',    'fc97513b601d78fe7c6bb20c6a21df3c')
  52     version('2.0.2',    'e3ed1deed87c84f9b43da2621c6ad689')
  53     version('2.0.1',    'ba3193b485843516e6b4e8641e443b1e')
  54     version('2.0.0',    '3e047c2ea0ba8ee9925ed92b205fd92e')
  55     version('1.2.4',    '242a812e206e7c5948f1f5c9688eb2a7')
  56     version('1.2.3',    '102b1cc650018b62348b45d572b158e9')
  57     version('1.2.2',    'd85c8fd437bd88f984549425ad369e9f')
  58     version('1.2.1',    'f090f524681c52001ea2db3b0285596f')
  59     version('1.2.0',    '6a42472d5a32e1c31ce5da19d50fc21a')
  60 
  61     depends_on('libevent')
  62 
  63     def configure_args(self):
  64         spec = self.spec
  65         config_args = [
  66             '--enable-shared',
  67             '--enable-static'
  68         ]
  69 
  70         # external libevent support (needed to keep Open MPI happy)
  71         config_args.append(
  72             '--with-libevent={0}'.format(spec['libevent'].prefix))
  73 
  74         return config_args
  75
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/var/spack/repos/builtin/packages/pmix/package.py b/var/spack/repos/builtin/packages/pmix/package.py
  --- a/var/spack/repos/builtin/packages/pmix/package.py
  +++ b/var/spack/repos/builtin/packages/pmix/package.py
  @@ -24,6 +24,7 @@
   ##############################################################################
   
   from spack import *
  +import spack.architecture
   
   
   class Pmix(AutotoolsPackage):
  @@ -48,6 +49,7 @@
       homepage = "https://pmix.github.io/pmix"
       url      = "https://github.com/pmix/pmix/releases/download/v2.0.1/pmix-2.0.1.tar.bz2"
   
  +    version('2.1.1',    'f9f109421661b757245d5e0bd44a38b3')
       version('2.1.0',    'fc97513b601d78fe7c6bb20c6a21df3c')
       version('2.0.2',    'e3ed1deed87c84f9b43da2621c6ad689')
       version('2.0.1',    'ba3193b485843516e6b4e8641e443b1e')
  @@ -61,6 +63,7 @@
       depends_on('libevent')
   
       def configure_args(self):
  +
           spec = self.spec
           config_args = [
               '--enable-shared',
  @@ -71,4 +74,11 @@
           config_args.append(
               '--with-libevent={0}'.format(spec['libevent'].prefix))
   
  +        # Versions < 2.1.1 have a bug in the test code that *sometimes*
  +        # causes problems on strict alignment architectures such as
  +        # aarch64.  Work-around is to just not build the test code.
  +        if 'aarch64' in spack.architecture.sys_type() and \
  +           self.spec.version < Version('2.1.1'):
  +            config_args.append('--without-tests-examples')
  +
           return config_args
  
verification_info: {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/pmix/package.py b/var/spack/repos/builtin/packages/pmix/package.py\n--- a/var/spack/repos/builtin/packages/pmix/package.py\n+++ b/var/spack/repos/builtin/packages/pmix/package.py\n@@ -24,6 +24,7 @@\n ##############################################################################\n \n from spack import *\n+import spack.architecture\n \n \n class Pmix(AutotoolsPackage):\n@@ -48,6 +49,7 @@\n     homepage = \"https://pmix.github.io/pmix\"\n     url      = \"https://github.com/pmix/pmix/releases/download/v2.0.1/pmix-2.0.1.tar.bz2\"\n \n+    version('2.1.1',    'f9f109421661b757245d5e0bd44a38b3')\n     version('2.1.0',    'fc97513b601d78fe7c6bb20c6a21df3c')\n     version('2.0.2',    'e3ed1deed87c84f9b43da2621c6ad689')\n     version('2.0.1',    'ba3193b485843516e6b4e8641e443b1e')\n@@ -61,6 +63,7 @@\n     depends_on('libevent')\n \n     def configure_args(self):\n+\n         spec = self.spec\n         config_args = [\n             '--enable-shared',\n@@ -71,4 +74,11 @@\n         config_args.append(\n             '--with-libevent={0}'.format(spec['libevent'].prefix))\n \n+        # Versions < 2.1.1 have a bug in the test code that *sometimes*\n+        # causes problems on strict alignment architectures such as\n+        # aarch64.  Work-around is to just not build the test code.\n+        if 'aarch64' in spack.architecture.sys_type() and \\\n+           self.spec.version < Version('2.1.1'):\n+            config_args.append('--without-tests-examples')\n+\n         return config_args\n", "issue": "PMIx build fails on aarch64\n\r\nPMIx up through version 2.1.0 has a bug in its test code that causes problems on strict alignment architectures like aarch64.  (The issue is explained in this commit: pmix/pmix@3a8bc4503a04158e3be072c92eb0253c6c77e534)  The fix is included in the 2.1.1 release.  The issue is exacerbated by building with optimizations turned on (which Spack does by default); it doesn't seem to happen when compiling with ```-O0```.\r\n\r\nSince the issue is in test code, the work-around is to just not build that code.\r\n### Expected Result\r\n\r\nThe install should work.\r\n\r\n### Actual Result\r\n\r\nThe install fails attempting to link pmix_test.\r\n\r\n### Steps to reproduce the issue\r\n\r\nOn an aarch64 machine:\r\n```console\r\n$ spack install -j 56 pmix %gcc@7.3.0\r\n```\r\n\r\n### Information on your system\r\n\r\n1. HPE (pre-production) Apache servers (w/ Cavium ThunderX2 CPU's)\r\n1. RHEL 7.4\r\n1. GCC 7.3.0 (built by Spack) and GCC 4.8.5 (RHEL 7 default version)\r\n\n", "before_files": [{"content": "##############################################################################\n# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.\n# LLNL-CODE-647188\n#\n# For details, see https://github.com/spack/spack\n# Please also see the NOTICE and LICENSE files for our notice and the LGPL.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License (as\n# published by the Free Software Foundation) version 2.1, February 1999.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and\n# conditions of the GNU Lesser General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public\n# License along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n##############################################################################\n\nfrom spack import *\n\n\nclass Pmix(AutotoolsPackage):\n    \"\"\"The Process Management Interface (PMI) has been used for quite some time\n       as a means of exchanging wireup information needed for interprocess\n       communication. Two versions (PMI-1 and PMI-2) have been released as part\n       of the MPICH effort. While PMI-2 demonstrates better scaling properties\n       than its PMI-1 predecessor, attaining rapid launch and wireup of the\n       roughly 1M processes executing across 100k nodes expected for exascale\n       operations remains challenging.  PMI Exascale (PMIx) represents an\n        attempt to resolve these questions by providing an extended version\n       of the PMI definitions specifically designed to support clusters up\n       to and including exascale sizes.  The overall objective of the project\n       is not to branch the existing definitions - in fact, PMIx fully\n       supports both of the existing PMI-1 and PMI-2 APIs - but rather to\n       (a) augment and extend those APIs to eliminate some current restrictions\n       that impact scalability, (b) establish a standards-like body for\n       maintaining the definitions, and (c) provide a reference implementation\n       of the PMIx standard that demonstrates the desired level of\n       scalability.\"\"\"\n\n    homepage = \"https://pmix.github.io/pmix\"\n    url      = \"https://github.com/pmix/pmix/releases/download/v2.0.1/pmix-2.0.1.tar.bz2\"\n\n    version('2.1.0',    'fc97513b601d78fe7c6bb20c6a21df3c')\n    version('2.0.2',    'e3ed1deed87c84f9b43da2621c6ad689')\n    version('2.0.1',    'ba3193b485843516e6b4e8641e443b1e')\n    version('2.0.0',    '3e047c2ea0ba8ee9925ed92b205fd92e')\n    version('1.2.4',    '242a812e206e7c5948f1f5c9688eb2a7')\n    version('1.2.3',    '102b1cc650018b62348b45d572b158e9')\n    version('1.2.2',    'd85c8fd437bd88f984549425ad369e9f')\n    version('1.2.1',    'f090f524681c52001ea2db3b0285596f')\n    version('1.2.0',    '6a42472d5a32e1c31ce5da19d50fc21a')\n\n    depends_on('libevent')\n\n    def configure_args(self):\n        spec = self.spec\n        config_args = [\n            '--enable-shared',\n            '--enable-static'\n        ]\n\n        # external libevent support (needed to keep Open MPI happy)\n        config_args.append(\n            '--with-libevent={0}'.format(spec['libevent'].prefix))\n\n        return config_args\n", "path": "var/spack/repos/builtin/packages/pmix/package.py"}], "after_files": [{"content": "##############################################################################\n# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.\n# LLNL-CODE-647188\n#\n# For details, see https://github.com/spack/spack\n# Please also see the NOTICE and LICENSE files for our notice and the LGPL.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License (as\n# published by the Free Software Foundation) version 2.1, February 1999.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and\n# conditions of the GNU Lesser General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public\n# License along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n##############################################################################\n\nfrom spack import *\nimport spack.architecture\n\n\nclass Pmix(AutotoolsPackage):\n    \"\"\"The Process Management Interface (PMI) has been used for quite some time\n       as a means of exchanging wireup information needed for interprocess\n       communication. Two versions (PMI-1 and PMI-2) have been released as part\n       of the MPICH effort. While PMI-2 demonstrates better scaling properties\n       than its PMI-1 predecessor, attaining rapid launch and wireup of the\n       roughly 1M processes executing across 100k nodes expected for exascale\n       operations remains challenging.  PMI Exascale (PMIx) represents an\n        attempt to resolve these questions by providing an extended version\n       of the PMI definitions specifically designed to support clusters up\n       to and including exascale sizes.  The overall objective of the project\n       is not to branch the existing definitions - in fact, PMIx fully\n       supports both of the existing PMI-1 and PMI-2 APIs - but rather to\n       (a) augment and extend those APIs to eliminate some current restrictions\n       that impact scalability, (b) establish a standards-like body for\n       maintaining the definitions, and (c) provide a reference implementation\n       of the PMIx standard that demonstrates the desired level of\n       scalability.\"\"\"\n\n    homepage = \"https://pmix.github.io/pmix\"\n    url      = \"https://github.com/pmix/pmix/releases/download/v2.0.1/pmix-2.0.1.tar.bz2\"\n\n    version('2.1.1',    'f9f109421661b757245d5e0bd44a38b3')\n    version('2.1.0',    'fc97513b601d78fe7c6bb20c6a21df3c')\n    version('2.0.2',    'e3ed1deed87c84f9b43da2621c6ad689')\n    version('2.0.1',    'ba3193b485843516e6b4e8641e443b1e')\n    version('2.0.0',    '3e047c2ea0ba8ee9925ed92b205fd92e')\n    version('1.2.4',    '242a812e206e7c5948f1f5c9688eb2a7')\n    version('1.2.3',    '102b1cc650018b62348b45d572b158e9')\n    version('1.2.2',    'd85c8fd437bd88f984549425ad369e9f')\n    version('1.2.1',    'f090f524681c52001ea2db3b0285596f')\n    version('1.2.0',    '6a42472d5a32e1c31ce5da19d50fc21a')\n\n    depends_on('libevent')\n\n    def configure_args(self):\n\n        spec = self.spec\n        config_args = [\n            '--enable-shared',\n            '--enable-static'\n        ]\n\n        # external libevent support (needed to keep Open MPI happy)\n        config_args.append(\n            '--with-libevent={0}'.format(spec['libevent'].prefix))\n\n        # Versions < 2.1.1 have a bug in the test code that *sometimes*\n        # causes problems on strict alignment architectures such as\n        # aarch64.  Work-around is to just not build the test code.\n        if 'aarch64' in spack.architecture.sys_type() and \\\n           self.spec.version < Version('2.1.1'):\n            config_args.append('--without-tests-examples')\n\n        return config_args\n", "path": "var/spack/repos/builtin/packages/pmix/package.py"}]}