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

How should downstream Linux distros handle Qt5/Qt6 coexistance? #13

Open
hosiet opened this issue Mar 19, 2024 · 2 comments
Open

How should downstream Linux distros handle Qt5/Qt6 coexistance? #13

hosiet opened this issue Mar 19, 2024 · 2 comments

Comments

@hosiet
Copy link

hosiet commented Mar 19, 2024

With kcolorpicker v0.3.0, the solution seemed to be straightforward. It introduced libkColorPicker-Qt5 and libkColorPicker-Qt6. When building shared libraries, they can be installed together without conflict since they are of different names.

With kcolorpicker v0.3.1 ( specifically f58d6ad ), the shared libraries built all have the file name libkColorPicker.so.0.x. This means that the Qt5 and Qt6 versions of shared library cannot be installed together. (In the meanwhile, the headers and CMake files can coexist because they are placed under usr/include/kColorPicker-Qt{5,6}/ and usr/lib/*/cmake/kColorPicker-Qt{5,6}/, respectively.

As Debian packager, I would like to know how you would like us to provide the kColorPicker in Debian and its derivatives (e.g., Ubuntu). Do you expect that everything move to Qt6 as Arch Linux, or do you want to make coexistance possible? That will determine how I change the packaging structure at https://tracker.debian.org/pkg/kcolorpicker .

@hosiet
Copy link
Author

hosiet commented Mar 19, 2024

I will also have to mention that switching from Qt5 to Qt6 is a major API breakage that should be accompanied with SONAME bump. I would suggest both kcolorpicker project and kimageannotator project to raise their SONAME (0 -> 1) to avoid any issues.

Another very important thing worth mentioning is that the kimageannotator library is being used by external projects:

-> % aptitude why libkcolorpicker0
i   task-kde-desktop    Depends    kde-standard
p   kde-standard        Depends    gwenview (>= 4:22.12.3)
p   gwenview            Depends    libkimageannotator0 (>= 0.6.0)
p   libkimageannotator0 Depends    libkcolorpicker0 (>= 0.2.0)

While the latest version of gwenview has migrated to Qt6, older releases may still depends on Qt5 and Qt5 flavor of libkimageannotator. Taking it into consideration, I believe (1) the SONAME bump is necessary, and (2) Qt5/Qt6 library coexistance would be helpful (though not an absolute must).

@krop
Copy link

krop commented Mar 20, 2024

For openSUSE, we applied tiny changes to kcolorpicker and kimageannotator to make them coinstallable again.

kcolorpicker:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d15048..cd61fd8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,6 +65,7 @@ set_target_properties(kColorPicker
 					  RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin
 		 			  VERSION ${PROJECT_VERSION}
 					  SOVERSION 0
+					  OUTPUT_NAME kColorPicker-Qt${QT_MAJOR_VERSION}
 					  )
 
 install(TARGETS kColorPicker

kimageannotator:


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f3516e..6a12399 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,6 +97,7 @@ set_target_properties(kImageAnnotator
 					  RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin
 					  VERSION ${PROJECT_VERSION}
 					  SOVERSION 0
+					  OUTPUT_NAME kImageAnnotator-Qt${QT_MAJOR_VERSION}
 					  )
 
 install(TARGETS kImageAnnotator

and ksnip/ksnip@76f4b3819 to our ksnip package.

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