AlizaMedicalImaging/AlizaMS

QT6 and Fedora

Closed this issue · 3 comments

alcir commented

Sorry @issakomi I need your advice.
If I use -DALIZA_QT_VERSION:STRING=6
I get

CMake Error at /usr/lib64/cmake/Qt6Core/Qt6CoreVersionlessTargets.cmake:42 (message):
  Some (but not all) targets in this export set were already defined.

  Targets Defined: Qt::Core

  Targets not yet defined: Qt::CorePrivate

Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6Core/Qt6CoreConfig.cmake:65 (include)
  /usr/lib64/cmake/Qt6/Qt6Config.cmake:167 (find_package)
  CMakeLists.txt:588 (find_package)


-- Configuring incomplete, errors occurred!

I don't know. I installed qt6-qtbase-private-devel package.

And, for the records, if I also install qt5-qtbase-private-devel I get

CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt5::Core" does
not agree with the value of QT_MAJOR_VERSION already determined
for "alizams".

I have tested with Fedora 39.

Manual build (download or clone and build ITK and then build AlizaMS) works with Qt6 without problems (required Qt6 packages: qt6-qtbase-devel, qt6-qtsvg-devel, qt6-qt5compat-devel).

Trying to build the package I run into exactly the same issue as you have described above (qmake was correct, from Qt6). I think the problem is this really huge amount of InsightToolkit-devel dependencies, 188 packages, among them is InsightToolkit-vtk-devel-4.13.3-14, the last one depends on VTK, VTK depends on Qt5 development packages, they interfere somehow in CMake with Qt6 (Qt6 is based on cmake).

ITK package is very old, 4.13, and probably it will take long time till someone package newer version, it is over-complicated task.

Installed:
  InsightToolkit-devel-4.13.3-14.fc39.x86_64                                    
  InsightToolkit-vtk-4.13.3-14.fc39.x86_64                                      
  InsightToolkit-vtk-devel-4.13.3-14.fc39.x86_64
  ...
  ...
  ...
  qt5-designer-5.15.9-1.fc39.x86_64                                             
  qt5-doctools-5.15.9-1.fc39.x86_64                                             
  qt5-linguist-5.15.9-1.fc39.x86_64                                             
  qt5-qtbase-devel-5.15.9-3.fc39.x86_64                                         
  qt5-qtdeclarative-devel-5.15.9-1.fc39.x86_64                                  
  qt5-qtlocation-5.15.9-1.fc39.x86_64                                           
  qt5-qtsensors-5.15.9-1.fc39.x86_64                                            
  qt5-qttools-5.15.9-1.fc39.x86_64                                              
  qt5-qttools-common-5.15.9-1.fc39.noarch                                       
  qt5-qttools-devel-5.15.9-1.fc39.x86_64                                        
  qt5-qttools-libs-designer-5.15.9-1.fc39.x86_64                                
  qt5-qttools-libs-designercomponents-5.15.9-1.fc39.x86_64                      
  qt5-qttools-libs-help-5.15.9-1.fc39.x86_64                                    
  qt5-qtwebchannel-5.15.9-1.fc39.x86_64                                         
  qt5-qtwebkit-5.212.0-0.75alpha4.fc39.x86_64                                   
  qt5-qtwebkit-devel-5.212.0-0.75alpha4.fc39.x86_64                             
  qt5-qtx11extras-devel-5.15.9-1.fc39.x86_64                                    
  qt5-rpm-macros-5.15.9-1.fc39.noarch
  ...
  ...
  ...

Sorry, I am afraid I can not help with the issue.

Edit:
Flathub also fails with Qt6, in org.kde.Platform 6.3 there is no Qt6Core5Compat.

  Failed to find Qt component "Core5Compat".

For some mysterious reason Qt moved excellent QTextCodec to Qt6Core5Compat. I use everything native Qt6, except this very important part. And there is no replacement, better say the replacement is crap, required encodings are not available.

Edit:
Ooop, sorry. Qt6 works well with org.kde.Platform 6.4 on Flathub

I close the topic. Unfortunately, there is nothing I can do on my end. Probably the next Flathub release will be with Qt6. If you have an idea for a workaround for the rpm package, please reopen. Thank you!

@alcir I have released 1.9.1. Have already done Flathub (with Qt6). For the rpm package Qt5 is OK, IMHO. Qt platform is still forced to xcb, but It is now possible to test Wayland native (-platform wayland). OpenGL Core Profile is the default now. Nothing special has to be done for configuration.

Some info about arguments is here:

scr

Thank you!