CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[Other] Qt5, OpenFOAM-7 and -v1906, and Ubuntu 18.04

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree13Likes
  • 7 Post By gcengineer
  • 1 Post By Andy Leo
  • 1 Post By Aadhavann
  • 1 Post By Aadhavann
  • 1 Post By Aadhavann
  • 1 Post By sphani4391
  • 1 Post By Zr.Yang

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2019, 22:38
Default Qt5, OpenFOAM-7 and -v1906, and Ubuntu 18.04
  #1
Member
 
Glenn Carlson
Join Date: Oct 2012
Location: US
Posts: 41
Rep Power: 9
gcengineer is on a distinguished road
This expands on the solution described by Jesper_Roland at Error ./makeParaview, VTK_QT_VERSION is '5' OF1806.

Many threads describe problems building recent versions of OpenFOAM/ParaView (e.g., 5.6.0) with Qt5 running under recent versions of Ubuntu (e.g., 18.04). The solution here requires only calls to apt-get and works for OpenFOAM-7 and OpenFOAM-v1906. I'm building for 64-bit machines.

When I initially built ParaView out of the box using ./makeParaView, I got a Qt version mismatch error:

Code:
CMake Error at VTK/CMake/vtkQt.cmake:6 (message):
   Expected value for VTK_QT_VERSION is '5'
The solution to this error is to install qt5-default:

Code:
sudo apt-get install qt5-default
Run ./makeParaView again. The build proceeds but returns a different error:

Code:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5X11Extras" with
  any of the following names:

    Qt5X11ExtrasConfig.cmake
    qt5x11extras-config.cmake

  Add the installation prefix of "Qt5X11Extras" to CMAKE_PREFIX_PATH or set
  "Qt5X11Extras_DIR" to a directory containing one of the above files.  If
  "Qt5X11Extras" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
      VTK/GUISupport/Qt/CMakeLists.txt:71 (find_package)
The package containing a particular file can be found using the apt-file command, which can be installed and updated, if necessary, with:

Code:
sudo apt-get install apt-file

   sudo apt-file update
To find the packages containing Qt5X11ExtrasConfig.cmake and qt5x11extras-config.cmake, run the apt-file command (not necessary to run as sudo):

Code:
apt-file search Qt5X11ExtrasConfig.cmake
This command returns:
Code:
libqt5x11extras5-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5X11Extras/Qt5X11ExtrasConfig.cmake
This tells us that Qt5X11Extras... is in package libqt5x11extras5-dev. Install the package with apt-get:

Code:
sudo apt-get install libqt5x11extras5-dev
(Running 'apt-file search' for qt5X11extra-config.cmake returns null.)

Run ./makeParaView again. The build proceeds but gives another error:

Code:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5Help" with any
  of the following names:

    Qt5HelpConfig.cmake
    qt5help-config.cmake

  Add the installation prefix of "Qt5Help" to CMAKE_PREFIX_PATH or set
  "Qt5Help_DIR" to a directory containing one of the above files.  If
  "Qt5Help" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMake/ParaViewQt.cmake:71 (find_package)
   Qt/Widgets/CMakeLists.txt:221 (pv_find_package_qt)
Running 'apt-file search' for Qt5HelpConfig.cmake:

Code:
apt-file search Qt5HelpConfig.cmake
tells us that Qt5HelpConfig.cmake is in package qttools5-dev:

Code:
qttools5-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5Help/Qt5HelpConfig.cmake
Install this package as before:

Code:
sudo apt-get install qttools5-dev
('apt-file search qt5help-config.cmake' returns null.)

ParaView builds successfully on running ./makeParaView again.

I confirmed these steps by building ParaView with OpenFOAM-7 and with OpenFOAM-v1906 in separate VMware VMs running Ubuntu 18.04 clients.

On a third physical machine running Ubuntu 18.04, I built ParaView with OpenFOAM-7 using the above steps. I then built ParaView with OpenFOAM-v1906 on the same machine without repeating the above steps. I use aliases to switch between OF7 and OFv1906 environments.


