We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: mxml / adios link error
This seems to be related to the pull request https://github.com/LLNL/spack/pull/3696 that I abandoned a few months back, but which has now come back to haunt me.
If I use the current spack setup for adios and mxml, I receive the following error when I try to link against the adios library:

    ld: /home/mol/Software/spack/opt/spack/linux-opensuse42-x86_64/gcc-4.8/mxml-2.10-zxpuyumt66b7ehrlidmcax7li5ekhr6x/lib64/libmxml.a(mxml-attr.o):
    relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
    /home/mol/Software/spack/opt/spack/linux-opensuse42-x86_64/gcc-4.8/mxml-2.10-zxpuyumt66b7ehrlidmcax7li5ekhr6x/lib64/libmxml.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Interestingly enough, the adios library is always being built as a `.a`, regardless of +shared, ~shared, whatever.

If I avoid the external mxml library for ADIOS - relying instead on adios' own internal copy - I don't see this issue.
I'll post a commit and pull-request and see if someone can tell me why.
BUG: mxml / adios link error
This seems to be related to the pull request https://github.com/LLNL/spack/pull/3696 that I abandoned a few months back, but which has now come back to haunt me.
If I use the current spack setup for adios and mxml, I receive the following error when I try to link against the adios library:

    ld: /home/mol/Software/spack/opt/spack/linux-opensuse42-x86_64/gcc-4.8/mxml-2.10-zxpuyumt66b7ehrlidmcax7li5ekhr6x/lib64/libmxml.a(mxml-attr.o):
    relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
    /home/mol/Software/spack/opt/spack/linux-opensuse42-x86_64/gcc-4.8/mxml-2.10-zxpuyumt66b7ehrlidmcax7li5ekhr6x/lib64/libmxml.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Interestingly enough, the adios library is always being built as a `.a`, regardless of +shared, ~shared, whatever.

If I avoid the external mxml library for ADIOS - relying instead on adios' own internal copy - I don't see this issue.
I'll post a commit and pull-request and see if someone can tell me why.

--- 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/mxml/package.py`
Content:
```
1 ##############################################################################
2 # Copyright (c) 2013-2016, 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/llnl/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 from spack import *
26 
27 
28 class Mxml(AutotoolsPackage):
29     """Mini-XML is a small XML library that you can use to read and write XML
30     and XML-like data files in your application without requiring large
31     non-standard libraries.
32     """
33 
34     homepage = "http://michaelrsweet.github.io/mxml/"
35     url      = "https://github.com/michaelrsweet/mxml/releases/download/release-2.10/mxml-2.10.tar.gz"
36 
37     version('2.10', '8804c961a24500a95690ef287d150abe')
38     version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19')
39     version('2.8', 'd85ee6d30de053581242c4a86e79a5d2')
40     version('2.7', '76f2ae49bf0f5745d5cb5d9507774dc9')
41     version('2.6', '68977789ae64985dddbd1a1a1652642e')
42     version('2.5', 'f706377fba630b39fa02fd63642b17e5')
43 
44     def url_for_version(self, version):
45         if version <= Version('2.7'):
46             return 'https://github.com/michaelrsweet/mxml/archive/release-{0}.tar.gz'.format(version)
47         else:
48             return 'https://github.com/michaelrsweet/mxml/releases/download/release-{0}/mxml-{0}.tar.gz'.format(version)
49 
50     def configure_args(self):
51         # Default is non-shared, but avoid any future surprises
52         return ['--disable-shared']
53
```
--- 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()

```

diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py
--- a/var/spack/repos/builtin/packages/mxml/package.py
+++ b/var/spack/repos/builtin/packages/mxml/package.py
@@ -48,5 +48,9 @@
             return 'https://github.com/michaelrsweet/mxml/releases/download/release-{0}/mxml-{0}.tar.gz'.format(version)
 
     def configure_args(self):
-        # Default is non-shared, but avoid any future surprises
-        return ['--disable-shared']
+        return [
+            # ADIOS build with -fPIC, so we need it too (avoid linkage issue)
+            'CFLAGS=-fPIC',
+            # Default is non-shared, but avoid any future surprises
+            '--disable-shared',
+        ]

