From 56f7c85c939231c289c1b497607058f8bb57245f Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Tue, 13 Jun 2017 17:59:25 -0700 Subject: [PATCH] metis: bugfix: make shared library build portable (#4489) Fixes #4488. When compiling metis as a shared library, the package used the syntax `-rpath=`, followed by a path. This syntax is non-portable, so replace it using Spack's compiler rpath argument property. --- var/spack/repos/builtin/packages/metis/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 64245095922..3b904dd0155 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -135,7 +135,8 @@ def install(self, spec, prefix): # Set up and run tests on installation ccompile('-I%s' % prefix.include, '-L%s' % prefix.lib, - '-Wl,-rpath=%s' % (prefix.lib if '+shared' in spec else ''), + self.compiler.cc_rpath_arg + + '%s' % (prefix.lib if '+shared' in spec else ''), join_path('Programs', 'io.o'), join_path('Test', 'mtest.c'), '-o', '%s/mtest' % prefix.bin, '-lmetis', '-lm')