Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 813450 - kde-frameworks/* packages with find_package(X11 REQUIRED) make cmake fail for many KDE packages w/ USE=-X
Summary: kde-frameworks/* packages with find_package(X11 REQUIRED) make cmake fail for...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
: 813651 815772 816915 822066 828746 829706 830487 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-17 10:48 UTC by Perfect Gentleman
Modified: 2022-01-03 10:17 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
konsole build.log (konsole_build.log,10.14 KB, text/x-log)
2021-09-17 10:48 UTC, Perfect Gentleman
Details
gwenview build.log (gwenview_build.log,8.73 KB, text/x-log)
2021-09-17 10:49 UTC, Perfect Gentleman
Details
kdialog build.log (kdialog_build.log,6.72 KB, text/x-log)
2021-09-17 10:50 UTC, Perfect Gentleman
Details
kio-extras build.log (kio-extras_build.log,6.70 KB, text/x-log)
2021-09-17 10:50 UTC, Perfect Gentleman
Details
yakuake build.log (yakuake_build.log,9.10 KB, text/x-log)
2021-09-17 10:51 UTC, Perfect Gentleman
Details
Patch for kio-extras ebuild to make X optional via cmake option() (kio-extras-21.08.3-r1.ebuild.patch,635 bytes, patch)
2021-12-28 20:52 UTC, DanF
Details | Diff
Patch for kio-extras CMakeLists.txt to make X optional via cmake option() (kio-extras-21.08.3-fix-build-with-x11.patch,774 bytes, patch)
2021-12-28 20:54 UTC, DanF
Details | Diff
Patch for konsole ebuild to make X optional via cmake option() (konsole-21.08.3.ebuild.patch,313 bytes, patch)
2021-12-28 20:55 UTC, DanF
Details | Diff
Patch for konsole CMakeLists.txt to make X optional via cmake option() (konsole-21.08.3-fix-build-with-x11.patch,529 bytes, patch)
2021-12-28 20:55 UTC, DanF
Details | Diff
Patch for kinit ebuild to make X optional via cmake option() (kinit-5.88.0.ebuild.patch,447 bytes, patch)
2021-12-28 20:56 UTC, DanF
Details | Diff
Patch for kinit CMakeLists.txt to make X optional via cmake option() (kinit-5.88.0-fix-build-with-x11.patch,439 bytes, patch)
2021-12-28 20:57 UTC, DanF
Details | Diff
Patch for kio ebuild to make X optional via cmake option() (kio-5.88.0-r2.ebuild.patch,597 bytes, patch)
2021-12-28 20:58 UTC, DanF
Details | Diff
Patch for kio CMakeLists.txt to make X optional via cmake option() (kio-5.88.0-fix-build-with-x11.patch,555 bytes, patch)
2021-12-28 20:58 UTC, DanF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Perfect Gentleman 2021-09-17 10:48:55 UTC
Created attachment 739635 [details]
konsole build.log

-- 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:55 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found KF5Bookmarks: /usr/lib64/cmake/KF5Bookmarks/KF5BookmarksConfig.cmake (found version "5.86.0") 
-- Found KF5Config: /usr/lib64/cmake/KF5Config/KF5ConfigConfig.cmake (found version "5.86.0") 
-- Found KF5ConfigWidgets: /usr/lib64/cmake/KF5ConfigWidgets/KF5ConfigWidgetsConfig.cmake (found version "5.86.0") 
-- Found KF5CoreAddons: /usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.86.0") 
-- Found KF5Crash: /usr/lib64/cmake/KF5Crash/KF5CrashConfig.cmake (found version "5.86.0") 
-- Found KF5GlobalAccel: /usr/lib64/cmake/KF5GlobalAccel/KF5GlobalAccelConfig.cmake (found version "5.86.0") 
-- Found KF5GuiAddons: /usr/lib64/cmake/KF5GuiAddons/KF5GuiAddonsConfig.cmake (found version "5.86.0") 
-- Found KF5DBusAddons: /usr/lib64/cmake/KF5DBusAddons/KF5DBusAddonsConfig.cmake (found version "5.86.0") 
-- Found Gettext: /usr/bin/msgmerge (found version "0.21") 
-- Found KF5I18n: /usr/lib64/cmake/KF5I18n/KF5I18nConfig.cmake (found version "5.86.0") 
-- Found KF5IconThemes: /usr/lib64/cmake/KF5IconThemes/KF5IconThemesConfig.cmake (found version "5.86.0") 
CMake Warning at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/KF5WindowSystem/KF5WindowSystemConfig.cmake

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

  KF5WindowSystem could not be found because dependency X11 could not be
  found.

Call Stack (most recent call first):
  /usr/lib64/cmake/KF5KIO/KF5KIOConfig.cmake:54 (find_dependency)
  /usr/share/ECM/find-modules/FindKF5.cmake:52 (find_package)
  CMakeLists.txt:55 (find_package)


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

    /usr/lib64/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 KF5WindowSystem could not be
  found.

Call Stack (most recent call first):
  CMakeLists.txt:55 (find_package)


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

-- Found KF5NewStuff: /usr/lib64/cmake/KF5NewStuff/KF5NewStuffConfig.cmake (found version "5.86.0") 
-- Found KF5NewStuffCore: /usr/lib64/cmake/KF5NewStuffCore/KF5NewStuffCoreConfig.cmake (found version "5.86.0") 
-- Found KF5Notifications: /usr/lib64/cmake/KF5Notifications/KF5NotificationsConfig.cmake (found version "5.86.0") 
-- Found KF5NotifyConfig: /usr/lib64/cmake/KF5NotifyConfig/KF5NotifyConfigConfig.cmake (found version "5.86.0") 
CMake Warning at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/KF5WindowSystem/KF5WindowSystemConfig.cmake

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

  KF5WindowSystem could not be found because dependency X11 could not be
  found.

Call Stack (most recent call first):
  /usr/lib64/cmake/KF5KIO/KF5KIOConfig.cmake:54 (find_dependency)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /usr/lib64/cmake/KF5Parts/KF5PartsConfig.cmake:38 (find_dependency)
  /usr/share/ECM/find-modules/FindKF5.cmake:52 (find_package)
  CMakeLists.txt:55 (find_package)


CMake Warning at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Found package configuration file:

    /usr/lib64/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 KF5WindowSystem could not be
  found.

Call Stack (most recent call first):
  /usr/lib64/cmake/KF5Parts/KF5PartsConfig.cmake:38 (find_dependency)
  /usr/share/ECM/find-modules/FindKF5.cmake:52 (find_package)
  CMakeLists.txt:55 (find_package)


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

    /usr/lib64/cmake/KF5Parts/KF5PartsConfig.cmake

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

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

Call Stack (most recent call first):
  CMakeLists.txt:55 (find_package)


-- Could NOT find KF5Parts (found version "5.86.0"), checked the following files:
    /usr/lib64/cmake/KF5Parts/KF5PartsConfig.cmake (version 5.86.0)
    Reason given by package: KF5Parts could not be found because dependency KF5KIO could not be found.

-- Found KF5Pty: /usr/lib64/cmake/KF5Pty/KF5PtyConfig.cmake (found version "5.86.0") 
-- Found KF5Service: /usr/lib64/cmake/KF5Service/KF5ServiceConfig.cmake (found version "5.86.0") 
-- Found KF5TextWidgets: /usr/lib64/cmake/KF5TextWidgets/KF5TextWidgetsConfig.cmake (found version "5.86.0") 
-- Found KF5WidgetsAddons: /usr/lib64/cmake/KF5WidgetsAddons/KF5WidgetsAddonsConfig.cmake (found version "5.86.0") 
CMake Warning at /usr/share/ECM/find-modules/FindKF5.cmake:52 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/KF5WindowSystem/KF5WindowSystemConfig.cmake

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

  KF5WindowSystem could not be found because dependency X11 could not be
  found.

Call Stack (most recent call first):
  CMakeLists.txt:55 (find_package)


-- Could NOT find KF5WindowSystem (found version "5.86.0"), checked the following files:
    /usr/lib64/cmake/KF5WindowSystem/KF5WindowSystemConfig.cmake (version 5.86.0)
    Reason given by package: KF5WindowSystem could not be found because dependency X11 could not be found.

-- Found KF5XmlGui: /usr/lib64/cmake/KF5XmlGui/KF5XmlGuiConfig.cmake (found version "5.86.0") 
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find KF5 (missing: KIO Parts WindowSystem) (found suitable
  version "5.86.0", minimum required is "5.71.0")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/ECM/find-modules/FindKF5.cmake:93 (find_package_handle_standard_args)
  CMakeLists.txt:55 (find_package)
Comment 1 Perfect Gentleman 2021-09-17 10:49:40 UTC
Created attachment 739638 [details]
gwenview build.log
Comment 2 Perfect Gentleman 2021-09-17 10:50:22 UTC
Created attachment 739641 [details]
kdialog build.log
Comment 3 Perfect Gentleman 2021-09-17 10:50:46 UTC
Created attachment 739644 [details]
kio-extras build.log
Comment 4 Perfect Gentleman 2021-09-17 10:51:25 UTC
Created attachment 739647 [details]
yakuake build.log
Comment 5 Andreas Sturmlechner gentoo-dev 2021-09-22 11:14:48 UTC
Right.
Comment 6 Andreas Sturmlechner gentoo-dev 2021-09-22 11:15:27 UTC
*** Bug 813651 has been marked as a duplicate of this bug. ***
Comment 7 Andreas Sturmlechner gentoo-dev 2021-10-02 08:49:38 UTC
*** Bug 815772 has been marked as a duplicate of this bug. ***
Comment 8 Andreas Sturmlechner gentoo-dev 2021-10-08 07:00:52 UTC
*** Bug 816915 has been marked as a duplicate of this bug. ***
Comment 9 Andreas Sturmlechner gentoo-dev 2021-11-06 10:45:42 UTC
*** Bug 822066 has been marked as a duplicate of this bug. ***
Comment 10 Andreas Sturmlechner gentoo-dev 2021-11-24 14:37:07 UTC
List of kde-frameworks/* with optional X through find_package mechanism:

> kde-frameworks/kdelibs4support: $(cmake_use_find_package X X11)
> kde-frameworks/kdesu: $(cmake_use_find_package X X11)
> kde-frameworks/khtml: $(cmake_use_find_package X X11)
> kde-frameworks/kidletime: $(cmake_use_find_package X X11)
> kde-frameworks/kinit: $(cmake_use_find_package X X11)
> kde-frameworks/kio: $(cmake_use_find_package X X11)
> kde-frameworks/kjobwidgets: $(cmake_use_find_package X X11)
> kde-frameworks/knotifications: $(cmake_use_find_package X X11)
> kde-frameworks/kwindowsystem: $(cmake_use_find_package X X11)
> kde-frameworks/plasma: $(cmake_use_find_package X X11)

But there are also those with find_dependency(X11 REQUIRED) in .cmake package config files. This is bound to fail when running cmake of reverse dependencies with CMAKE_DISABLE_FIND_PACKAGE_X11=ON.

To make this work, each revdep would need to be patched to make X optional through a cmake option() instead of disabling find_package(X11).
Comment 11 Andreas Sturmlechner gentoo-dev 2021-11-24 16:52:13 UTC
For a detailed list:

$ for x in $(grep -l "libX11" kde-frameworks/*/*ebuild | sed -e "s:/.*/:/:" -e "s:-9999.ebuild::"); do echo; echo "$x:"; for y in $(grep -l "$x" */*/*-9999.ebuild); do grep -H "cmake_use_find_package.*X11)" $y; done; done

List without duplicates:

$ for x in $(grep -l "libX11" kde-frameworks/*/*ebuild | sed -e "s:/.*/:/:" -e "s:-9999.ebuild::"); do for y in $(grep -l "$x" */*/*-9999.ebuild); do grep -l "cmake_use_find_package.*X11)" $y; done; done | sort -u

kde-apps/gwenview/gwenview-9999.ebuild
kde-apps/kalarm/kalarm-9999.ebuild
kde-apps/kdialog/kdialog-9999.ebuild
kde-apps/kio-extras/kio-extras-9999.ebuild
kde-apps/knotes/knotes-9999.ebuild
kde-apps/konqueror/konqueror-9999.ebuild
kde-apps/konsole/konsole-9999.ebuild
kde-apps/korganizer/korganizer-9999.ebuild
kde-apps/kruler/kruler-9999.ebuild
kde-apps/ktouch/ktouch-9999.ebuild
kde-apps/yakuake/yakuake-9999.ebuild
kde-frameworks/kdelibs4support/kdelibs4support-9999.ebuild
kde-frameworks/khtml/khtml-9999.ebuild
kde-frameworks/kinit/kinit-9999.ebuild
kde-frameworks/kio/kio-9999.ebuild
kde-frameworks/knotifications/knotifications-9999.ebuild
kde-frameworks/plasma/plasma-9999.ebuild
kde-misc/colord-kde/colord-kde-9999.ebuild
kde-plasma/kinfocenter/kinfocenter-9999.ebuild
kde-plasma/libksysguard/libksysguard-9999.ebuild
media-gfx/digikam/digikam-9999.ebuild

Could be worse.
Comment 12 Andreas Sturmlechner gentoo-dev 2021-12-10 11:08:12 UTC
*** Bug 828746 has been marked as a duplicate of this bug. ***
Comment 13 Andreas Sturmlechner gentoo-dev 2021-12-20 10:32:26 UTC
*** Bug 829706 has been marked as a duplicate of this bug. ***
Comment 14 DanF 2021-12-28 20:52:44 UTC
Created attachment 760687 [details, diff]
Patch for kio-extras ebuild to make X optional via cmake option()
Comment 15 DanF 2021-12-28 20:54:24 UTC
Created attachment 760688 [details, diff]
Patch for kio-extras CMakeLists.txt to make X optional via cmake option()
Comment 16 DanF 2021-12-28 20:55:26 UTC
Created attachment 760689 [details, diff]
Patch for konsole ebuild to make X optional via cmake option()
Comment 17 DanF 2021-12-28 20:55:48 UTC
Created attachment 760690 [details, diff]
Patch for konsole CMakeLists.txt to make X optional via cmake option()
Comment 18 DanF 2021-12-28 20:56:46 UTC
Created attachment 760691 [details, diff]
Patch for kinit ebuild to make X optional via cmake option()
Comment 19 DanF 2021-12-28 20:57:19 UTC
Created attachment 760692 [details, diff]
Patch for kinit CMakeLists.txt to make X optional via cmake option()
Comment 20 DanF 2021-12-28 20:58:15 UTC
Created attachment 760693 [details, diff]
Patch for kio ebuild to make X optional via cmake option()
Comment 21 DanF 2021-12-28 20:58:40 UTC
Created attachment 760694 [details, diff]
Patch for kio CMakeLists.txt to make X optional via cmake option()
Comment 22 Andreas Sturmlechner gentoo-dev 2022-01-03 10:17:45 UTC
*** Bug 830487 has been marked as a duplicate of this bug. ***