Bug 430551 - Fail to build heaptrack on mac os catalina
Summary: Fail to build heaptrack on mac os catalina
Status: RESOLVED FIXED
Alias: None
Product: Heaptrack
Classification: Applications
Component: general (show other bugs)
Version: 1.2.0
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Milian Wolff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-18 18:30 UTC by zhitingzhu
Modified: 2021-05-21 08:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhitingzhu 2020-12-18 18:30:03 UTC
SUMMARY
CMake fail to find KF5Service

STEPS TO REPRODUCE
1. I followed the instruction to add tap and install the kde components via homebrew
2. runs CMAKE_PREFIX_PATH=/usr/local/opt/qt PATH=$PATH:/usr/local/opt/gettext/bin cmake ..
3. 

OBSERVED RESULT
-- Found Boost: /usr/local/lib/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.41.0") found components: system filesystem iostreams
CMake Warning (dev) at /usr/local/Cellar/cmake/3.19.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:424 (message):
  The package name passed to `find_package_handle_standard_args` (ZSTD) does
  not match the name of the calling package (Zstd).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindZstd.cmake:15 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:31 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/local/lib/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.41.0") found components: iostreams program_options
CMake Warning at /usr/local/Cellar/cmake/3.19.1/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  By not providing "FindKF5Service.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "KF5Service", but CMake did not find one.

  Could not find a package configuration file provided by "KF5Service"
  (requested version 5.76.0) with any of the following names:

    KF5ServiceConfig.cmake
    kf5service-config.cmake

  Add the installation prefix of "KF5Service" to CMAKE_PREFIX_PATH or set
  "KF5Service_DIR" to a directory containing one of the above files.  If
  "KF5Service" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  /usr/local/lib/cmake/KF5KIO/KF5KIOConfig.cmake:35 (find_dependency)
  /usr/local/share/ECM/find-modules/FindKF5.cmake:53 (find_package)
  src/analyze/CMakeLists.txt:38 (find_package)


CMake Warning at /usr/local/share/ECM/find-modules/FindKF5.cmake:53 (find_package):
  Found package configuration file:

    /usr/local/lib/cmake/KF5KIO/KF5KIOConfig.cmake

  but it set KF5KIO_FOUND to FALSE so package "KF5KIO" is considered to be
  NOT FOUND.  Reason given by package:

  KF5KIO could not be found because dependency KF5Service could not be found.

Call Stack (most recent call first):
  src/analyze/CMakeLists.txt:38 (find_package)


-- Could NOT find KF5KIO (found version "5.76.0"), checked the following files:
    /usr/local/lib/cmake/KF5KIO/KF5KIOConfig.cmake (version 5.76.0)
    Reason given by package: KF5KIO could not be found because dependency KF5Service could not be found.

-- Could NOT find KF5 (missing: KIO) (found version "5.76.0")
-- The following OPTIONAL packages have been found:

 * Qt5Gui (required version >= 5.15.2)
 * Qt5 (required version >= 5.2.0)
 * ECM (required version >= 1.0.0)
 * KF5I18n
 * KF5ItemModels
 * KF5ThreadWeaver
 * KF5Auth (required version >= 5.76.0)
 * KF5Codecs (required version >= 5.76.0)
 * KF5WidgetsAddons (required version >= 5.76.0)
 * KF5ConfigWidgets
 * KF5CoreAddons (required version >= 5.76.0)
 * Qt5Core (required version >= 5.6.0)
 * Qt5Widgets (required version >= 5.6.0)

-- The following RECOMMENDED packages have been found:

 * Zstd
   Zstandard offers better (de)compression performance compared with gzip/zlib, making heaptrack faster and datafiles smaller.
 * KChart (required version >= 2.6.0)
   Required for the heaptrack_gui executable. Get it from the kdiagram module.

-- The following REQUIRED packages have been found:

 * Threads
 * ZLIB
 * boost_iostreams (required version == 1.74.0)
 * boost_headers (required version == 1.74.0)
 * boost_program_options (required version == 1.74.0)
 * Boost (required version >= 1.41.0)
 * Gettext

