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

[OpenFOAM.com] paraFoam cannot open due to Qt issues - [Solved/Information]

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

Like Tree1Likes
  • 1 Post By u2berggeist

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2018, 12:58
Default paraFoam cannot open due to Qt issues - [Solved/Information]
  #1
Member
 
James Wright
Join Date: Oct 2015
Posts: 39
Rep Power: 7
u2berggeist is on a distinguished road
I was originally writing this up as I tried to solve the issue stated below. I'll go ahead and post it as information for any passersby. I've read through and tried to change some present tense to past, but probably missed some stuff.

Huge shoutout to wyldckat and h0y5840, who's thread made this job much easier.

Issue:
I've (tried at least) to compile OpenFOAM v1712 and am running into an issue with ParaView.

Code:
u2berggeist@Exia00:~/OpenFOAM/u2berggeist-v1712/run/tutorials/incompressible/icoFoam/cavity/cavity$ paraFoam
Created temporary 'cavity.OpenFOAM'
/home/u2berggeist/OpenFOAM/ThirdParty-v1712/platforms/linux64Gcc/ParaView-5.4.1/lib/paraview-5.4/paraview: error while loading shared libraries: libQt5Help.so.5: cannot open shared object file: No such file or directory
Author's Note: if you just want to get my solution that worked, jump down to The End Solution Condensed

Solution Attempt 1: Using the -builtin
Originally, I tried to install a builtin version of ParaView and use "paraFoam -builtin" as suggested by the openfoamwiki through Ubuntu repository, but it didn't work. (I'll discuss this more in the Random Possibly-Helpful Stuff).

I gave up on that, so I tried to figure out the issues with the OpenFOAM paraview installation.

I found the following this fantastic forum post/exchange between wyldckat and h0y5840. This was extremely helpful, but I did have to do some translating from what the older versions were talking about to what I needed. All mentions of "post #NN" are referring to this post.

The Source of the Issue is found:

Now I believe the issue is that I ran "./makeParaView" before installing Qt via "./makeQt" as it recommends in the "ThirdParty-v1712/BUILD.md" (Note to self, read all the information before doing anything). This was substantiated from post #22

Solution Attempt 2: No Qt-uite there...
I've now installed qt-5.9.3 per the instructions in "ThirdParty-v1712/BUILD.md". The install is located in "ThirdParty-v1712/platforms/linux64Gcc/qt-5.9.3"

I tried run paraFoam after that, but no dice.

Following post #20, I unpacked "ThirdParty-v1712.tgz" into the "$HOME/OpenFOAM directory".

I ran paraview again, but got the exact same error as initially.

There were several mentions of changing a "settings.sh" file, but I didn't find such a thing (I did later, but I'll tackle that in the Random Possibly-Helpful Stuff).

Solution Attempt 3: A two pronged attack

With that new failure, I decided to investigate why simply using "paraFoam -builtin" wasn't working.

This was also right around the time I was contemplating deleting and rebuilding the OpenFOAM installation of paraview per post #24, so I decided to tackle them together.

I downloaded ParaView straight from their site, unpacked it, and added it to my "~/.bashrc" per the openfoamwiki.

Trying "paraFoam -builtin" at this stage resulted in the same as usual.

So I then deleted the ParaFoam Installation: "rm -rf ThirdParty_v1712/platforms/linux64Gcc/ParaView-5.4.1/" (Note: DO NOT delete ThirdParty_v1712/PararView-v5.4.1 like the Original Post as I believe this houses the installation files, not the compiled files).

I tried again and voia-la!! It finally worked!!

The End Solution Condensed:

So the end solution goes something like this for me:
  1. Delete the failed OpenFOAM-based paraview installation via:
    Code:
    rm -rf $WM_THIRD_PARTY_DIR/platforms/linux64Gcc/ParaView-5.4.1/
  1. Follow the instructions from the openfoamwiki which I'll quote below for posterity's sake:

    Quote:
    When it comes to ParaView, it's possible to avoid the need to build it from source code. If your Linux Distribution provides ParaView 5.4.0 or newer, you don't need to build ParaView from source code. Simply run:

    Code:
    paraFoam -builtin
    and it will open the case in ParaView.

    If the previous command worked, you can add the following alias command in your ~/.bashrc file:

    Code:
    alias paraFoam='paraFoam -builtin'
    In case you have an old Linux Distribution and still don't want to build ParaView from source code, get the latest binary version for Linux from ParaView's official website. Then add to your ~/.bashrc file the following line (adapt accordingly):

    Code:
    export PATH=$HOME/Downloads/ParaView-5.5.0/bin:$PATH

Now it should be able to run perfectly fine via "paraFoam -builtin"

