|
[Sponsors] |
[OpenFOAM.com] paraFoam cannot open due to Qt issues - [Solved/Information] |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 29, 2018, 12:58 |
paraFoam cannot open due to Qt issues - [Solved/Information]
|
#1 | |
Member
James Wright
Join Date: Oct 2015
Posts: 40
Rep Power: 11 |
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 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:
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. |
||
July 2, 2018, 17:17 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
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 |
|
July 2, 2018, 18:03 |
|
#3 | |
Member
James Wright
Join Date: Oct 2015
Posts: 40
Rep Power: 11 |
Firstly, Thanks for contributing some info!
Secondly: Quote:
Thirdly: 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. |
||
Tags |
libqt, openfoam, paraview |
|
|
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 |