View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017609 | Scribus | Build System | public | 2025-08-28 14:17 | 2025-08-29 20:01 |
Reporter | melwyncarlo | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | x86-64 | OS | Ubuntu (Linux) | OS Version | 24.04.3 LTS |
Product Version | 1.7.1.svn | ||||
Summary | 0017609: Cannot build on Ubuntu using Cmake and Qt6 | ||||
Description | It results in the following error message: In ads_globals.cpp: <qpa/qplatformnativeinterface.h> not found. This is true, as: 1. I could not find the file anywhere in my Qt6 folders. 2. Qt has stated these are private files and are subject to changes/removal even for minor releases. 3. This header file has been removed in Qt v6.0. Reference: https://www.qt.io/blog/platform-apis-in-qt-6 4. This header file has been replaced with QNativeInterface (qnativeinterface.h), supporting X11 (the reason why we need it), starting Qt v6.2. References: https://doc.qt.io/qt-6/qnativeinterface.html and https://doc.qt.io/qt-6/qnativeinterface-qx11application.html I've made the necessary adjustments in my diff attachment, which has successfully enabled me to build (cmake, make, and install) on my laptop (which contain specifications as per the above given profile). | ||||
Steps To Reproduce | cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/USERNAME/PATH_TO_SCRIBUS_1_7_1_SVN/scribus/install -DWANT_DEBUG=1 -DWANT_GRAPHICSMAGICK=1 -DWITH_PODOFO=1 -DWITH_BOOST=1 -DWANT_VERSIONING=0 -DWANT_GUI_LANG="en_GB;en" -DCMAKE_INCLUDE_PATH=/usr/include/x86_64-linux-gnu/qt6 .. | ||||
Additional Information | Qt v6.7 has introduced support for Wayland for the Advanced Docking System, if that is something you wish to look into as well. Reference: https://doc.qt.io/qt-6/qnativeinterface-qwaylandapplication.html | ||||
Tags | dependencies, Qt6, ubuntu, x11 | ||||
Patch | No | ||||
|
My diff attachment is attached below. |
|
it's not attached : - ) |
|
I had attached it. But then I received a message stating that I was restricted to just 10 actions within 3600 seconds. I have attached it here again, if it makes it through. melwyn_carlo_bug_id_0017609.diff (2,889 bytes)
Index: CMakeLists_Dependencies.cmake =================================================================== --- CMakeLists_Dependencies.cmake (revision 27002) +++ CMakeLists_Dependencies.cmake (working copy) @@ -211,8 +211,8 @@ #>>LibXML2 #<<JPEG XL -set(JXL_DIR ${CMAKE_MODULE_PATH}) -#find_package(JXL) +#set(JXL_DIR ${CMAKE_MODULE_PATH}) +find_package(JXL) if(JXL_FOUND) set(HAVE_JXL ON) message("JPEG XL Library Found OK") @@ -266,6 +266,9 @@ cmake_policy(SET CMP0167 OLD) find_package(Boost) endif() + if (NOT Boost_FOUND) + find_package(Boost) + endif() if (Boost_FOUND) message("Boost Library Found OK") set(HAVE_BOOST ON) Index: scribus/third_party/Qt-Advanced-Docking-System/src/CMakeLists.txt =================================================================== --- scribus/third_party/Qt-Advanced-Docking-System/src/CMakeLists.txt (revision 27002) +++ scribus/third_party/Qt-Advanced-Docking-System/src/CMakeLists.txt (working copy) @@ -84,6 +84,9 @@ target_link_libraries(${library_name} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets) +if(QT_VERSION_MAJOR STREQUAL "6") + target_link_libraries(${library_name} PRIVATE Qt6::Gui) +endif() if (UNIX AND NOT APPLE) if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") find_package(X11 REQUIRED) Index: scribus/third_party/Qt-Advanced-Docking-System/src/ads_globals.cpp =================================================================== --- scribus/third_party/Qt-Advanced-Docking-System/src/ads_globals.cpp (revision 27002) +++ scribus/third_party/Qt-Advanced-Docking-System/src/ads_globals.cpp (working copy) @@ -32,6 +32,7 @@ #include <QPainter> #include <QAbstractButton> #include <QStyle> +#include <QtGlobal> #include "DockSplitter.h" #include "DockManager.h" @@ -39,10 +40,14 @@ #include "ads_globals.h" #if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) -#include <QSettings> -#include <QFile> -#include <QApplication> -#include <qpa/qplatformnativeinterface.h> + #include <QSettings> + #include <QFile> + #include <QApplication> + #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) + #include <qnativeinterface.h> + #else + #include <qpa/qplatformnativeinterface.h> + #endif #endif namespace ads @@ -69,12 +74,19 @@ { if (!qApp) return nullptr; + #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) + if (auto *x11Application = qGuiApp->nativeInterface<QNativeInterface::QX11Application>()) { + return x11Application->connection(); + } else { + return nullptr; + } + #else QPlatformNativeInterface *native = qApp->platformNativeInterface(); if (!native) return nullptr; - void *connection = native->nativeResourceForIntegration(QByteArray("connection")); return reinterpret_cast<xcb_connection_t *>(connection); + #endif } |
|
sudo apt-get install libqt6core5compat6-dev libqt6svg6-dev linguist-qt6 qt6-base-dev qt6-base-dev-tools qt6-base-private-dev qt6-gtk-platformtheme qt6-image-formats-plugins qt6-l10n-tools qt6-svg-dev qt6-tools-dev qt6-tools-dev-tools qt6-translations-l10n qt6-base-private-dev is the package you are looking for... |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-08-28 14:17 | melwyncarlo | New Issue | |
2025-08-28 14:17 | melwyncarlo | Tag Attached: dependencies | |
2025-08-28 14:17 | melwyncarlo | Tag Attached: Qt6 | |
2025-08-28 14:17 | melwyncarlo | Tag Attached: ubuntu | |
2025-08-28 14:17 | melwyncarlo | Tag Attached: x11 | |
2025-08-28 14:19 | melwyncarlo | Note Added: 0052978 | |
2025-08-28 14:55 | ale | Note Added: 0052979 | |
2025-08-28 15:20 | melwyncarlo | Note Added: 0052980 | |
2025-08-28 15:20 | melwyncarlo | File Added: melwyn_carlo_bug_id_0017609.diff | |
2025-08-29 20:01 | cbradney | Note Added: 0052985 |