Skip to content

Commit 52b614c

Browse files
committed
unknown command error caused by import of relocate.py failing
1 parent 30aa688 commit 52b614c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/spack/spack/relocate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import platform
77
import re
88
from spack.util.executable import which
9-
9+
from llnl.util.filesystem import filter_file
1010
import llnl.util.tty as tty
1111

1212

@@ -20,7 +20,7 @@ def get_existing_elf_rpaths(path_name, patchelf_executable):
2020
if command.returncode != 0:
2121
tty.warn('failed reading rpath for %s.' % path_name)
2222
return False
23-
return output.split(':')
23+
return output.rstrip('\n').split(':')
2424
else:
2525
tty.die('relocation not supported for this platform')
2626
return retval
@@ -139,7 +139,7 @@ def modify_elf_object(path_name, orig_rpath, new_rpath, patchelf_executable):
139139
if platform.system() == 'Linux':
140140
new_joined = ':'.join(new_rpath)
141141
command = which(patchelf_executable)
142-
output=command('--force-rpath', '--set-rpath %s' % new_joined,
142+
output=command('--force-rpath', '--set-rpath', '%s' % new_joined,
143143
'%s' % path_name, output=str, cmd=str)
144144
if command.returncode != 0:
145145
tty.warn('failed writing rpath for %s.' % path_name)

0 commit comments

Comments
 (0)