Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile on kUbuntu 20.04 (since commit #3f724dcf436233d24abe9f2dfc450ba5d0ac00dd) #57

Closed
xalt7x opened this issue Nov 3, 2021 · 5 comments

Comments

@xalt7x
Copy link

xalt7x commented Nov 3, 2021

Tried on a clean Kubuntu 20.04 install

  1. ticked "Source code" on "Software Sources" application (same as uncommenting "deb-src" lines on /etc/apt/sources.list)
sudo apt build-dep breeze
sudo apt build-dep kwin
sudo apt install git
cd ~/Downloads
git clone https://github.com/Zren/material-decoration.git
cd material-decoration ; mkdir build ; cd build

cmake -DCMAKE_INSTALL_PREFIX=/usr ..
finishes with errors.

Just to make sure I started to browse though commit history and downloaded previous zip packages. The last package which builds properly on Ubuntu 20.04 is with commit #176c748524ac50865db988b9a6a7243f8da4e64f) (("Fix repainting the titlebar now that we have borders (Issue #41)".
cmake_without_errors.txt

With the next commit #3f724dcf436233d24abe9f2dfc450ba5d0ac00dd) (("Refactor X11 window code") I've got cmake errors.
cmake_with_errors.txt

With current KDE Neon User Edition latest "master" branch builds properly (it's not compatible with KWin 5.18.5 though).

@Zren
Copy link
Owner

Zren commented Nov 7, 2021

Those 4 commits were sorta batched together. Try compiling 0277a1d6e1 aka "Update plasma-workspace/libdbusmenuqt@f07b7f1".

Not much changes other than formatting except:

diff --git a/src/libdbusmenuqt/CMakeLists.txt b/src/libdbusmenuqt/CMakeLists.txt
index 6ddc949..c8fd747 100644
--- a/src/libdbusmenuqt/CMakeLists.txt
+++ b/src/libdbusmenuqt/CMakeLists.txt
@@ -20,8 +20,8 @@ qt5_add_dbus_interface(libdbusmenu_SRCS com.canonical.dbusmenu.xml dbusmenu_inte
 
 add_library(dbusmenuqt STATIC ${libdbusmenu_SRCS})
 target_link_libraries(dbusmenuqt
-    Qt5::DBus
-    Qt5::Widgets
+    Qt::DBus
+    Qt::Widgets
 )

Does editing src/libdbusmenuqt/CMakeLists.txt and using Qt5::DBus work?

@xalt7x
Copy link
Author

xalt7x commented Nov 7, 2021

@Zren
Thanks!
I renamed both "Qt::DBus" and "Qt::Widgets" (also in "src/libdbusmenuqt/test/CMakeLists.txt") and now it builds properly. Patch bellow.

--- a/src/libdbusmenuqt/CMakeLists.txt
+++ b/src/libdbusmenuqt/CMakeLists.txt
@@ -20,8 +20,8 @@
 
 add_library(dbusmenuqt STATIC ${libdbusmenu_SRCS})
 target_link_libraries(dbusmenuqt
-    Qt::DBus
-    Qt::Widgets
+    Qt5::DBus
+    Qt5::Widgets
 )
 
 add_subdirectory(test)


--- a/src/libdbusmenuqt/test/CMakeLists.txt
+++ b/src/libdbusmenuqt/test/CMakeLists.txt
@@ -1,3 +1,3 @@
 add_executable(appmenutest main.cpp)
 target_link_libraries(appmenutest
-                        Qt::Widgets)
+                        Qt5::Widgets)

Zren added a commit that referenced this issue Jan 11, 2022
Zren added a commit that referenced this issue Jan 11, 2022
I think you can only use them with Qt 5.15 and Kubuntu 20.04 only has
Qt 5.12.
@xalt7x
Copy link
Author

xalt7x commented Jan 19, 2022

Tested again. CMake still fails (for a different reason)

CMake Error at src/libdbusmenuqt/CMakeLists.txt:18 (qt_add_dbus_interface):
  Unknown CMake command "qt_add_dbus_interface".

According to this page "qt_add_dbus_interface" was added in QT 5.15

P.S. I tried to revert commit "Use versionless qt macro in libdbusmenuqt (Issue #57) ".

Then generation continued but eventually got stuck again

-- Configuring done
CMake Error at src/libdbusmenuqt/test/CMakeLists.txt:1 (add_executable):
  Target "appmenutest" links to target "Qt::Widgets" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?

Zren added a commit that referenced this issue Jan 19, 2022
@Alt37: The new macro was added in Qt 5.15, and Kubuntu only has 5.12.
#57 (comment)
Zren added a commit that referenced this issue Jan 19, 2022
@Zren
Copy link
Owner

Zren commented Jan 19, 2022

Missed the Qt::Widgets in the tests CMakeLists.txt. Thanks @Alt37.

I also forgot how old Kubuntu's Qt version is. I've added a if/else switch to use the versionless macro when it detects Qt6.

crosses fingers should work now?

@xalt7x
Copy link
Author

xalt7x commented Jan 20, 2022

I can confirm that now it compiles.
Thanks for your awesome projects & support @Zren !

@xalt7x xalt7x closed this as completed Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants