diff --git a/0001-fixed-build-error.patch b/0001-fixed-build-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..6d6a478ab269fd93d6c3ae964ebc98d6a25b3d5e --- /dev/null +++ b/0001-fixed-build-error.patch @@ -0,0 +1,168 @@ +From a445eb565b0fb6c2af94dfce53bf092e72053f45 Mon Sep 17 00:00:00 2001 +From: root +Date: Wed, 24 May 2023 18:05:51 +0800 +Subject: [PATCH 1/1] fixed build error + +--- + configure | 12 ++++++------ + src/include/gnu_demangle.h | 2 +- + src/lib/binutils/BinUtils.cpp | 2 +- + src/lib/profile/finalizers/directclassification.cpp | 2 +- + src/lib/profile/finalizers/intel_def_use_graph.cpp | 2 +- + src/lib/profile/finalizers/kernelsyms.cpp | 2 +- + src/lib/profile/finalizers/logical.cpp | 2 +- + src/lib/support-lean/demangle.c | 2 +- + src/lib/support-lean/{demangle.h => hpcdemangle.h} | 0 + src/tool/hpcstruct/Makefile.in | 2 +- + 10 files changed, 14 insertions(+), 14 deletions(-) + rename src/lib/support-lean/{demangle.h => hpcdemangle.h} (100%) + +diff --git a/configure b/configure +index 33645f1..cd7dde6 100755 +--- a/configure ++++ b/configure +@@ -20552,16 +20552,16 @@ $as_echo_n "checking for dyninst... " >&6; } + + case "${DYNINST}" in + /* ) +- if test -f "${DYNINST}/include/Symtab.h" \ +- && test -f "${DYNINST}/include/CFG.h" ++ if test -f "${DYNINST}/include/dyninst/Symtab.h" \ ++ && test -f "${DYNINST}/include/dyninst/CFG.h" + then : ; else + as_fn_error $? "invalid dyninst directory: $DYNINST" "$LINENO" 5 + fi +- DYNINST_IFLAGS="-I${DYNINST}/include" ++ DYNINST_IFLAGS="-I${DYNINST}/include/dyninst" + + for lib in $multilib_path ; do + dir="${DYNINST}/$lib" +- if test -f "${dir}/libparseAPI.so" ; then ++ if test -f "${dir}/dyninst/libparseAPI.so" ; then + DYNINST_LIB_DIR="$dir" + DYNINST_COPY=yes + break +@@ -20670,10 +20670,10 @@ found_libiberty=no + case "$LIBIBERTY" in + /* ) + # demangle.h must exist +- if test -f "${LIBIBERTY}/include/libiberty/demangle.h" ; then ++ if test -f "${LIBIBERTY}/include/demangle.h" ; then + LIBIBERTY_IFLAGS="-I${LIBIBERTY}/include" + else +- as_fn_error $? "unable to find libiberty/demangle.h in: $LIBIBERTY" "$LINENO" 5 ++ as_fn_error $? "unable to find demangle.h in: $LIBIBERTY" "$LINENO" 5 + fi + + for lib in $multilib_path ; do +diff --git a/src/include/gnu_demangle.h b/src/include/gnu_demangle.h +index 2e62dfb..09b28f6 100644 +--- a/src/include/gnu_demangle.h ++++ b/src/include/gnu_demangle.h +@@ -65,7 +65,7 @@ + #define HAVE_DECL_BASENAME 1 + #endif + +-#include ++#include + + /* Undo possibly mischievous macros in binutils/include/ansidecl.h */ + #undef inline +diff --git a/src/lib/binutils/BinUtils.cpp b/src/lib/binutils/BinUtils.cpp +index e8bf27b..a135f05 100644 +--- a/src/lib/binutils/BinUtils.cpp ++++ b/src/lib/binutils/BinUtils.cpp +@@ -49,7 +49,7 @@ using std::string; + + #include // for 'free' + +-#include ++#include + #include + + #include "BinUtils.hpp" +diff --git a/src/lib/profile/finalizers/directclassification.cpp b/src/lib/profile/finalizers/directclassification.cpp +index 42d2fd9..50d7eb8 100644 +--- a/src/lib/profile/finalizers/directclassification.cpp ++++ b/src/lib/profile/finalizers/directclassification.cpp +@@ -46,7 +46,7 @@ + + #include "directclassification.hpp" + +-#include "lib/support-lean/demangle.h" ++#include "lib/support-lean/hpcdemangle.h" + #include "pipeline.hpp" + + #include +diff --git a/src/lib/profile/finalizers/intel_def_use_graph.cpp b/src/lib/profile/finalizers/intel_def_use_graph.cpp +index c4ae469..f862473 100644 +--- a/src/lib/profile/finalizers/intel_def_use_graph.cpp ++++ b/src/lib/profile/finalizers/intel_def_use_graph.cpp +@@ -60,7 +60,7 @@ + + #include "intel_def_use_graph.hpp" + #include "pipeline.hpp" +-#include ++#include + + + using namespace hpctoolkit; +diff --git a/src/lib/profile/finalizers/kernelsyms.cpp b/src/lib/profile/finalizers/kernelsyms.cpp +index 760320b..e0d1b35 100644 +--- a/src/lib/profile/finalizers/kernelsyms.cpp ++++ b/src/lib/profile/finalizers/kernelsyms.cpp +@@ -46,7 +46,7 @@ + + #include "kernelsyms.hpp" + +-#include "lib/support-lean/demangle.h" ++#include "lib/support-lean/hpcdemangle.h" + #include "pipeline.hpp" + #include "../util/lzmastream.hpp" + +diff --git a/src/lib/profile/finalizers/logical.cpp b/src/lib/profile/finalizers/logical.cpp +index 63fdd30..43e6a7e 100644 +--- a/src/lib/profile/finalizers/logical.cpp ++++ b/src/lib/profile/finalizers/logical.cpp +@@ -46,7 +46,7 @@ + + #include "logical.hpp" + +-#include "lib/support-lean/demangle.h" ++#include "lib/support-lean/hpcdemangle.h" + #include "lib/prof-lean/hpcfmt.h" + + #include +diff --git a/src/lib/support-lean/demangle.c b/src/lib/support-lean/demangle.c +index 2f70e3f..4c88c2b 100644 +--- a/src/lib/support-lean/demangle.c ++++ b/src/lib/support-lean/demangle.c +@@ -58,7 +58,7 @@ + + #include + #include +-#include ++#include + + #define DEMANGLE_FLAGS (DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE | DMGL_RET_DROP) + +diff --git a/src/lib/support-lean/demangle.h b/src/lib/support-lean/hpcdemangle.h +similarity index 100% +rename from src/lib/support-lean/demangle.h +rename to src/lib/support-lean/hpcdemangle.h +diff --git a/src/tool/hpcstruct/Makefile.in b/src/tool/hpcstruct/Makefile.in +index 78fa78f..8319e09 100644 +--- a/src/tool/hpcstruct/Makefile.in ++++ b/src/tool/hpcstruct/Makefile.in +@@ -284,7 +284,7 @@ BOOST_COPY_LIST = @BOOST_COPY_LIST@ + + # Fixme: new elfutils from spack wants bzip, xz and zlib. + BOOST_IFLAGS = @BOOST_IFLAGS@ +-BOOST_LFLAGS = @BOOST_LFLAGS@ ++BOOST_LFLAGS = @BOOST_LFLAGS@ -lm @BOOST_LIB_DIR@/libboost_graph.a + BOOST_LIB_DIR = @BOOST_LIB_DIR@ + BZIP_COPY = @BZIP_COPY@ + BZIP_LIB = @BZIP_LIB@ +-- +2.33.0 + diff --git a/hpctoolkit-2023.03.01.tar.gz b/hpctoolkit-2023.03.01.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..57fa466bad4c4545b82b35b48a5b27fd649aca9c Binary files /dev/null and b/hpctoolkit-2023.03.01.tar.gz differ diff --git a/hpctoolkit.spec b/hpctoolkit.spec new file mode 100644 index 0000000000000000000000000000000000000000..e1b1a5263bb5f45a26872b6cd95834a1e8e74cd4 --- /dev/null +++ b/hpctoolkit.spec @@ -0,0 +1,41 @@ +Name: hpctoolkit +Version: 2023.03.01 +Release: 1%{?dist} +Summary: HPCToolkit is an integrated suite of tools for measurement and analysis of program performance on computers ranging from multicore desktop systems to the nation's largest supercomputers. HPCToolkit provides accurate measurements of a program's work, resource consumption, and inefficiency, correlates these metrics with the program's source code, works with multilingual, fully optimized binaries, has very low measurement overhead, and scales to large parallel systems. HPCToolkit's measurements provide support for analyzing a program execution cost, inefficiency, and scaling characteristics both within and across nodes of a parallel system. + +Group: Development/Tools +License: BSD 3-Clause +URL: https://github.com/HPCToolkit/hpctoolkit +Source0: hpctoolkit-2023.03.01.tar.gz + +Patch1: 0001-fixed-build-error.patch + +BuildRequires: binutils-devel elfutils-devel boost-devel xz-devel dyninst-devel yaml-cpp-devel xerces-c-devel tbb-devel perl + +%description +HPCToolkit is an integrated suite of tools for measurement and analysis of program performance on computers ranging from multicore desktop systems to the nation's largest supercomputers. HPCToolkit provides accurate measurements of a program's work, resource consumption, and inefficiency, correlates these metrics with the program's source code, works with multilingual, fully optimized binaries, has very low measurement overhead, and scales to large parallel systems. HPCToolkit's measurements provide support for analyzing a program execution cost, inefficiency, and scaling characteristics both within and across nodes of a parallel system. + +%prep +%setup -q +%patch1 -p1 + +%build +export LDFLAGS="$LDFLAGS -L/usr/lib64/dyninst" +./configure --with-libiberty=/usr --with-dyninst=/usr --with-boost=/usr --with-elfutils=/usr --with-lzma=/usr --with-xerces=/usr --with-yaml-cpp=/usr --with-tbb=/usr --prefix=/opt +make %{?_smp_mflags} + + +%install +make install DESTDIR=%{buildroot} + + +%files +%doc +/opt + + + + +%changelog +* Tue May 23 2023 liuxingxiang - 2023.03.01-1 +- initial release