{"golden_diff": "diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py\n--- a/var/spack/repos/builtin/packages/mxml/package.py\n+++ b/var/spack/repos/builtin/packages/mxml/package.py\n@@ -48,5 +48,9 @@\n             return 'https://github.com/michaelrsweet/mxml/releases/download/release-{0}/mxml-{0}.tar.gz'.format(version)\n \n     def configure_args(self):\n-        # Default is non-shared, but avoid any future surprises\n-        return ['--disable-shared']\n+        return [\n+            # ADIOS build with -fPIC, so we need it too (avoid linkage issue)\n+            'CFLAGS=-fPIC',\n+            # Default is non-shared, but avoid any future surprises\n+            '--disable-shared',\n+        ]\n", "issue": "BUG: mxml / adios link error\nThis seems to be related to the pull request https://github.com/LLNL/spack/pull/3696 that I abandoned a few months back, but which has now come back to haunt me.\r\nIf I use the current spack setup for adios and mxml, I receive the following error when I try to link against the adios library:\r\n\r\n    ld: /home/mol/Software/spack/opt/spack/linux-opensuse42-x86_64/gcc-4.8/mxml-2.10-zxpuyumt66b7ehrlidmcax7li5ekhr6x/lib64/libmxml.a(mxml-attr.o):\r\n    relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC\r\n    /home/mol/Software/spack/opt/spack/linux-opensuse42-x86_64/gcc-4.8/mxml-2.10-zxpuyumt66b7ehrlidmcax7li5ekhr6x/lib64/libmxml.a: error adding symbols: Bad value\r\ncollect2: error: ld returned 1 exit status\r\n\r\nInterestingly enough, the adios library is always being built as a `.a`, regardless of +shared, ~shared, whatever.\r\n\r\nIf I avoid the external mxml library for ADIOS - relying instead on adios' own internal copy - I don't see this issue.\r\nI'll post a commit and pull-request and see if someone can tell me why.\nBUG: mxml / adios link error\nThis seems to be related to the pull request https://github.com/LLNL/spack/pull/3696 that I abandoned a few months back, but which has now come back to haunt me.\r\nIf I use the current spack setup for adios and mxml, I receive the following error when I try to link against the adios library:\r\n\r\n    ld: /home/mol/Software/spack/opt/spack/linux-opensuse42-x86_64/gcc-4.8/mxml-2.10-zxpuyumt66b7ehrlidmcax7li5ekhr6x/lib64/libmxml.a(mxml-attr.o):\r\n    relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC\r\n    /home/mol/Software/spack/opt/spack/linux-opensuse42-x86_64/gcc-4.8/mxml-2.10-zxpuyumt66b7ehrlidmcax7li5ekhr6x/lib64/libmxml.a: error adding symbols: Bad value\r\ncollect2: error: ld returned 1 exit status\r\n\r\nInterestingly enough, the adios library is always being built as a `.a`, regardless of +shared, ~shared, whatever.\r\n\r\nIf I avoid the external mxml library for ADIOS - relying instead on adios' own internal copy - I don't see this issue.\r\nI'll post a commit and pull-request and see if someone can tell me why.\n", "before_files": [{"content": "##############################################################################\n# Copyright (c) 2013-2016, 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/llnl/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##############################################################################\nfrom spack import *\n\n\nclass Mxml(AutotoolsPackage):\n    \"\"\"Mini-XML is a small XML library that you can use to read and write XML\n    and XML-like data files in your application without requiring large\n    non-standard libraries.\n    \"\"\"\n\n    homepage = \"http://michaelrsweet.github.io/mxml/\"\n    url      = \"https://github.com/michaelrsweet/mxml/releases/download/release-2.10/mxml-2.10.tar.gz\"\n\n    version('2.10', '8804c961a24500a95690ef287d150abe')\n    version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19')\n    version('2.8', 'd85ee6d30de053581242c4a86e79a5d2')\n    version('2.7', '76f2ae49bf0f5745d5cb5d9507774dc9')\n    version('2.6', '68977789ae64985dddbd1a1a1652642e')\n    version('2.5', 'f706377fba630b39fa02fd63642b17e5')\n\n    def url_for_version(self, version):\n        if version <= Version('2.7'):\n            return 'https://github.com/michaelrsweet/mxml/archive/release-{0}.tar.gz'.format(version)\n        else:\n            return 'https://github.com/michaelrsweet/mxml/releases/download/release-{0}/mxml-{0}.tar.gz'.format(version)\n\n    def configure_args(self):\n        # Default is non-shared, but avoid any future surprises\n        return ['--disable-shared']\n", "path": "var/spack/repos/builtin/packages/mxml/package.py"}], "after_files": [{"content": "##############################################################################\n# Copyright (c) 2013-2016, 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/llnl/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##############################################################################\nfrom spack import *\n\n\nclass Mxml(AutotoolsPackage):\n    \"\"\"Mini-XML is a small XML library that you can use to read and write XML\n    and XML-like data files in your application without requiring large\n    non-standard libraries.\n    \"\"\"\n\n    homepage = \"http://michaelrsweet.github.io/mxml/\"\n    url      = \"https://github.com/michaelrsweet/mxml/releases/download/release-2.10/mxml-2.10.tar.gz\"\n\n    version('2.10', '8804c961a24500a95690ef287d150abe')\n    version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19')\n    version('2.8', 'd85ee6d30de053581242c4a86e79a5d2')\n    version('2.7', '76f2ae49bf0f5745d5cb5d9507774dc9')\n    version('2.6', '68977789ae64985dddbd1a1a1652642e')\n    version('2.5', 'f706377fba630b39fa02fd63642b17e5')\n\n    def url_for_version(self, version):\n        if version <= Version('2.7'):\n            return 'https://github.com/michaelrsweet/mxml/archive/release-{0}.tar.gz'.format(version)\n        else:\n            return 'https://github.com/michaelrsweet/mxml/releases/download/release-{0}/mxml-{0}.tar.gz'.format(version)\n\n    def configure_args(self):\n        return [\n            # ADIOS build with -fPIC, so we need it too (avoid linkage issue)\n            'CFLAGS=-fPIC',\n            # Default is non-shared, but avoid any future surprises\n            '--disable-shared',\n        ]\n", "path": "var/spack/repos/builtin/packages/mxml/package.py"}]}