I hope folks find this helpful.

Last edited by gcengineer; July 22, 2019 at 22:46. Reason: Emphasize that I am building ParaView from source, not just installing pre-compiled binaries.
gcengineer is offline   Reply With Quote

Old   July 25, 2019, 12:39
Default Worked for me!
  #2
New Member
 
Join Date: Jul 2019
Posts: 1
Rep Power: 0
Andy Leo is on a distinguished road
Worked for me! Thank you!
gcengineer likes this.
Andy Leo is offline   Reply With Quote

Old   August 7, 2019, 04:24
Default
  #3
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 2
Aadhavann is on a distinguished road
Hi All,


I am trying to install OF 1906 on Ubuntu -16.04,


I am really tired of looking at the threads for installing paraview,


It seems that by looking at the different threads, the things are messed up,

I dont know where I am doing mistake, OF compilation is successful.
I am really struggling to fix paraView built up.


The error message I am getting is


Could not find a configuration file for package "Qt5" that is compatible
with requested version "5.6".

The following configuration files were considered but not accepted:

/usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake, version: 5.5.1
/usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake, version: 5.5.1

Call Stack (most recent call first):
Qt/Widgets/CMakeLists.txt:219 (pv_find_package_qt)


-- Configuring incomplete, errors occurred!


In my understanding it says that the version of the qt is higher than the required one.
If that is the case, i dont no how to downgrade the version or how to install the correct Qt?




Please give your suggestions,




Thanks for your advise,
Aadhavan
gcengineer likes this.
Aadhavann is offline   Reply With Quote

Old   August 7, 2019, 16:22
Default
  #4
Member
 
Glenn Carlson
Join Date: Oct 2012
Location: US
Posts: 41
Rep Power: 9
gcengineer is on a distinguished road
I can confirm that the steps in my original post work to install ParaView 5.6 with OF v1906 in Ubuntu 18.04, but not in 16.04. Installing v1906 in Ubuntu 16.04 returned the Qt version mismatch error reported by Aadhavann even after installing the Qt5 packages identified by apt-file. I did not try to install OF7 in Ubuntu 16.04.


At this stage, my best advice is to upgrade to Ubuntu 18.04 if you want to run ParaView 5.6 with OF v1906 or 7. Perhaps others have more insight.
gcengineer is offline   Reply With Quote

Old   August 8, 2019, 00:03
Default
  #5
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 2
Aadhavann is on a distinguished road
sure I will upgrade, i dont have any other option.


Thanks for your advise and suggestion,
gcengineer likes this.
Aadhavann is offline   Reply With Quote

Old   August 8, 2019, 05:22
Default
  #6
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 2
Aadhavann is on a distinguished road
Finally I got success by upgrading the Ubuntu.


It seems that we can follow the steps given there in the OF website.


My question is that, in the release note they mentioned that OF1906 is tested on Ubuntu 16.04 LTS. If that is the case why it is giving such an error, its really strange and waste of time.


Any how it works with Ubuntu-18.04 LTS,




Thanks Gcengineer
gcengineer likes this.

Last edited by Aadhavann; August 8, 2019 at 09:20.
Aadhavann is offline   Reply With Quote

Old   August 22, 2019, 05:41
Thumbs up Thanks for the help
  #7
New Member
 
Sai Darbha
Join Date: Aug 2019
Posts: 3
Rep Power: 2
sphani4391 is on a distinguished road
It works. I've been breaking my head to get ParaView working in Ubuntu 18.04 but to no avail. Thanks for your detailed info.
gcengineer likes this.
sphani4391 is offline   Reply With Quote

Old   September 13, 2019, 10:45
Thumbs up Awesome
  #8
New Member
 
zeren
Join Date: Sep 2019
Posts: 1
Rep Power: 0
Zr.Yang is on a distinguished road
Now l learn another command "apt-file"
gcengineer likes this.
Zr.Yang is offline   Reply With Quote

Reply

Tags
openfoam, paraview 5.6, qt5, ubuntu 18.04

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:02.