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

Building ParaView 3.10.1 with custom Qt 4.6.4

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

Rate this Entry

Building ParaView 3.10.1 with custom Qt 4.6.4

Posted July 25, 2011 at 19:39 by wyldckat
Updated October 16, 2011 at 10:22 by wyldckat (had a bad link...)

<-- Related issues to ParaView with OpenFOAM - Fixes and solutions

This blog post is for those users who want to build ParaView 3.10.1 that comes with OpenFOAM's ThirdParty, version 2.0.0/x. It's based on a previous blog post of mine: Building ParaView 3.8.0 with custom Qt 4.6.3


In case you don't know, ParaView 3.10.1 that comes with OpenFOAM 2.0.0/x, during ParaView's compilation, it states that only Qt 4.6 is supported... oh well . So, in case your system's Qt is already using 4.7, then you should play safe and follow the instructions in this blog post. If you don't know which version it has, run:
Code:
qmake --version
So, this is pretty much just copy paste of this code onto your terminal, when you already have your OpenFOAM environment ready to be used:
Code:
foam3rdParty

mkdir -p download
cd download
wget ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-4.6.4.tar.gz
cd ..
tar -xzf download/qt-everywhere-opensource-src-4.6.4.tar.gz

./makeQt qt-4.6.4 > makeQt.log 2>&1 && \
time ./makeParaView -qmake  ${WM_THIRD_PARTY_DIR}/platforms/$WM_ARCH$WM_COMPILER/qt-4.6.4/bin/qmake > makePV.log 2>&1

echo 'export LD_LIBRARY_PATH=${WM_THIRD_PARTY_DIR}/platforms/$WM_ARCH$WM_COMPILER/qt-4.6.4/lib:$LD_LIBRARY_PATH' >> $WM_PROJECT_DIR/etc/bashrc
echo 'export PATH=${WM_THIRD_PARTY_DIR}/platforms/$WM_ARCH$WM_COMPILER/qt-4.6.4/bin:$PATH'  >> $WM_PROJECT_DIR/etc/bashrc

wmSET

echo "Are these next two lines the same?"
which paraview
ls $ParaView_DIR/bin/paraview
The last two lines should output the same; otherwise, it's very likely that ParaView didn't build well Check the two logs makeQt.log and makePV.log and check what went wrong.
If it went well, then read the instructions left to do from here, right after "./makeParaView".

Why don't I simply put this in a script? Laziness And you should learn a bit about this in the mean time too

NOTES:
  • On Fedora 15 (and above) you must run the following command before building ParaView:
    Code:
    sed -i -e 's=ptrdiff_t=std::ptrdiff_t='  ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx
  • On Ubuntu 11.10 the previous solution should also work, but you can also follow these instructions:
    Quote:
    Originally Posted by kpsl View Post
    This is an issue with gcc-4.6.1. It can be solved by editing the file:
    Code:
    ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx
    Aand including the line:
    Code:
    #include <stddef.h>

Good luck!
Bruno
« Prev     Main     Next »
Total Comments 5

Comments

  1. Old Comment
    Good morning Bruno,

    It works fine. Thank you very much.

    Aurelien
    permalink
    Posted July 26, 2011 at 03:08 by Aurelien Thinat Aurelien Thinat is offline
  2. Old Comment
    Good evening all,

    I have a Fedora 14 system that I want to put OpenFOAM-2.0.1 on.
    After that build was successfully completed I followed the above instructions and I appeared to have succeed in building ParaView.

    Then I clicked on the "here" link and built the PV3Reader utilities it didn't work so well. I have a compressed log showing the errors but I haven't figured out how to attach it to this comment.

    Here are some of the errors:
    + wmake libso vtkPV3Readers
    wmakeLnInclude: linking include files to ./lnInclude
    Making dependency list for source file vtkPV3Readers.C
    could not open file vtkDataArraySelection.h for source file vtkPV3Readers.C
    could not open file vtkDataSet.h for source file vtkPV3Readers.C
    could not open file vtkMultiBlockDataSet.h for source file vtkPV3Readers.C
    could not open file vtkInformation.h for source file vtkPV3Readers.C
    etc.

    Also:

    CMake Error at CMakeLists.txt:12 (FIND_PACKAGE):
    Could not find module FindParaView.cmake or a configuration file for
    package ParaView.

    Adjust CMAKE_MODULE_PATH to find FindParaView.cmake or set ParaView_DIR to
    the directory containing a CMake configuration file for ParaView. The file
    will have one of the following names:

    ParaViewConfig.cmake
    paraview-config.cmake

    I am very new to OpenFOAM but I am very interested in it.

    bhomer
    permalink
    Posted October 15, 2011 at 21:52 by bhomer bhomer is offline
  3. Old Comment
    Greetings bhomer,

    Sadly we can't attach files to the comment-posts

    I've created a virtual machine with Fedora 14 x64_64 in it and followed my own instructions and finished with success.

    The instructions that you might be missing are the ones shown here: Fedora 15 install help - post #4
    The relevant detail is the list of packages - I installed the whole nine yards in Fedora as root:
    Code:
    yum install gcc gcc-c++ binutils-devel flex git-core wget cmake qt4-devel python-devel readline-devel bison ncurses-devel tix.x86_64 glibc-devel flex zlib-devel libXt-devel binutils-static python-devel qt-devel cmake flex patch
    Best regards and good luck!
    Bruno
    permalink
    Posted October 16, 2011 at 10:21 by wyldckat wyldckat is offline
  4. Old Comment
    Good afternoon,
    I followed the yum install instructions given above. This uploaded 9 more files but unfortunately it did not help.

    When I execute, from the PV3Readers directory, the following line

    wmake libso vtkPV3Readers > make.log 2>&1

    I get:
    wmakeLnInclude: linking include files to ./lnInclude
    Making dependency list for source file vtkPV3Readers.C
    could not open file vtkDataArraySelection.h for source file vtkPV3Readers.C
    could not open file vtkDataSet.h for source file vtkPV3Readers.C
    could not open file vtkMultiBlockDataSet.h for source file vtkPV3Readers.C
    could not open file vtkInformation.h for source file vtkPV3Readers.C
    SOURCE=vtkPV3Readers.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/home/bhomer/OpenFOAM/ThirdParty-2.0.1/platforms/linuxGcc/paraview-3.10.1/include/paraview-3.10 -IlnInclude -I. -I/home/bhomer/OpenFOAM/OpenFOAM-2.0.1/src/OpenFOAM/lnInclude -I/home/bhomer/OpenFOAM/OpenFOAM-2.0.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/vtkPV3Readers.o
    vtkPV3Readers.C:35:35: fatal error: vtkDataArraySelection.h: No such file or directory
    compilation terminated.
    make: *** [Make/linuxGccDPOpt/vtkPV3Readers.o] Error 1

    Both OpenFOAM and paraview are in place and work. At this point I cannot get the PV3Readers to function.

    bhomer
    permalink
    Posted October 17, 2011 at 18:51 by bhomer bhomer is offline
  5. Old Comment
    Hi bhomer,

    I've got a feeling the problem is that ParaView somehow is installed elsewhere...

    OK, lets try this - create a new thread here: http://www.cfd-online.com/Forums/openfoam-installation/ - describe your problem and attach the compressed logs that you've gotten for ParaView, Qt and PV3*. That way I can try and figure out better what's going on!

    By the way, Fedora 14 i686 or x86_64?

    Best regards,
    Bruno
    permalink
    Posted October 18, 2011 at 17:19 by wyldckat wyldckat is offline
 

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