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

No libqt4-dev in Ubuntu20.04, hope for Qt5 version #225

Closed
ouening opened this issue May 15, 2020 · 11 comments
Closed

No libqt4-dev in Ubuntu20.04, hope for Qt5 version #225

ouening opened this issue May 15, 2020 · 11 comments

Comments

@ouening
Copy link

ouening commented May 15, 2020

No libqt4-dev in Ubuntu20.04, hope for support Qt5 version

@raback
Copy link
Contributor

raback commented May 15, 2020

ElmerGUI does compile with Qt5. Have you tried cmake using "WITH_QT5".

@ivantaran
Copy link

in file: ./ElmerGUI/cmake/Modules/FindQwt.cmake
instead FIND_LIBRARY(QWT_LIBRARY qwt
write FIND_LIBRARY(QWT_LIBRARY qwt-qt5
and try:
cmake .. -DWITH_OpenMP:BOOLEAN=TRUE -DWITH_MPI:BOOLEAN=TRUE -DWITH_ELMERGUI:BOOLEAN=TRUE -DWITH_QT5=TRUE

@ouening
Copy link
Author

ouening commented May 23, 2020

I tried it in Ubuntu18.04 but failed. I'll try in Ubuntu20.04 another time. By the way, the officail readme file is too old to instruct us to compile by ourself.

@ivantaran
Copy link

When I built it under Ubuntu 20.04, I additionally installed the following packages:
sudo apt install qt5-default qtscript5-dev libqwt-qt5-dev

@ouening
Copy link
Author

ouening commented May 23, 2020

Finally I sucessfully compiled it in Ubuntu20.04. This time I compiled it in a new installed Ubuntu20.04.
Some dependent packages need to be installed firstly (refer to dockerfile )

$ sudo apt install cmake cmake-qt5 gcc g++ gfortran qt5-default qtscript5-dev libqwt-qt5-dev libmpich-dev libblas-dev liblapack-dev libqt5svg5-dev libnetcdff-dev libmetis-dev libparmetis-dev libmumps-dev netcdf-bin

(stiil can't find hdf5, I don't know why

-- Elmer/Ice package: Looking for [HDF5] & [HDF5 Fortran] libraries
-- Library not found: >HDF5_FOUND< 
CMake Warning at elmerice/Solvers/CMakeLists.txt:49 (MESSAGE):
    
   Missing: >HDF5_INCLUDE_DIR< , >HDF5_LIBRARY<,  >HDF5F_LIBRARY< 
   some functionalities will be disabled

)
Install mmg:

$ git clone https://github.com/MmgTools/mmg
$ cd mmg && mkdir build
$ cmake-gui .. # check shared libs on
$ make -j5
$ sudo make install

and finally as @ivantaran said, modifiy file ./ElmerGUI/cmake/Modules/FindQwt.cmake, then excute command:

$ cmake .. -DWITH_OpenMP:BOOLEAN=TRUE -DWITH_MPI:BOOLEAN=TRUE -DWITH_ELMERGUI:BOOLEAN=TRUE -DWITH_QT5=TRUE -DWITH_ElmerIce:BOOL=TRUE -DWITH_Mumps:BOOL=TRUE 
$ make -j3
$ sudo make install 

But one strange thing is that if I config it using cmake-gui, an error happened:

checking for thread-local storage - found
  Building ElmerGUI
------------------------------------------------
------------------------------------------------
CMake Error at /usr/share/cmake-3.16/Modules/FindQt4.cmake:1314 (message):
  Found unsuitable Qt version "5.12.8" from /usr/bin/qmake, this code
  requires Qt 4.x
Call Stack (most recent call first):
  ElmerGUI/CMakeLists.txt:37 (FIND_PACKAGE)

I don't know how to fix it. If someone have fixed it , please let me know, thank you!

@ivantaran
Copy link

@raback here results of static analysis of elmerfem sources may interest you

@willchao612
Copy link

When I built it under Ubuntu 20.04, I additionally installed the following packages:
sudo apt install qt5-default qtscript5-dev libqwt-qt5-dev

This works, thanks.

@rmccomiskie
Copy link

Yes. It does work!
In thread: #225
eddiechaoinchina commented on Oct 17, 2020 suggesting the following to install QT5:
"sudo apt install qt5-default qtscript5-dev libqwt-qt5-dev"

I ran into this while trying to install openEMS in Ubuntu 20.04 LTS. So I replaced "libqt4-dev" with "qt5-default qtscript5-dev libqwt-qt5-dev".

Instead of this out-of-date command:
"sudo apt-get install build-essential git cmake libhdf5-dev libvtk5-dev libboost-all-dev libcgal-dev libtinyxml-dev libqt4-dev libvtk5-qt4-dev"
which is found in the Linux install instructions for openEMS (https://openems.de/index.php/Compile_from_Source.html).

I used the following command to install openEMS in Ubuntu 20.04 LTS:
"sudo apt-get install build-essential git cmake libhdf5-dev libvtk6-dev libboost-all-dev libcgal-dev libtinyxml-dev qt5-default qtscript5-dev libqwt-qt5-dev libvtk6-qt-dev"
It compiled without errors 2021.01.31.

Perhaps this will help someone else.

@dloeffen
Copy link

For me the following worked:

in file: ./ElmerGUI/cmake/Modules/FindQwt.cmake on the line with:

FIND_LIBRARY(QWT_LIBRARY NAMES qwt qwt6-qt5

add qwt-qt5

and after the line with:

HINTS /usr/local/Cellar/qwt-qt4/6.1.3_1/lib

add a new line with:

HINTS /usr/lib/qwt-qt5

@dvlierop
Copy link

I always modify FindQwt.cmake manually by adding merely "qwt-qt5" to the "FIND LIBRARY" on line 33. That's the only thing needed for me to make CMake run succesfully on Ubuntu 20.04.2 LTS (besides actually installing the packages of course).

So that line now looks like this on my system:
FIND_LIBRARY(QWT_LIBRARY NAMES qwt qwt6-qt5 qwt-qt5

Could someone changes this in the git repository too, assuming it doesn't break stuff for anyone else?

t7saeki added a commit to t7saeki/elmerfem that referenced this issue Nov 13, 2021
For the request in Issue ElmerCSC#225, also adding HINTS for some other platforms.
@t7saeki
Copy link
Contributor

t7saeki commented Nov 13, 2021

I have issued a pull request for this change including additional HINTS for some other platforms as I also always needed similar type of modification to find Qwt.

giammi56 added a commit to giammi56/elmerfem that referenced this issue Aug 9, 2022
from the resolved issues ElmerCSC#225
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

8 participants