diff options
author | Jim Galarowicz <jeg@krellinst.org> | 2018-06-13 15:35:32 -0500 |
---|---|---|
committer | Gregory Lee <lee218@llnl.gov> | 2018-06-13 13:35:32 -0700 |
commit | 674feb45f1f9437991d3dae7e4a34949feaecb11 (patch) | |
tree | 921809785d7091847178955910ad01c5fa85176d /var | |
parent | 758b813c3673ee74f0b23edb2a568d686107d507 (diff) | |
download | spack-674feb45f1f9437991d3dae7e4a34949feaecb11.tar.gz spack-674feb45f1f9437991d3dae7e4a34949feaecb11.tar.bz2 spack-674feb45f1f9437991d3dae7e4a34949feaecb11.tar.xz spack-674feb45f1f9437991d3dae7e4a34949feaecb11.zip |
Add the ability to build the dyninst master branch under the develop version name. (#8455)
* Add the ability to build the dyninst master branch under the develop version name. Fix elfutils and libdwarf to work with the various dyninst versions and vice-versa.
* Add reviewer suggested change to dyninst package file. Remove colon in spec.satisfies clause.
* Add reviewer suggested change to dyninst package file. Remove duplicate lines.
* Add reviewer suggested change to dyninst package file. Encompass all versions under 10.0 with respect to using libdwarf in the build.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/dyninst/package.py | 31 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/elfutils/package.py | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/libdwarf/package.py | 9 |
3 files changed, 34 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index 879bbf616a..df7c0a3f7f 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -33,6 +33,7 @@ class Dyninst(Package): url = "https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz" list_url = "http://www.dyninst.org/downloads/dyninst-8.x" + version('develop', git="https://github.com/dyninst/dyninst.git", branch='master') version('9.3.2', git="https://github.com/dyninst/dyninst.git", tag='v9.3.2') version('9.3.0', git="https://github.com/dyninst/dyninst.git", tag='v9.3.0') version('9.2.0', git="https://github.com/dyninst/dyninst.git", tag='v9.2.0') @@ -44,9 +45,19 @@ class Dyninst(Package): variant('stat_dysect', default=False, description="patch for STAT's DySectAPI") + # Dyninst depends on libelf and libdwarf prior to @9.3.0 + # Dyninst depends on elfutils and libdwarf from @9.3.0 to but + # not including @develop + # Dyninst depends on elfutils and elfutils libdw from @develop forward + # elf@0 is an abstaction for libelf + # elf@1 is an abstaction for elfutils depends_on("elf@0", type='link', when='@:9.2.99') + # The sorting algorithm puts numbered releases as newer than alphabetic + # releases, but spack has special logic in place to ensure that + # develop is considered newer than all other releases. + # So, develop is included in the elf@1 line below. depends_on("elf@1", type='link', when='@9.3.0:') - depends_on("libdwarf") + depends_on("libdwarf", when='@:9') depends_on("boost@1.42:") depends_on('cmake', type='build') @@ -62,7 +73,8 @@ class Dyninst(Package): return libelf = spec['elf'].prefix - libdwarf = spec['libdwarf'].prefix + if spec.satisfies('@:9'): + libdwarf = spec['libdwarf'].prefix with working_dir('spack-build', create=True): args = ['..', @@ -72,10 +84,17 @@ class Dyninst(Package): '-DLIBELF_INCLUDE_DIR=%s' % join_path( libelf.include, 'libelf'), '-DLIBELF_LIBRARIES=%s' % join_path( - libelf.lib, 'libelf.so'), - '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, - '-DLIBDWARF_LIBRARIES=%s' % join_path( - libdwarf.lib, 'libdwarf.so')] + libelf.lib, "libelf." + dso_suffix)] + if spec.satisfies('@:9'): + args.append('-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include) + args.append('-DLIBDWARF_LIBRARIES=%s' % join_path( + libdwarf.lib, "libdwarf." + dso_suffix)) + # For @develop + use elfutils libdw, libelf is an abstraction + # we are really using elfutils here + if spec.satisfies('@develop'): + args.append('-DLIBDWARF_INCLUDE_DIR=%s' % libelf.include) + args.append('-DLIBDWARF_LIBRARIES=%s' % join_path( + libelf.lib, "libdw." + dso_suffix)) if spec.satisfies('arch=linux-redhat7-ppc64le'): args.append('-Darch_ppc64_little_endian=1') args += std_cmake_args diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index 1f269c883d..faf972151e 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -41,7 +41,7 @@ class Elfutils(AutotoolsPackage): version('0.170', '03599aee98c9b726c7a732a2dd0245d5') version('0.168', '52adfa40758d0d39e5d5c57689bf38d6') - version('0.163', '77ce87f259987d2e54e4d87b86cbee41', preferred=True) + version('0.163', '77ce87f259987d2e54e4d87b86cbee41') depends_on('flex', type='build') depends_on('bison', type='build') diff --git a/var/spack/repos/builtin/packages/libdwarf/package.py b/var/spack/repos/builtin/packages/libdwarf/package.py index 80681d08d1..75288d66b1 100644 --- a/var/spack/repos/builtin/packages/libdwarf/package.py +++ b/var/spack/repos/builtin/packages/libdwarf/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * import sys +import os # Only build certain parts of dwarf because the other ones break. dwarf_dirs = ['libdwarf', 'dwarfdump2'] @@ -45,10 +46,12 @@ class Libdwarf(Package): url = "http://www.prevanders.net/libdwarf-20160507.tar.gz" list_url = homepage + version('20180129', 'c5e90fad4640f0d713ae8b986031f959') version('20160507', 'ae32d6f9ece5daf05e2d4b14822ea811') version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d') version('20130207', '64b42692e947d5180e162e46c689dfbf') version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db') + depends_on("elfutils@0.163", when='@20160507', type='link') depends_on("elf", type='link') depends_on('zlib', type='link') @@ -91,8 +94,12 @@ class Libdwarf(Package): make() libdwarf_name = 'libdwarf.{0}'.format(dso_suffix) + libdwarf1_name = 'libdwarf.{0}'.format(dso_suffix) + ".1" install('libdwarf.a', prefix.lib) - install('libdwarf.so', join_path(prefix.lib, libdwarf_name)) + install('libdwarf.so', join_path(prefix.lib, libdwarf1_name)) + if spec.satisfies('@20160507:'): + with working_dir(prefix.lib): + os.symlink(libdwarf1_name, libdwarf_name) install('libdwarf.h', prefix.include) install('dwarf.h', prefix.include) |