-- The following OPTIONAL packages have not been found:

 * KF5KIO
 * KF5

-- Configuring done
-- Generating done


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: Catalina 10.15.7
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 zhitingzhu 2020-12-19 21:28:15 UTC
For the cmake files installed, under /usr/local/lib/cmake, I didn't see a dir with KF5Service. The installed ones are:
lrwxr-xr-x    1 zzhu  admin     44 Dec 17 22:31 KChart -> ../../Cellar/kdiagram/2.7.0/lib/cmake/KChart
lrwxr-xr-x    1 zzhu  admin     53 Dec 17 11:08 KF5Archive -> ../../Cellar/kde-karchive/5.77.0/lib/cmake/KF5Archive
lrwxr-xr-x    1 zzhu  admin     50 Dec 17 15:42 KF5Attica -> ../../Cellar/kf5-attica/5.76.0/lib/cmake/KF5Attica
lrwxr-xr-x    1 zzhu  admin     47 Dec 17 15:33 KF5Auth -> ../../Cellar/kf5-kauth/5.76.0/lib/cmake/KF5Auth
lrwxr-xr-x    1 zzhu  admin     57 Dec 17 16:01 KF5Bookmarks -> ../../Cellar/kf5-kbookmarks/5.76.0/lib/cmake/KF5Bookmarks
lrwxr-xr-x    1 zzhu  admin     51 Dec 17 15:33 KF5Codecs -> ../../Cellar/kf5-kcodecs/5.76.0/lib/cmake/KF5Codecs
lrwxr-xr-x    1 zzhu  admin     59 Dec 17 15:45 KF5Completion -> ../../Cellar/kf5-kcompletion/5.76.0/lib/cmake/KF5Completion
lrwxr-xr-x    1 zzhu  admin     51 Dec 17 15:34 KF5Config -> ../../Cellar/kf5-kconfig/5.76.0/lib/cmake/KF5Config
lrwxr-xr-x    1 zzhu  admin     65 Dec 17 22:24 KF5ConfigWidgets -> ../../Cellar/kf5-kconfigwidgets/5.76.0/lib/cmake/KF5ConfigWidgets
lrwxr-xr-x    1 zzhu  admin     59 Dec 17 22:22 KF5CoreAddons -> ../../Cellar/kf5-kcoreaddons/5.76.0/lib/cmake/KF5CoreAddons
lrwxr-xr-x    1 zzhu  admin     49 Dec 17 15:43 KF5Crash -> ../../Cellar/kf5-kcrash/5.76.0/lib/cmake/KF5Crash
lrwxr-xr-x    1 zzhu  admin     59 Dec 17 15:43 KF5DBusAddons -> ../../Cellar/kf5-kdbusaddons/5.76.0/lib/cmake/KF5DBusAddons
lrwxr-xr-x    1 zzhu  admin     61 Dec 17 15:44 KF5GlobalAccel -> ../../Cellar/kf5-kglobalaccel/5.76.0/lib/cmake/KF5GlobalAccel
lrwxr-xr-x    1 zzhu  admin     57 Dec 17 15:34 KF5GuiAddons -> ../../Cellar/kf5-kguiaddons/5.76.0/lib/cmake/KF5GuiAddons
lrwxr-xr-x    1 zzhu  admin     47 Dec 17 22:31 KF5I18n -> ../../Cellar/kde-ki18n/5.77.0/lib/cmake/KF5I18n
lrwxr-xr-x    1 zzhu  admin     59 Dec 17 15:46 KF5IconThemes -> ../../Cellar/kf5-kiconthemes/5.76.0/lib/cmake/KF5IconThemes
lrwxr-xr-x    1 zzhu  admin     59 Dec 17 22:23 KF5ItemModels -> ../../Cellar/kf5-kitemmodels/5.76.0/lib/cmake/KF5ItemModels
lrwxr-xr-x    1 zzhu  admin     57 Dec 17 15:45 KF5ItemViews -> ../../Cellar/kf5-kitemviews/5.76.0/lib/cmake/KF5ItemViews
lrwxr-xr-x    1 zzhu  admin     59 Dec 17 16:02 KF5JobWidgets -> ../../Cellar/kf5-kjobwidgets/5.76.0/lib/cmake/KF5JobWidgets
lrwxr-xr-x    1 zzhu  admin     44 Dec 17 22:30 KF5KIO -> ../../Cellar/kf5-kio/5.76.0/lib/cmake/KF5KIO
lrwxr-xr-x    1 zzhu  admin     65 Dec 17 16:04 KF5Notifications -> ../../Cellar/kf5-knotifications/5.76.0/lib/cmake/KF5Notifications
lrwxr-xr-x    1 zzhu  admin     48 Dec 17 16:07 KF5Solid -> ../../Cellar/kf5-solid/5.76.0/lib/cmake/KF5Solid
lrwxr-xr-x    1 zzhu  admin     50 Dec 17 15:56 KF5Sonnet -> ../../Cellar/kf5-sonnet/5.76.0/lib/cmake/KF5Sonnet
lrwxr-xr-x    1 zzhu  admin     61 Dec 17 15:58 KF5TextWidgets -> ../../Cellar/kf5-ktextwidgets/5.76.0/lib/cmake/KF5TextWidgets
lrwxr-xr-x    1 zzhu  admin     62 Dec 17 22:31 KF5ThreadWeaver -> ../../Cellar/kde-threadweaver/5.77.0/lib/cmake/KF5ThreadWeaver
lrwxr-xr-x    1 zzhu  admin     51 Dec 17 16:06 KF5Wallet -> ../../Cellar/kf5-kwallet/5.76.0/lib/cmake/KF5Wallet
lrwxr-xr-x    1 zzhu  admin     65 Dec 17 15:35 KF5WidgetsAddons -> ../../Cellar/kf5-kwidgetsaddons/5.76.0/lib/cmake/KF5WidgetsAddons
lrwxr-xr-x    1 zzhu  admin     63 Dec 17 15:43 KF5WindowSystem -> ../../Cellar/kf5-kwindowsystem/5.76.0/lib/cmake/KF5WindowSystem
lrwxr-xr-x    1 zzhu  admin     51 Dec 17 16:00 KF5XmlGui -> ../../Cellar/kf5-kxmlgui/5.76.0/lib/cmake/KF5XmlGui
lrwxr-xr-x    1 zzhu  admin     44 Dec 17 22:31 KGantt -> ../../Cellar/kdiagram/2.7.0/lib/cmake/KGantt
Comment 2 Milian Wolff 2020-12-21 14:15:36 UTC
I don't have a mac, how did you install the other frameworks? kf5-service is just another one of those, just install it? If something is missing from the docs, please tell me what - but you'll have to debug it yourself on macos
Comment 3 zhitingzhu 2020-12-21 17:41:41 UTC
I'm following the readme's instruction:

