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 Community New Posts Updated Threads Search

Like Tree24Likes
  • 16 Post By gcengineer
  • 1 Post By Andy Leo
  • 1 Post By Aadhavann
  • 1 Post By Aadhavann
  • 1 Post By Aadhavann
  • 2 Post By sphani4391
  • 1 Post By Zr.Yang
  • 1 Post By AshaEgreck

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 22, 2019, 21:38
Default Qt5, OpenFOAM-7 and -v1906, and Ubuntu 18.04
  #1
Member
 
Glenn Carlson, PE, PhD (ret)
Join Date: Oct 2012
Location: US
Posts: 49
Rep Power: 13
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 21:46. Reason: Emphasize that I am building ParaView from source, not just installing pre-compiled binaries.
gcengineer is offline   Reply With Quote

 

Tags
openfoam, paraview 5.6, qt5, ubuntu 18.04


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 06:13.