Random Possibly-Helpful Stuff:
Note: Much of this kinda some educated guesswork and things I have necessarily tried. I'm just putting this hear as A) a reminder to myself should I encounter these kind of issues again and B) some alternatives should people find this in the future.

Some Translations of the Original Thread:

The Original Thread references a "settings.sh" several times, but on the newer installations, there's none to be found. I believe those settings are now in "OpenFOAM-v1712/etc/config.sh/" which has a bunch of files that seem to be setups for individual programs. Additionally, "OpenFOAM-v1712/etc/basrc" seems to reference those quite a bit.

The Original Thread discusses deleting the OpenFOAM-based paraview installation as "$WM_THIRD_PARTY_DIR/ParaView-5.4.1/" when it is not stored in "$WM_THIRD_PARTY_DIR/platforms/linux64Gcc/ParaView-5.4.1/"

The Original Thread discusses using "./makeParaView" to install the OpenFOAM-based paraview. I believe this must have the "-qt" flags that are referenced in "ThirdParty-v1712/BUILD.md" in order to work correctly. I think. I'm not super sure about it, but the current documentation conflicts with the Original Thread, so I figured I'd mention it.

Making Solution 2 Work (I think):

So the issue with solution 2 I believe (the reinstallation of Qt inside the OpenFOAM directory) was that ParaView was still referencing the system Qt, not the newly installed Qt.

The reasoning behind this is the contents of "OpenFOAM-v1712/etc/config.sh/paraview" contain user editable lines the reference what Qt should be referenced. The default is "qt-system", not a locally installed version of Qt. The Original Thread's changes to the "settings.sh" changed the Qt directory variable to point to the newly installed version. I would test it now, so that may be what I needed to do here.

Complete conjecture here, but maybe if you run "./makeParaView -qt 5.9.3" it will automatically be changed to point to the version in the OpenFOAM directory? It doesn't really matter for this discussion, but I figured I mention it.
wyldckat likes this.
u2berggeist is offline   Reply With Quote

Old   July 2, 2018, 17:17
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 1,055
Rep Power: 27
olesen will become famous soon enougholesen will become famous soon enough
Getting a working Qt, with all the required include files is one of the largest difficulties with building ParaView. With ParaView-5.5.x, you'll know also need a qt5 at least.


In any case, for your summary

1. build Qt as needed. ParaView recommends 5.9.3, but on opensuse leap 42.3 it has qt-5.6 something and that works fine. I've had real problems building qt-4.9 on older systems, but managed to build qt-5.6 on a few of them


2. with makeParaView, you can also specify the qt version that you just built. Eg, makeParaView qt-5.6.4 5.5.2 and it should search the platforms/ directory to find it.


Cavaet with 1712 - the QT5_DIR was not properly set in etc/config.sh/paraview. This should be corrected for OpenFOAM-v1806 (released last week).


Of course, if you use regular paraview binaries, or just want the builtin reader, "paraFoam -vtk" is the same as "paraFoam -builtin", but saves a few keystrokes.


In any case, people should realized that paraFoam is nothing special. It is simply a wrapper script that does a "touch", paraview with that file, and cleans up on exit. Nothing magic at all. For the plugins (.blockMesh, .OpenFOAM), it adds some extra logic to test if the libraries appear to be there.


/mark
olesen is offline   Reply With Quote

Old   July 2, 2018, 18:03
Default
  #3
Member
 
James Wright
Join Date: Oct 2015
Posts: 39
Rep Power: 7
u2berggeist is on a distinguished road
Firstly, Thanks for contributing some info!

Secondly:
Quote:
Originally Posted by olesen View Post
Cavaet with 1712 - the QT5_DIR was not properly set in etc/config.sh/paraview. This should be corrected for OpenFOAM-v1806 (released last week).
Was this the issue I ran into initially? Qt5 was installed on the native OS when I first start compiling everything together, and it sounds like that would be the reason that I ran into issues in the first place.

Thirdly:
Quote:
Originally Posted by olesen View Post
"paraFoam -vtk" is the same as "paraFoam -builtin", but saves a few keystrokes.
I can do you one better. I've appended "alias paraFoam='paraFoam -builtin'" to "~/OpenFOAM/OpenFOAM-v1712/etc/bashrc". Admitedly though, it wasn't my idea. It came from the OpenFOAM wiki article.
u2berggeist is offline   Reply With Quote

Reply

Tags
libqt, openfoam, paraview

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
OpenFOAM 1.6.x - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 68 April 22, 2013 12:03
interFoam & decomposition method: scotch MacGyver OpenFOAM Running, Solving & CFD 2 May 23, 2012 08:00
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 10:50


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