构建Massif-Visualizer:包含找不到加载文件CMakeFindDependencyMacro [英] Building massif-visualizer: include could not find load file CMakeFindDependencyMacro

查看:345
本文介绍了构建Massif-Visualizer:包含找不到加载文件CMakeFindDependencyMacro的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在CentOS 7上构建 massif-visualizer 。不幸的是,我有尝试猜测依赖项,因为它们未在 INSTALL 文件中列出。到目前为止:

  yum install git 
yum install kdelibs-devel extra-cmake-modules \
qt5-qtsvg-devel qt5-qtxmlpatterns-devel \
kf5-kparts-devel kf5-karchive-devel
git clone https://github.com/KDE/massif-visualizer
cd massif-visualizer
mkdir构建
(cd build&& cmake ..&&&&& make install)

那些Qt5和KF5程序包主要是通过反复试验而添加到 yum 命令中的,并且从CMake错误消息…但我似乎无法弄清楚如何解决这些最后的错误:

 -无法设置应用程序流测试。 appstreamcli丢失。 
在/usr/lib64/cmake/KF5Archive/KF5ArchiveConfig.cmake处的CMake错误:37(include):
include找不到加载文件:

CMakeFindDependencyMacro
调用堆栈(最近一次调用优先):
/usr/share/ECM/find-modules/FindKF5.cmake:74(find_package)
CMakeLists.txt:34(find_package)


在/usr/lib64/cmake/KF5Archive/KF5ArchiveConfig.cmake中的CMake错误:38(find_dependency):
未知的CMake命令 find_dependency。
调用堆栈(最近调用优先):
/usr/share/ECM/find-modules/FindKF5.cmake:74(find_package)
CMakeLists.txt:34(find_package)

这是因为在CentOS 7上CMake(2.8.12.2)太旧了吗?还是其他?

解决方案

是的,CMake 2.8.12.2太旧了。改为使用CMake 3:

  yum install epel-release 
yum install cmake3

( cd build&& cmake3 ..&&& make install)
#^

现在,安装程序抱怨KChart,但这是一个单独的问题。






最后,这是我的完整步骤:

  yum install epel-release 
yum install subversion git cmake3 tar wget
yum install boost boost-devel
yum install kdelibs-devel extra-cmake-modules \
graphviz-devel kdepim-devel \
qt5-qtsvg-devel qt5-qtxmlpatterns-devel \
kf5-kparts-devel kf5-karchive-devel b
kf5-kiconthemes-devel kf5-kdoctools-devel
git clone https://github.com/KDE/massif-visualizer
wget https://download.kde.org/stable/kgraphviewer/2.4.0/kgraphviewer-2.4.0.tar.xz
wget https://download.kde.org/stable/kdiagram/2.6。 0 / src / kdiagram-2.6.0.tar.xz
tar xf kgraphviewer-2.4.0.tar.xz
tar xf kdiagram-2.6.0.tar.xz

kgraphviewer-2.4.0 kdiagram-2.6.0中的DIR DIR $ b do
cd $ DIR
mkdir build
(cd build& cmake3 ..&&制作&&进行安装)
cd-
完成

然后 valgrind --tool = massif myApp ,最后从KDE会话中的终端 p>

I am attempting to build massif-visualizer on CentOS 7. Unfortunately I'm having to try to guess at dependencies as they are not all listed in the INSTALL file. So far:

yum install git
yum install kdelibs-devel extra-cmake-modules \
            qt5-qtsvg-devel qt5-qtxmlpatterns-devel \
            kf5-kparts-devel kf5-karchive-devel
git clone https://github.com/KDE/massif-visualizer
cd massif-visualizer
mkdir build
(cd build && cmake .. && make && make install)

Those Qt5 and KF5 packages were added to the yum command largely by trial and error, and some pattern-matching from CMake error messages … but I cannot seem to figure out how to resolve these last errors:

-- Could not set up the appstream test. appstreamcli is missing.
CMake Error at /usr/lib64/cmake/KF5Archive/KF5ArchiveConfig.cmake:37 (include):
  include could not find load file:

    CMakeFindDependencyMacro
Call Stack (most recent call first):
  /usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package)
  CMakeLists.txt:34 (find_package)


CMake Error at /usr/lib64/cmake/KF5Archive/KF5ArchiveConfig.cmake:38 (find_dependency):
  Unknown CMake command "find_dependency".
Call Stack (most recent call first):
  /usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package)
  CMakeLists.txt:34 (find_package)

Is this because, on CentOS 7, CMake (2.8.12.2) is too old? Or something else?

解决方案

Yes, CMake 2.8.12.2 is too old. Use CMake 3 instead:

yum install epel-release
yum install cmake3

(cd build && cmake3 .. && make && make install)
#                 ^

Now the installation complains about KChart but that's a separate issue.


In the end, here are my complete steps:

yum install epel-release
yum install subversion git cmake3 tar wget
yum install boost boost-devel
yum install kdelibs-devel extra-cmake-modules \
   graphviz-devel kdepim-devel \
   qt5-qtsvg-devel qt5-qtxmlpatterns-devel \
   kf5-kparts-devel kf5-karchive-devel \
   kf5-kiconthemes-devel kf5-kdoctools-devel
git clone https://github.com/KDE/massif-visualizer
wget https://download.kde.org/stable/kgraphviewer/2.4.0/kgraphviewer-2.4.0.tar.xz
wget https://download.kde.org/stable/kdiagram/2.6.0/src/kdiagram-2.6.0.tar.xz
tar xf kgraphviewer-2.4.0.tar.xz
tar xf kdiagram-2.6.0.tar.xz

for DIR in kgraphviewer-2.4.0 kdiagram-2.6.0 massif-visualizer
do
   cd $DIR
   mkdir build
   (cd build && cmake3 .. && make && make install)
   cd -
done

Then valgrind --tool=massif myApp and finally massif-visualiser massif.out.<PID> from a terminal inside a KDE session.

这篇关于构建Massif-Visualizer:包含找不到加载文件CMakeFindDependencyMacro的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