# install dependencies
brew install kde-mac/kde/kf5-kcoreaddons kde-mac/kde/kf5-kitemmodels kde-mac/kde/kf5-kconfigwidgets \
             kde-mac/kde/kf5-kio kde-mac/kde/kdiagram \
             kde-extra-cmake-modules kde-ki18n kde-threadweaver \
             boost zstd gettext

I'm not sure what installs those cmake files.
Comment 4 zhitingzhu 2020-12-21 17:51:40 UTC
I'm not sure whether kf5service is installed. There's no such formula for kde-mac/kde/kf5-service.
Comment 5 zhitingzhu 2020-12-21 17:58:12 UTC
I'm also asking in kde mac's topic. Maybe someone there would have a clue.
Comment 6 Milian Wolff 2020-12-21 18:58:56 UTC
try:

brew install kde-mac/kde/kf5-kservice

but it's odd that this isn't pulled in automatically by requesting kio :shrug:

if you figure it out, please send in a patch to fix the documentation
Comment 7 zhitingzhu 2020-12-21 19:11:34 UTC
Thanks, I see the problem from the output:

Warning: kde-mac/kde/kf5-kservice 5.76.0 is already installed, it's just not linked
You can use `brew link kf5-kservice` to link this version.

kf5-kio did pull in the dependencies but it's not link. After brew link kf5-kservice, it works.