CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Build of PV4blockMeshReader (https://www.cfd-online.com/Forums/openfoam-installation/135944-build-pv4blockmeshreader.html)

nathanael May 20, 2014 06:55

Build of PV4blockMeshReader
 
Hello

The compilation of PV4blockMeshReader give me error saying that Qt was not found:
Code:

-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /sw/Defaults/bin/gcc
-- Check for working C compiler: /sw/Defaults/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /sw/Defaults/bin/g++
-- Check for working CXX compiler: /sw/Defaults/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found unsuitable Qt version "" from NOTFOUND
CMake Error at CMakeLists.txt:46 (QT4_WRAP_CPP):
  Unknown CMake command "QT4_WRAP_CPP".


-- Configuring incomplete, errors occurred!

Adding FIND_PACKAGE(Qt4 REQUIRED) in CMakeLists.txt give good results from configuration and compilation phase but still error during linking:
Code:

-- Looking for Q_WS_MAC - not found
-- Found Qt4: /sw/Qt/Qt-4.8.4/bin/qmake (found version "4.8.4")
-- Found Qt4: /sw/Qt/qt-4.8.5/bin/qmake (found version "4.8.4")
-- Configuring done
-- Generating done

Code:

[ 82%] Building CXX object CMakeFiles/PV4blockMeshReader_SM.dir/vtkPV4blockMeshReaderClientServer.cxx.o
[ 88%] Building CXX object CMakeFiles/PV4blockMeshReader_SM.dir/PV4blockMeshReader_SMInit.cxx.o
[ 94%] Building CXX object CMakeFiles/PV4blockMeshReader_SM.dir/PV4blockMeshReader_SM_Plugin.cxx.o
[100%] Building CXX object CMakeFiles/PV4blockMeshReader_SM.dir/moc_PV4blockMeshReader_SM_Plugin.cxx.o
make[2]: *** No rule to make target `/sw/Qt/qt-4.8.5/lib/libQtHelp.so', needed by `/sw/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/paraview-4.1/libPV4blockMeshReader_SM.so'.  Stop.
make[1]: *** [CMakeFiles/PV4blockMeshReader_SM.dir/all] Error 2
make: *** [all] Error 2

I try adding ${QT_LIBRARIES} in TARGET_LINK_LIBRARIES but without success.

Any help would be appreciated!

Thank in advance.

Nathanaël

Note: Open FOAM and paraview from openFoam are working fine
Code:

[12:47:07] nathanael@localhost:$ which paraview
/sw/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc48/ParaView-4.1.0/bin/paraview


nathanael May 20, 2014 09:45

Okay, I found the problem: wrong qt version used.

Now it's compiling but paraview refuse to load the plugin:
Code:

ERROR: In /sw/OpenFOAM/ThirdParty-2.3.x/ParaView-4.1.0/ParaViewCore/ClientServerCore/Core/vtkPVPluginLoader.cxx, line 302
vtkPVPluginLoader (0x2f704e0): /sw/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64Gcc48DPOpt/lib/libsurfMesh.so: undefined symbol: _ZN4Foam13HashTableCore13canonicalSizeEi

This seems to be related to mantisbt bug_id=195

The patch proposed does not correct the problem for Open FOAM 2.3.x.

wyldckat May 21, 2014 16:18

Greetings Nathanaël,

I can't figure out if you're using a Linux distribution or Mac OS X :(.
Can you please provide more information, including an indication of which installation instructions you're following?

Best regards,
Bruno

nathanael May 23, 2014 04:08

[solved] Build of PV4blockMeshReader
 
Hello Bruno,

My distribution is Linux Centos 6.5 and the instruction I follow are those from repository release (http://www.openfoam.org/download/git.php)

As my distrib offer only Qt 4.6.2, I compile Qt from source (not using OpenFOAM script but without differences.)

The first problem was due to wrong Qt version searched (cmake search for Qt in folder '/sw/Qt/qt-4.8.5' and this version was removed and replaced by '/sw/Qt/Qt-4.8.4' after compilation of Paraview). After discovering that I recompile Paraview using OpenFOAM script and PV4Readers. This gives me the dynamic linking problem as described in my previous post.

This night I clean the modified CMakeLists.txt of PV4Readers and now it is working fine!

Thanks for the help and sorry to prevent late for solving my problem.

Nathanaël.


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