created elf virtual package and updated dependent packages (#3317)
* created elf virtual package and updated dependent packages * added `hide_files` context manager to handle moving files.
This commit is contained in:
parent
2ac343e92e
commit
604b75c1f9
@ -50,6 +50,7 @@
|
|||||||
'fix_darwin_install_name',
|
'fix_darwin_install_name',
|
||||||
'force_remove',
|
'force_remove',
|
||||||
'force_symlink',
|
'force_symlink',
|
||||||
|
'hide_files',
|
||||||
'install',
|
'install',
|
||||||
'install_tree',
|
'install_tree',
|
||||||
'is_exe',
|
'is_exe',
|
||||||
@ -257,6 +258,18 @@ def working_dir(dirname, **kwargs):
|
|||||||
os.chdir(orig_dir)
|
os.chdir(orig_dir)
|
||||||
|
|
||||||
|
|
||||||
|
@contextmanager
|
||||||
|
def hide_files(*file_list):
|
||||||
|
try:
|
||||||
|
baks = ['%s.bak' % f for f in file_list]
|
||||||
|
for f, bak in zip(file_list, baks):
|
||||||
|
shutil.move(f, bak)
|
||||||
|
yield
|
||||||
|
finally:
|
||||||
|
for f, bak in zip(file_list, baks):
|
||||||
|
shutil.move(bak, f)
|
||||||
|
|
||||||
|
|
||||||
def touch(path):
|
def touch(path):
|
||||||
"""Creates an empty file at the specified path."""
|
"""Creates an empty file at the specified path."""
|
||||||
with open(path, 'a'):
|
with open(path, 'a'):
|
||||||
|
@ -35,7 +35,7 @@ class Callpath(Package):
|
|||||||
version('1.0.2', 'b1994d5ee7c7db9d27586fc2dcf8f373')
|
version('1.0.2', 'b1994d5ee7c7db9d27586fc2dcf8f373')
|
||||||
version('1.0.1', '0047983d2a52c5c335f8ba7f5bab2325')
|
version('1.0.1', '0047983d2a52c5c335f8ba7f5bab2325')
|
||||||
|
|
||||||
depends_on("libelf")
|
depends_on("elf", type="link")
|
||||||
depends_on("libdwarf")
|
depends_on("libdwarf")
|
||||||
depends_on("dyninst")
|
depends_on("dyninst")
|
||||||
depends_on("adept-utils")
|
depends_on("adept-utils")
|
||||||
@ -44,6 +44,9 @@ class Callpath(Package):
|
|||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
# TODO: offer options for the walker used.
|
# TODO: offer options for the walker used.
|
||||||
cmake('.', "-DCALLPATH_WALKER=dyninst", *std_cmake_args)
|
cmake_args = std_cmake_args
|
||||||
|
if spec.satisfies("^dyninst@9.3.0:"):
|
||||||
|
cmake_args.append("-DCMAKE_CXX_FLAGS='-std=c++11 -fpermissive'")
|
||||||
|
cmake('.', "-DCALLPATH_WALKER=dyninst", *cmake_args)
|
||||||
make()
|
make()
|
||||||
make("install")
|
make("install")
|
||||||
|
@ -33,13 +33,7 @@ class Dyninst(Package):
|
|||||||
url = "https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz"
|
url = "https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz"
|
||||||
list_url = "http://www.dyninst.org/downloads/dyninst-8.x"
|
list_url = "http://www.dyninst.org/downloads/dyninst-8.x"
|
||||||
|
|
||||||
# version 9.2.1b was the latest git commit when trying to port to a
|
version('9.3.0', 'edde7847dc673ca69bd59412af572450')
|
||||||
# ppc64le system to get fixes in computeAddrWidth independent of
|
|
||||||
# endianness. This version can be removed if the next release includes
|
|
||||||
# this change. The actual commit was
|
|
||||||
# b8596ad4023ec40ac07e669ff8ea3ec06e262703
|
|
||||||
version('9.2.1b', git='https://github.com/dyninst/dyninst.git',
|
|
||||||
commit='859cb778e20b619443c943c96dd1851da763142b')
|
|
||||||
version('9.2.0', 'ad023f85e8e57837ed9de073b59d6bab',
|
version('9.2.0', 'ad023f85e8e57837ed9de073b59d6bab',
|
||||||
url="https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz")
|
url="https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz")
|
||||||
version('9.1.0', '5c64b77521457199db44bec82e4988ac',
|
version('9.1.0', '5c64b77521457199db44bec82e4988ac',
|
||||||
@ -54,7 +48,8 @@ class Dyninst(Package):
|
|||||||
variant('stat_dysect', default=False,
|
variant('stat_dysect', default=False,
|
||||||
description="patch for STAT's DySectAPI")
|
description="patch for STAT's DySectAPI")
|
||||||
|
|
||||||
depends_on("libelf")
|
depends_on("elf@0", type='link', when='@:9.2.99')
|
||||||
|
depends_on("elf@1", type='link', when='@9.3.0:')
|
||||||
depends_on("libdwarf")
|
depends_on("libdwarf")
|
||||||
depends_on("boost@1.42:")
|
depends_on("boost@1.42:")
|
||||||
depends_on('cmake', type='build')
|
depends_on('cmake', type='build')
|
||||||
@ -70,7 +65,7 @@ def install(self, spec, prefix):
|
|||||||
make("install")
|
make("install")
|
||||||
return
|
return
|
||||||
|
|
||||||
libelf = spec['libelf'].prefix
|
libelf = spec['elf'].prefix
|
||||||
libdwarf = spec['libdwarf'].prefix
|
libdwarf = spec['libdwarf'].prefix
|
||||||
|
|
||||||
with working_dir('spack-build', create=True):
|
with working_dir('spack-build', create=True):
|
||||||
|
@ -43,7 +43,7 @@ class Elfutils(AutotoolsPackage):
|
|||||||
git='git://git.fedorahosted.org/git/elfutils.git',
|
git='git://git.fedorahosted.org/git/elfutils.git',
|
||||||
tag='elfutils-0.163')
|
tag='elfutils-0.163')
|
||||||
|
|
||||||
provides('elf')
|
provides('elf@1')
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
return ['--enable-maintainer-mode']
|
return ['--enable-maintainer-mode']
|
||||||
|
@ -62,8 +62,12 @@ class Extrae(Package):
|
|||||||
depends_on("boost")
|
depends_on("boost")
|
||||||
depends_on("libdwarf")
|
depends_on("libdwarf")
|
||||||
depends_on("papi")
|
depends_on("papi")
|
||||||
depends_on("libelf")
|
depends_on("elf", type="link")
|
||||||
depends_on("libxml2")
|
depends_on("libxml2")
|
||||||
|
|
||||||
|
# gettext dependency added to find -lintl
|
||||||
|
# https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined
|
||||||
|
depends_on("gettext")
|
||||||
depends_on("binutils+libiberty")
|
depends_on("binutils+libiberty")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
@ -74,6 +78,16 @@ def install(self, spec, prefix):
|
|||||||
elif 'mvapich2' in spec:
|
elif 'mvapich2' in spec:
|
||||||
mpi = spec['mvapich2']
|
mpi = spec['mvapich2']
|
||||||
|
|
||||||
|
extra_config_args = []
|
||||||
|
|
||||||
|
# This was added due to configure failure
|
||||||
|
# https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined
|
||||||
|
extra_config_args.append('LDFLAGS=-lintl')
|
||||||
|
|
||||||
|
if spec.satisfies("^dyninst@9.3.0:"):
|
||||||
|
make.add_default_arg('CXXFLAGS=-std=c++11')
|
||||||
|
extra_config_args.append('CXXFLAGS=-std=c++11')
|
||||||
|
|
||||||
configure("--prefix=%s" % prefix,
|
configure("--prefix=%s" % prefix,
|
||||||
"--with-mpi=%s" % mpi.prefix,
|
"--with-mpi=%s" % mpi.prefix,
|
||||||
"--with-unwind=%s" % spec['libunwind'].prefix,
|
"--with-unwind=%s" % spec['libunwind'].prefix,
|
||||||
@ -83,10 +97,11 @@ def install(self, spec, prefix):
|
|||||||
"--with-papi=%s" % spec['papi'].prefix,
|
"--with-papi=%s" % spec['papi'].prefix,
|
||||||
"--with-dyninst-headers=%s" % spec[
|
"--with-dyninst-headers=%s" % spec[
|
||||||
'dyninst'].prefix.include,
|
'dyninst'].prefix.include,
|
||||||
"--with-elf=%s" % spec['libelf'].prefix,
|
"--with-elf=%s" % spec['elf'].prefix,
|
||||||
"--with-xml-prefix=%s" % spec['libxml2'].prefix,
|
"--with-xml-prefix=%s" % spec['libxml2'].prefix,
|
||||||
"--with-binutils=%s" % spec['binutils'].prefix,
|
"--with-binutils=%s" % spec['binutils'].prefix,
|
||||||
"--with-dyninst-libs=%s" % spec['dyninst'].prefix.lib)
|
"--with-dyninst-libs=%s" % spec['dyninst'].prefix.lib,
|
||||||
|
*extra_config_args)
|
||||||
|
|
||||||
make()
|
make()
|
||||||
make("install", parallel=False)
|
make("install", parallel=False)
|
||||||
|
@ -38,6 +38,9 @@ class Launchmon(Package):
|
|||||||
depends_on('libtool', type='build')
|
depends_on('libtool', type='build')
|
||||||
depends_on('libgcrypt')
|
depends_on('libgcrypt')
|
||||||
depends_on('libgpg-error')
|
depends_on('libgpg-error')
|
||||||
|
depends_on("elf", type='link')
|
||||||
|
depends_on("boost")
|
||||||
|
depends_on("spectrum-mpi", when='arch=ppc64le')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
configure(
|
configure(
|
||||||
|
@ -48,11 +48,19 @@ class Libdwarf(Package):
|
|||||||
version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d')
|
version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d')
|
||||||
version('20130207', '64b42692e947d5180e162e46c689dfbf')
|
version('20130207', '64b42692e947d5180e162e46c689dfbf')
|
||||||
version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db')
|
version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db')
|
||||||
depends_on("libelf")
|
depends_on("elf", type='link')
|
||||||
|
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
|
||||||
|
# elfutils contains a dwarf.h that conflicts with libdwarf's
|
||||||
|
# TODO: we should remove this when we can modify the include order
|
||||||
|
hide_list = []
|
||||||
|
if spec.satisfies('^elfutils'):
|
||||||
|
dwarf_h = join_path(spec['elfutils'].prefix, 'include/dwarf.h')
|
||||||
|
hide_list.append(dwarf_h)
|
||||||
|
with hide_files(*hide_list):
|
||||||
# dwarf build does not set arguments for ar properly
|
# dwarf build does not set arguments for ar properly
|
||||||
make.add_default_arg('ARFLAGS=rcs')
|
make.add_default_arg('ARFLAGS=rcs')
|
||||||
|
|
||||||
@ -60,7 +68,16 @@ def install(self, spec, prefix):
|
|||||||
mkdirp(prefix.bin, prefix.include, prefix.lib, prefix.man1)
|
mkdirp(prefix.bin, prefix.include, prefix.lib, prefix.man1)
|
||||||
|
|
||||||
with working_dir('libdwarf'):
|
with working_dir('libdwarf'):
|
||||||
configure("--prefix=" + prefix, "--enable-shared")
|
extra_config_args = []
|
||||||
|
|
||||||
|
# this is to prevent picking up system /usr/include/libelf.h
|
||||||
|
if spec.satisfies('^libelf'):
|
||||||
|
libelf_inc_dir = join_path(spec['libelf'].prefix,
|
||||||
|
'include/libelf')
|
||||||
|
extra_config_args.append('CFLAGS=-I{0}'.format(
|
||||||
|
libelf_inc_dir))
|
||||||
|
configure("--prefix=" + prefix, "--enable-shared",
|
||||||
|
*extra_config_args)
|
||||||
make()
|
make()
|
||||||
|
|
||||||
install('libdwarf.a', prefix.lib)
|
install('libdwarf.a', prefix.lib)
|
||||||
|
@ -37,7 +37,7 @@ class Libelf(AutotoolsPackage):
|
|||||||
version('0.8.13', '4136d7b4c04df68b686570afa26988ac')
|
version('0.8.13', '4136d7b4c04df68b686570afa26988ac')
|
||||||
version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7')
|
version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7')
|
||||||
|
|
||||||
provides('elf')
|
provides('elf@0')
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
args = ["--enable-shared",
|
args = ["--enable-shared",
|
||||||
|
@ -115,6 +115,8 @@ class Openspeedshop(Package):
|
|||||||
depends_on("bison", type='build')
|
depends_on("bison", type='build')
|
||||||
depends_on("flex", type='build')
|
depends_on("flex", type='build')
|
||||||
depends_on("binutils@2.24+krellpatch", type='build')
|
depends_on("binutils@2.24+krellpatch", type='build')
|
||||||
|
# TODO: when using dyninst@9.3.0:, we will need to use elf
|
||||||
|
# depends_on("elf", type="link")
|
||||||
depends_on("libelf")
|
depends_on("libelf")
|
||||||
depends_on("libdwarf")
|
depends_on("libdwarf")
|
||||||
depends_on("sqlite")
|
depends_on("sqlite")
|
||||||
|
@ -31,11 +31,11 @@ class Stat(Package):
|
|||||||
homepage = "http://paradyn.org/STAT/STAT.html"
|
homepage = "http://paradyn.org/STAT/STAT.html"
|
||||||
url = "https://github.com/lee218llnl/stat/archive/v2.0.0.tar.gz"
|
url = "https://github.com/lee218llnl/stat/archive/v2.0.0.tar.gz"
|
||||||
|
|
||||||
|
version('3.0.0', 'a97cb235c266371c4a26329112de48a2',
|
||||||
|
url='https://github.com/LLNL/STAT/releases/download/v3.0.0/STAT-3.0.0.tar.gz')
|
||||||
version('2.2.0', '26bd69dd57a15afdd5d0ebdb0b7fb6fc')
|
version('2.2.0', '26bd69dd57a15afdd5d0ebdb0b7fb6fc')
|
||||||
version('2.1.0', 'ece26beaf057aa9134d62adcdda1ba91')
|
version('2.1.0', 'ece26beaf057aa9134d62adcdda1ba91')
|
||||||
version('2.0.0', 'c7494210b0ba26b577171b92838e1a9b')
|
version('2.0.0', 'c7494210b0ba26b577171b92838e1a9b')
|
||||||
version('3.0.0', 'a97cb235c266371c4a26329112de48a2',
|
|
||||||
url='https://github.com/LLNL/STAT/releases/download/v3.0.0/STAT-3.0.0.tar.gz')
|
|
||||||
|
|
||||||
# TODO: dysect requires Dyninst patch for version 3.0.0b
|
# TODO: dysect requires Dyninst patch for version 3.0.0b
|
||||||
variant('dysect', default=False, description="enable DySectAPI")
|
variant('dysect', default=False, description="enable DySectAPI")
|
||||||
@ -44,7 +44,6 @@ class Stat(Package):
|
|||||||
depends_on('autoconf', type='build')
|
depends_on('autoconf', type='build')
|
||||||
depends_on('automake', type='build')
|
depends_on('automake', type='build')
|
||||||
depends_on('libtool', type='build')
|
depends_on('libtool', type='build')
|
||||||
depends_on('libelf')
|
|
||||||
depends_on('libdwarf')
|
depends_on('libdwarf')
|
||||||
depends_on('dyninst', when='~dysect')
|
depends_on('dyninst', when='~dysect')
|
||||||
depends_on('dyninst@8.2.1+stat_dysect', when='+dysect')
|
depends_on('dyninst@8.2.1+stat_dysect', when='+dysect')
|
||||||
|
Loading…
Reference in New Issue
Block a user