Problem with qt version while installing

Install support for openEMS

Moderators: thorsten, sebastian

leather_rebel
Posts: 12
Joined: Sun 15 May 2022, 06:03

Problem with qt version while installing

Post by leather_rebel » Sun 15 May 2022, 06:08

Hello,
I have a problem installing openems. I have searched the forum and googled, but didn't find a solution.
I followed the instructions on wiki to build openems.
I get the following error in the log file when building using update_openEMS.sh from git

Code: Select all

CMake Error at /usr/share/cmake/Modules/FindQt4.cmake:1324 (message):
  Found unsuitable Qt version "5.15.3" from /usr/bin/qmake, this code
  requires Qt 4.x
Call Stack (most recent call first):
  CMakeLists.txt:122 (FIND_PACKAGE)
How can I install openems with qt5?

thorsten
Posts: 1517
Joined: Mon 27 Jun 2011, 12:26

Re: Problem with qt version while installing

Post by thorsten » Sun 15 May 2022, 09:03

Did you try the latest github version of openEMS?
Which vtk version is installed?

leather_rebel
Posts: 12
Joined: Sun 15 May 2022, 06:03

Re: Problem with qt version while installing

Post by leather_rebel » Sun 15 May 2022, 20:06

I'm using the openEMS-Project repository at 65082147fadd6495f591135dd81bbacdef143e92 (Date: Sun Feb 20 11:27:35 2022 +0100)
The vtk is 9.0.3-r4

leather_rebel
Posts: 12
Joined: Sun 15 May 2022, 06:03

Re: Problem with qt version while installing

Post by leather_rebel » Tue 17 May 2022, 10:23

Can you give advice on how to debug this?

thorsten
Posts: 1517
Joined: Mon 27 Jun 2011, 12:26

Re: Problem with qt version while installing

Post by thorsten » Tue 17 May 2022, 10:38

Well cmake must have found a very old vtk version (<6.4)
Please check which one and maybe why...

leather_rebel
Posts: 12
Joined: Sun 15 May 2022, 06:03

Re: Problem with qt version while installing

Post by leather_rebel » Tue 17 May 2022, 21:58

Cmake explicitly states the vtk version it found:

Code: Select all

-- Found package VTK. Using version 9.0.3
CMake Deprecation Warning at /usr/lib64/cmake/vtk-9.0/vtk-use-file-deprecated.cmake:1 (message):
  The `VTK_USE_FILE` is no longer used starting with 8.90.
Call Stack (most recent call first):
  CMakeLists.txt:107 (include)


CMake Error at /usr/share/cmake/Modules/FindQt4.cmake:1324 (message):
  Found unsuitable Qt version "5.15.3" from /usr/bin/qmake, this code
  requires Qt 4.x
Call Stack (most recent call first):
  CMakeLists.txt:122 (FIND_PACKAGE)
I have attached the full build log
Attachments
build_20220517_140042.log
build log
(59.38 KiB) Downloaded 52 times

thorsten
Posts: 1517
Joined: Mon 27 Jun 2011, 12:26

Re: Problem with qt version while installing

Post by thorsten » Tue 17 May 2022, 22:12

Then this can only mean that this vtk was build against Qt4?
That would be very weird???
What Linux is this? Did you use vtk coming with the distro?
I'm really lost how this can be possible...

leather_rebel
Posts: 12
Joined: Sun 15 May 2022, 06:03

Re: Problem with qt version while installing

Post by leather_rebel » Tue 17 May 2022, 22:18

I have only qt5 installed. I installed qt5 provided by the official gentoo repository.
This is the list of qt packages I have:

Code: Select all

# qlist -I -S -v dev-qt/*
dev-qt/designer-5.15.3:5
dev-qt/linguist-tools-5.15.3:5
dev-qt/qtbluetooth-5.15.3:5
dev-qt/qtcharts-5.15.3:5
dev-qt/qtchooser-66-r2:0
dev-qt/qtconcurrent-5.15.3:5
dev-qt/qtcore-5.15.3:5
dev-qt/qtdbus-5.15.3:5
dev-qt/qtdeclarative-5.15.3-r1:5
dev-qt/qtgui-5.15.3:5
dev-qt/qthelp-5.15.3:5
dev-qt/qtlockedfile-2.4.1_p20171024:0
dev-qt/qtmultimedia-5.15.3:5
dev-qt/qtnetwork-5.15.3:5
dev-qt/qtopengl-5.15.3:5
dev-qt/qtprintsupport-5.15.3:5
dev-qt/qtsingleapplication-2.6.1_p20171024:0
dev-qt/qtsql-5.15.3:5
dev-qt/qtsvg-5.15.3:5
dev-qt/qttest-5.15.3:5
dev-qt/qtwebchannel-5.15.2-r1:5
dev-qt/qtwidgets-5.15.3:5
dev-qt/qtx11extras-5.15.3:5
dev-qt/qtxml-5.15.3:5
dev-qt/qtxmlpatterns-5.15.3:5

thorsten
Posts: 1517
Joined: Mon 27 Jun 2011, 12:26

Re: Problem with qt version while installing

Post by thorsten » Tue 17 May 2022, 22:22

well in QCSXCAD/CMakeList.txt this line:

Code: Select all

if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4")
was false, which means vtk requested a "VTK_QT_VERSION" not greater than 4...
This can only mean, your vtk was build with a qt4 binding or maybe a missing qt binding...
You can maybe just try to force this to be true and see what happens... But I suspect your vtk will not work with Qt5

leather_rebel
Posts: 12
Joined: Sun 15 May 2022, 06:03

Re: Problem with qt version while installing

Post by leather_rebel » Tue 17 May 2022, 22:38

Just before that line in QCSXCAD/CMakeLists.txt at line 113 I added variable output and exit:

Code: Select all

message(STATUS "VTK_VERSION: ${VTK_VERSION}")
message(STATUS "VTK_QT_VERSION: ${VTK_QT_VERSION}")
message( FATAL_ERROR "CMake CUSTOM DEBUG exit (PRINTED VARS)." )
if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4")
One of them seems to be empty:

Code: Select all

-- VTK_VERSION: 9.0.3
-- VTK_QT_VERSION: 
CMake Error at CMakeLists.txt:115 (message):
  CMake CUSTOM DEBUG exit (PRINTED VARS).

Post Reply