From 19ae4cf20c61f93a9d77c206999e80d78e74e55a Mon Sep 17 00:00:00 2001 From: zhangxingrong Date: Thu, 25 Jul 2024 17:06:58 +0800 Subject: [PATCH] Fixed dependency error --- autofdo.spec | 9 +++++++-- backport-Fixed-dependency-error.patch | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 backport-Fixed-dependency-error.patch diff --git a/autofdo.spec b/autofdo.spec index 25ab027..e0bec47 100644 --- a/autofdo.spec +++ b/autofdo.spec @@ -1,6 +1,6 @@ Name: autofdo Version: 0.19 -Release: 3.20231228.git0e296280 +Release: 4.20231228.git0e296280 Summary: A tool to convert perf.data profile to AutoFDO profile License: Apache-2.0 URL: https://github.com/google/autofdo @@ -8,6 +8,8 @@ URL: https://github.com/google/autofdo # so remove the GIT information and repackage it. Source0: %{name}-%{version}.tar.xz +Patch1: backport-Fixed-dependency-error.patch + BuildRequires: gcc gcc-c++ libtool git cmake elfutils-libelf-devel openssl-devel pkg-config ninja-build gtest libunwind-devel protobuf-devel Requires: glibc openssl-libs elfutils libgcc libstdc++ zlib @@ -16,7 +18,7 @@ This package contains a tool to convert perf.data profile to AutoFDO profile that can be used by GCC and LLVM. %prep -%autosetup +%autosetup -p1 %build cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=. ./ @@ -35,6 +37,9 @@ cp %{_builddir}/%{name}-%{version}/profile_merger ./ %{_bindir}/profile_merger %changelog +* Thu Jul 25 2024 zhangxingrong - 0.19-4.20231228.git0e296280 +- Fixed dependency error. + * Fri Dec 22 2023 zhaozhenyu - 0.19-3.20231228.git0e296280 - Type:update - ID:NA diff --git a/backport-Fixed-dependency-error.patch b/backport-Fixed-dependency-error.patch new file mode 100644 index 0000000..f6b7d5f --- /dev/null +++ b/backport-Fixed-dependency-error.patch @@ -0,0 +1,25 @@ +From 34bb61cf446c16872c4d233d20f08c1075d14d8d Mon Sep 17 00:00:00 2001 +From: Han Shen +Date: Wed, 3 Apr 2024 17:20:20 -0700 +Subject: [PATCH] Fixed dependency error. + +"llvm/IR/IntrinsicEnums.inc", which is part of LLVMDebugInfoDWARF, is required when building create_llvm_prof.cc Added LLVMDebugInfoDWARF to create_llvm_prof.cc's dep list. + +It is a confluence of circumstances that this error was not caught while building on my workstation, the reason being that it has so many cores (>100), that LLVMDebugInfoDWARF is built as other's deplist, prior to create_llvm_prof.cc. I reproduced it when building on my other workstation with 24 cores. +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b8d67e..5e63c73 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -214,7 +214,7 @@ function (config_with_llvm) + add_dependencies(llvm_propeller_mock_whole_program_info llvm_propeller_options) + add_dependencies(llvm_propeller_mock_whole_program_info llvm_propeller_cfg_proto) + add_library(create_llvm_prof_object OBJECT create_llvm_prof.cc) +- add_dependencies(create_llvm_prof_object llvm_propeller_options) ++ add_dependencies(create_llvm_prof_object llvm_propeller_options LLVMDebugInfoDWARF) + + add_library(sample_reader OBJECT sample_reader.cc) + target_include_directories(sample_reader PUBLIC util) -- Gitee