QT5 issues building on Manjaro

429 views
Skip to first unread message

Paul Billings

unread,
Apr 18, 2022, 2:21:35 PM4/18/22
to Subsurface Divelog
Does anyone know how to force the package installer/builder to use QT5 instead of QT6? I have all the QT5 dependencies installed, but the Build of subsurface 5.0.8-1 fails. A partial of the build log says, 
[...]
-- Found Threads: TRUE  
-- building with Qt 6.2.4
-- building without printing support
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE  
-- Found OpenGL: /usr/lib/libOpenGL.so  
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib/libxkbcommon.so (found suitable version "1.4.0", minimum required is "0.5.0")
-- Found WrapVulkanHeaders: /usr/include  
-- Could NOT find Qt6WebKitWidgets (missing: Qt6WebKitWidgets_DIR)
CMake Error at CMakeLists.txt:321 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/Qt6/Qt6Config.cmake

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

  Failed to find Qt component "WebKitWidgets".
[...]

Things I have tried (grasping at straws a google search throws my way):
Putting -DQT_SELECT=qt5 in the build() function
Putting -DQT6=OFF in the build() function
Installing qt6-webengine

I'm at a loss. An earlier 5.0.x built/worked fine, but now have these issues with the update to 5.0.8. Thoughts anyone?

Dirk Hohndel

unread,
Apr 18, 2022, 3:42:03 PM4/18/22
to subsurfac...@googlegroups.com
Things changed because we now have basic Qt6 support.
If your build system can see both of them, and they are both installed in the same path, I'm not quite sure how to tell cmake which one to use.
I don't have a system with that setup - where I have both Qt5 and Qt6 installed, it's in separate directories and I simply use the PATH to switch between them.

Hmm... I'll have to experiment with this. There's got to be a way to explicitly pick one or the other from cmake

/D

Paul Billings

unread,
Apr 20, 2022, 1:37:30 PM4/20/22
to Subsurface Divelog
Hi Dirk,

Thank you very much for the thoughts. (Sorry for the delay, I thought Groups would notify me of a response.) At any rate, I'm OK using QT6 -- it's preferred, actually, if the basic support is there. There were several other QT6 components it couldn't find, but I was able to install them (e.g., qt6-connectivity for Bluetooth). 

I'm just stuck at that last one (WebKitWidgets); installing qt6-webengine didn't resolve it. Any suggestions to make it work with QT6?

Best Regards,
Paul

Dirk Hohndel

unread,
Apr 20, 2022, 3:19:18 PM4/20/22
to subsurfac...@googlegroups.com
Webkit hasn't been ported and likely won't ever be ported to Qt6. So right now there is no print support with Qt6.

We are looking at alternative solutions for that in the future.

/D

-- 
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/540d9792-da34-4bd0-b765-d021389fac73n%40googlegroups.com.

Paul Billings

unread,
Apr 21, 2022, 1:41:43 PM4/21/22
to Subsurface Divelog
Understood. Thank you for all your efforts!
Paul

Francesco Bellamoli

unread,
Apr 22, 2022, 8:22:33 AM4/22/22
to Subsurface Divelog
I encountered the same issue on Arch Linux, so I guess you're also building the package from the AUR on Manjaro.
After I reported the issue in the comment section there, user jrd found a quick fix: adding to the build section of the PKGBUILD file this line, to ignore Qt6 if it is installed in the system:
sed -i '/find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets)/s/Qt6 //' $pkgname-$pkgver/CMakeLists.txt
It works! I hope this helps.
Francesco

Dirk Hohndel

unread,
Apr 22, 2022, 11:19:57 AM4/22/22
to Subsurface Divelog
Yes, I was thinking along those lines to make this a build option - but as a quick hack the below will work.

I was traveling the last two+ weeks, but hopefully I'll have time this weekend to add a "clean" version of this to the build system.

/D

Dirk Hohndel

unread,
Apr 23, 2022, 4:01:50 PM4/23/22
to Subsurface Divelog
OK, I now added a cleaner approach for this to the current Subsurface repo. So if you are able to build from the latest git version, you should be able to test this. It should now by default build Qt5 only and require an option to be said in order to build Qt6

/D

Paul Billings

unread,
Apr 26, 2022, 2:20:13 PM4/26/22
to Subsurface Divelog
Francesco,
Many thanks!! I was, in fact, building from the AUR, which is now successfully with that additional line.
Paul

Reply all
Reply to author
Forward
0 new messages