如何通过 Git 编译 Calindori?未知的 cmake 命令

如何通过 Git 编译 Calindori?未知的 cmake 命令

我想使用 Calindori,但它不在 Synaptic repo 中,我也找不到 Calindori 的 Snapd 或 Flathub。

链接到我尝试遵循的编译方向: https://invent.kde.org/plasma-mobile/calindori#compile

git clone https://invent.kde.org/kde/calindori.git
cd calindori
mkdir build
cd build
cmake ..
make -j$(nproc)

以下是我的终端中发生的情况(我不知道要输入什么才能使“cmake”正常工作):

s@s-virtualbox:~$ git clone https://invent.kde.org/kde/calindori.git
Cloning into 'calindori'...
remote: Enumerating objects: 4147, done.
remote: Counting objects: 100% (848/848), done.
remote: Compressing objects: 100% (308/308), done.
remote: Total 4147 (delta 595), reused 786 (delta 538), pack-reused 3299
Receiving objects: 100% (4147/4147), 1.69 MiB | 2.06 MiB/s, done.
Resolving deltas: 100% (3067/3067), done.
s@s-virtualbox:~$ cd calindori
s@s-virtualbox:~/calindori$ mkdir build
s@s-virtualbox:~/calindori$ cd build
s@s-virtualbox:~/calindori/build$ cmake ..
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:16 (find_package):
  Could not find a package configuration file provided by "ECM" (requested
  version 5.62.0) with any of the following names:

    ECMConfig.cmake
    ecm-config.cmake

  Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"
  to a directory containing one of the above files.  If "ECM" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/s/calindori/build/CMakeFiles/CMakeOutput.log".
s@s-virtualbox:~/calindori/build$ make -j$(nproc)
make: *** No targets specified and no makefile found.  Stop.
s@s-virtualbox:~/calindori/build$

这些步骤在我的“主”文件夹中为 calindori 创建了一个文件夹,其中包含一些文件,但当前状态下没有任何可执行文件。我不知道在“cmake”之后要输入什么,Git Readme 说明中给出的“..”显然没有任何用处。

////////////////////////////\\\\\

[更新,第二天!]

我正在 KDE Plasma 中基于 Debian 的 Sparky Linux 7 上重新尝试此操作,因为当更新的响应传来时,我昨晚已经完全破坏了我的 Ubuntu 安装。

在安装了那么多软件包之后,当需要“cmake”时我仍然缺少一些东西。

这是 Konsole 中的 cmake 步骤:

s@s-virtualbox:~/Downloads/calindori/build$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=RelWithDebInfo

-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Installing in /usr/local. Run /home/s/Downloads/calindori/build/prefix.sh to set the environment for calindori.
-- Could not set up the appstream test. appstreamcli is missing.
fatal: HEAD does not point to a branch
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:112 (message):
  Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
  /usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
  CMakeLists.txt:46 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found KF5Config: /usr/lib/x86_64-linux-gnu/cmake/KF5Config/KF5ConfigConfig.cmake (found version "5.88.0") 
-- Found KF5Kirigami2: /usr/lib/x86_64-linux-gnu/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake (found version "5.88.0") 
-- Could NOT find KF5I18n (missing: KF5I18n_DIR)
-- Could NOT find KF5I18n: found neither KF5I18nConfig.cmake nor kf5i18n-config.cmake 
-- Found KF5CoreAddons: /usr/lib/x86_64-linux-gnu/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.88.0") 
-- Found KF5CalendarCore: /usr/lib/x86_64-linux-gnu/cmake/KF5CalendarCore/KF5CalendarCoreConfig.cmake (found version "5.88.0") 
-- Could NOT find KF5Notifications (missing: KF5Notifications_DIR)
-- Could NOT find KF5Notifications: found neither KF5NotificationsConfig.cmake nor kf5notifications-config.cmake 
-- Found KF5People: /usr/lib/x86_64-linux-gnu/cmake/KF5People/KF5PeopleConfig.cmake (found version "5.88.0") 
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find KF5 (missing: I18n Notifications) (found suitable version
  "5.88.0", minimum required is "5.62.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/ECM/find-modules/FindKF5.cmake:93 (find_package_handle_standard_args)
  CMakeLists.txt:46 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/s/Downloads/calindori/build/CMakeFiles/CMakeOutput.log".

回到cmake:

s@s-virtualbox:~/Downloads/calindori/build$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=RelWithDebInfo
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Installing in /usr/local. Run /home/s/Downloads/calindori/build/prefix.sh to set the environment for calindori.
-- Could not set up the appstream test. appstreamcli is missing.
fatal: HEAD does not point to a branch
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:112 (message):
  Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
  /usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
  CMakeLists.txt:46 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found KF5Config: /usr/lib/x86_64-linux-gnu/cmake/KF5Config/KF5ConfigConfig.cmake (found version "5.88.0") 
-- Found KF5Kirigami2: /usr/lib/x86_64-linux-gnu/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake (found version "5.88.0") 
-- Could NOT find KF5I18n (missing: KF5I18n_DIR)
-- Could NOT find KF5I18n: found neither KF5I18nConfig.cmake nor kf5i18n-config.cmake 
-- Found KF5CoreAddons: /usr/lib/x86_64-linux-gnu/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.88.0") 
-- Found KF5CalendarCore: /usr/lib/x86_64-linux-gnu/cmake/KF5CalendarCore/KF5CalendarCoreConfig.cmake (found version "5.88.0") 
-- Could NOT find KF5Notifications (missing: KF5Notifications_DIR)
-- Could NOT find KF5Notifications: found neither KF5NotificationsConfig.cmake nor kf5notifications-config.cmake 
-- Found KF5People: /usr/lib/x86_64-linux-gnu/cmake/KF5People/KF5PeopleConfig.cmake (found version "5.88.0") 
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find KF5 (missing: I18n Notifications) (found suitable version
  "5.88.0", minimum required is "5.62.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/ECM/find-modules/FindKF5.cmake:93 (find_package_handle_standard_args)
  CMakeLists.txt:46 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/s/Downloads/calindori/build/CMakeFiles/CMakeOutput.log".

////////////\\\\

[更新:可能成功吗?]

我必须下载一些额外的软件包才能达到这一步,即:( kf5-messagelib-data
此外,Synaptic 存储库中以以下内容开头的任何软件包:)“libkf5noti”也被下载了。

总共至少有 60 个包(包括依赖项,大约 20 个)...

终端会话:

s@s-virtualbox:~$ qdbus org.kde.kded5 /kded unloadModule kscreen
true
s@s-virtualbox:~$ cd ~/Downloads
s@s-virtualbox:~/Downloads$ git clone https://invent.kde.org/kde/calindori.git -b v21.08
Cloning into 'calindori'...
remote: Enumerating objects: 4147, done.
remote: Counting objects: 100% (848/848), done.
remote: Compressing objects: 100% (308/308), done.
remote: Total 4147 (delta 595), reused 786 (delta 538), pack-reused 3299
Receiving objects: 100% (4147/4147), 1.69 MiB | 2.02 MiB/s, done.
Resolving deltas: 100% (3067/3067), done.
Note: switching to 'f739058093ab148d2e66ffe4ff7f028edf2dde86'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

s@s-virtualbox:~/Downloads$ cd calindori
s@s-virtualbox:~/Downloads/calindori$ mkdir build
s@s-virtualbox:~/Downloads/calindori$ cd build
s@s-virtualbox:~/Downloads/calindori/build$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=RelWithDebInfo
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Installing in /usr/local. Run /home/s/Downloads/calindori/build/prefix.sh to set the environment for calindori.
-- Could not set up the appstream test. appstreamcli is missing.
fatal: HEAD does not point to a branch
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:112 (message):
  Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
  /usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
  CMakeLists.txt:46 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found KF5Config: /usr/lib/x86_64-linux-gnu/cmake/KF5Config/KF5ConfigConfig.cmake (found version "5.88.0") 
-- Found KF5Kirigami2: /usr/lib/x86_64-linux-gnu/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake (found version "5.88.0") 
-- Found Gettext: /usr/bin/msgmerge (found version "0.21") 
-- Found KF5I18n: /usr/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nConfig.cmake (found version "5.88.0") 
-- Found KF5CoreAddons: /usr/lib/x86_64-linux-gnu/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.88.0") 
-- Found KF5CalendarCore: /usr/lib/x86_64-linux-gnu/cmake/KF5CalendarCore/KF5CalendarCoreConfig.cmake (found version "5.88.0") 
-- Found KF5Notifications: /usr/lib/x86_64-linux-gnu/cmake/KF5Notifications/KF5NotificationsConfig.cmake (found version "5.88.0") 
-- Found KF5People: /usr/lib/x86_64-linux-gnu/cmake/KF5People/KF5PeopleConfig.cmake (found version "5.88.0") 
-- Found KF5: success (found suitable version "5.88.0", minimum required is "5.62.0") found components: Config Kirigami2 I18n CoreAddons CalendarCore Notifications People 
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:112 (message):
  Your project should require at least CMake 3.16.0 to use FindKF5.cmake
Call Stack (most recent call first):
  /usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check)
  CMakeLists.txt:58 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found KF5DBusAddons: /usr/lib/x86_64-linux-gnu/cmake/KF5DBusAddons/KF5DBusAddonsConfig.cmake (found version "5.88.0") 
-- Found KF5: success (found suitable version "5.88.0", minimum required is "5.62.0") found components: DBusAddons 
-- The following REQUIRED packages have been found:

 * ECM (required version >= 5.62.0)
 * Qt5Qml
 * Qt5QmlModels (required version >= 5.15.2)
 * Qt5Quick
 * Qt5QuickControls2
 * Qt5Svg
 * Qt5Network
 * Qt5Test
 * KF5Config (required version >= 5.62.0)
 * KF5Kirigami2 (required version >= 5.62.0)
 * Gettext
 * KF5I18n (required version >= 5.62.0)
 * KF5CoreAddons (required version >= 5.62.0)
 * KF5CalendarCore (required version >= 5.62.0)
 * Qt5Gui (required version >= 5.15.2)
 * KF5Notifications (required version >= 5.62.0)
 * Qt5Core (required version >= 5.15.2)
 * Qt5Widgets (required version >= 5.15.2)
 * KF5People (required version >= 5.62.0)
 * Qt5 (required version >= 5.14.0)
 * Qt5DBus (required version >= 5.15.2)
 * KF5DBusAddons (required version >= 5.62.0)
 * KF5 (required version >= 5.62.0)

-- Configuring done
-- Generating done
-- Build files have been written to: /home/s/Downloads/calindori/build
s@s-virtualbox:~/Downloads/calindori/build$ make -j$(nproc)
[  3%] Automatic MOC for target calindori
[  3%] Built target calindori_autogen
[  6%] Automatic RCC for resources.qrc
[  9%] Building CXX object src/CMakeFiles/calindori.dir/calindori_autogen/mocs_compilation.cpp.o
[ 12%] Building CXX object src/CMakeFiles/calindori.dir/main.cpp.o
[ 15%] Building CXX object src/CMakeFiles/calindori.dir/calindoriconfig.cpp.o
[ 18%] Building CXX object src/CMakeFiles/calindori.dir/localcalendar.cpp.o
[ 21%] Building CXX object src/CMakeFiles/calindori.dir/incidencealarmsmodel.cpp.o
[ 24%] Building CXX object src/CMakeFiles/calindori.dir/daysofmonthmodel.cpp.o
[ 27%] Building CXX object src/CMakeFiles/calindori.dir/recurrenceperiodmodel.cpp.o
[ 30%] Building CXX object src/CMakeFiles/calindori.dir/daysofmonthincidencemodel.cpp.o
[ 33%] Building CXX object src/CMakeFiles/calindori.dir/incidencemodel.cpp.o
[ 36%] Building CXX object src/CMakeFiles/calindori.dir/alarmchecker.cpp.o
[ 39%] Building CXX object src/CMakeFiles/calindori.dir/datahandler.cpp.o
[ 42%] Building CXX object src/CMakeFiles/calindori.dir/calendarcontroller.cpp.o
[ 45%] Building CXX object src/CMakeFiles/calindori.dir/attendeesmodel.cpp.o
[ 48%] Building CXX object src/CMakeFiles/calindori.dir/calindori_autogen/EWIEGA46WW/qrc_resources.cpp.o
[ 51%] Linking CXX executable ../bin/calindori
[ 51%] Built target calindori
[ 54%] Automatic MOC for target calindac
[ 54%] Built target calindac_autogen
[ 57%] Generating powermanagementadaptor.cpp, powermanagementadaptor.h
[ 60%] Generating powermanagementadaptor.moc
[ 63%] Generating calindacadaptor.cpp, calindacadaptor.h
[ 66%] Generating calindacadaptor.moc
[ 69%] Building CXX object calindac/CMakeFiles/calindac.dir/calindac_autogen/mocs_compilation.cpp.o
[ 72%] Building CXX object calindac/CMakeFiles/calindac.dir/calalarmclient.cpp.o
[ 75%] Building CXX object calindac/CMakeFiles/calindac.dir/calindacmain.cpp.o
[ 78%] Building CXX object calindac/CMakeFiles/calindac.dir/alarmsmodel.cpp.o
[ 81%] Building CXX object calindac/CMakeFiles/calindac.dir/alarmnotification.cpp.o
[ 84%] Building CXX object calindac/CMakeFiles/calindac.dir/notificationhandler.cpp.o
[ 87%] Building CXX object calindac/CMakeFiles/calindac.dir/solidwakeupbackend.cpp.o
[ 90%] Building CXX object calindac/CMakeFiles/calindac.dir/wakeupmanager.cpp.o
[ 93%] Building CXX object calindac/CMakeFiles/calindac.dir/calindacadaptor.cpp.o
[ 96%] Building CXX object calindac/CMakeFiles/calindac.dir/powermanagementadaptor.cpp.o
[100%] Linking CXX executable ../bin/calindac
[100%] Built target calindac
s@s-virtualbox:~/Downloads/calindori/build$ sudo make install
[sudo] password for s: 
Sorry, try again.
[sudo] password for s: 
[  3%] Automatic MOC for target calindori
[  3%] Built target calindori_autogen
Consolidate compiler generated dependencies of target calindori
[ 51%] Built target calindori
[ 54%] Automatic MOC for target calindac
[ 54%] Built target calindac_autogen
Consolidate compiler generated dependencies of target calindac
[100%] Built target calindac
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/share/metainfo/org.kde.calindori.appdata.xml
-- Installing: /usr/local/share/applications/org.kde.calindori.desktop
-- Installing: /usr/local/bin/calindori
-- Set runtime path of "/usr/local/bin/calindori" to "/usr/local/lib/x86_64-linux-gnu"
-- Installing: /usr/local/share/icons/hicolor/scalable/apps/calindori.svg
-- Installing: /usr/local/bin/calindac
-- Set runtime path of "/usr/local/bin/calindac" to "/usr/local/lib/x86_64-linux-gnu"
-- Installing: /usr/local/etc/xdg/autostart/org.kde.calindac.desktop
-- Installing: /usr/local/share/knotifications5/calindac.notifyrc
-- Installing: /usr/local/share/dbus-1/services/org.kde.calindac.service
s@s-virtualbox:~/Downloads/calindori/build$ 
s@s-virtualbox:~/Downloads/calindori/build$ qdbus org.kde.kded5 /kde unloadModule -kscreen
Cannot find '.unloadModule' in object /kde at org.kde.kded5
s@s-virtualbox:~/Downloads/calindori/build$ qdbus org.kde.kded5 /kded unloadModule -kscreen
false
s@s-virtualbox:~/Downloads/calindori/build$ qdbus org.kde.kded5 /kded unloadModule kscreen
true
s@s-virtualbox:~/Downloads/calindori/build$ 

接下来我将尝试执行“calindori”。

答案1

您必须通过咨询来安装构建依赖项ArchLinux AUR PKGBUILD并首先手动重试

sudo apt-get update
sudo apt-get install git build-essential qtbase5-dev qtchooser qt5-qmake \
qtbase5-dev-tools cmake extra-cmake-modules libqt5svg5-dev qtdeclarative5-dev \
qtquickcontrols2-5-dev libkf5config-dev kirigami2-dev libkf5i18n-dev libkf5coreaddons-dev \
libkf5calendarcore-dev libkf5notifications-dev libkf5people-dev libkf5dbusaddons-dev \
qml-module-org-kde-people breeze adwaita-icon-theme-full libadwaitaqt-dev \
gnome-themes-extra qml-module-org-kde-kirigami2 breeze-gtk-theme

然后克隆相应的存储库v21.08 标签/版本通常适合您的 Ubuntu 21.10:

cd ~/Downloads
git clone https://invent.kde.org/kde/calindori.git -b v21.08
cd calindori
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=RelWithDebInfo

make -j$(nproc)
sudo make install

最后运行 Calindoricalindori并享受。

相关内容