INSTALLATION GUIDE: OpenFOAM®®-1.6-ext from git repository in DEBIAN SQUEEZE:
For those who use Debian, here you are the errors I found when installing OpenFOAM®®-1.6-ext, and how I fixed them.
**************************************************
~ $ mkdir OpenFOAM®®
~ $ cd OpenFOAM®®
~/OpenFOAM®® $ git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM®®-1.6-ext
~/OpenFOAM®® $ echo " source ~/OpenFOAM®®/OpenFOAM®®-1.6-ext/etc/bashrc " >> ~/.bashrc
~/OpenFOAM®® $ source ~/.bashrc
~/usr/bin $ ln -s make gmake
~ $ su aptitude install git-core qt4-qmake qt4-dev-tools binutils-dev flex bison build-essential libreadline5-dev wget zlib1g-dev rpm cmake python-dev libxt-dev gnuplot python-numpy libtool autoconf gitk git-gui
~/OpenFOAM®®/OpenFOAM®®-1.6-ext/etc $ cp prefs.sh-EXAMPLE prefs.sh
Edit prefs.sh to specify the path to the system programs:
compilerInstall=System
export WM_COMPILER_DIR=/usr
export QT_DIR=/usr
export QT_BIN_DIR=$QT_DIR/bin
export PARAVIEW_SYSTEM=1
export PARAVIEW_DIR=/home/.../ParaView-3.8.0-RC1-Linuxx86_64/ParaView-3.8.0-RC1-Linux-x86_64
export PARAVIEW_BIN_DIR=$PARAVIEW_DIR/bin
THIRDPARTY COMPILATION: ~/OpenFOAM®®/OpenFOAM®®-1.6-ext/ThirdParty $ ./AllMake
Mesquite-2.1.2 source-code gave some compilation errors. Thus, I have used the latest available version, updating the mesquite version in:
~/OpenFOAM®®/OpenFOAM®®-1.6-ext/ThirdParty/AllMake.stage3: rpm_make -p mesquite-2.99 -s mesquite-2.99.spec -u
software.sandia.gov/~jakraft/mesquite-2.99.tar.gz
in /OpenFOAM®®/OpenFOAM®®-1.6-ext/etc/settings.sh :
[ -z "$MESQUITE_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.99/platforms/$WM_OPTIONS ] && { _foamSource $WM_THIRD_PARTY_DIR/packages/mesquite-2.99/platforms/$WM_OPTIONS/etc/mesquite-2.99.sh }
and in ~/OpenFOAM®®/OpenFOAM®®-1.6-ext/ThirdParty/rpmBuild/SPECS/ :
mv mesquite-2.1.2.spec mesquite-2.99.spec
vim mesquite-2.99.spec : replace mesquite-2.1.2 with mesquite-2.99 ~/OpenFOAM®® $ cd OpenFOAM®®-1.6-ext/ ./Allwmake
OPENFOAM COMPILATION: ~/OpenFOAM®®/OpenFOAM®®-1.6-ext $ ./Allwmake
At this point, I have fixed the following errors:
Compilation of /OpenFOAM®®/OpenFOAM®®-1.6-ext/src gives the following message:
Error: Mesquite_all_headers.hpp No such file or directory
Add:
-I$(MESQUITE_INCLUDE_DIR) \
and
-L$(MESQUITE_LIB_DIR) \
-lmesquite
to:
/meshMotion/mesquiteMotionSolver/Make/options
/dynamicFvMesh/Make/options
Compile again
~/OpenFOAM®®/OpenFOAM®®-1.6-ext $ ./Allwmake
A new error appears when compiling the /OpenFOAM®®-1.6-ext/applications/:
"
/home/maria/OpenFOAM®®/OpenFOAM®®-1.6-ext/lib/linux64GccDPOpt/openmpi-1.4.3/libPstream.so so try adding it to the linker command line
/home/maria/OpenFOAM®®/OpenFOAM®®-1.6-ext/lib/linux64GccDPOpt/openmpi-1.4.3/libPstream.so: could not read symbols: Invalid operation
"
To fix this: In $WM_DIR/rules/linux64Gcc/c++ change LINKLIBSO and LINKEXE to:
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed
Compile again
~/OpenFOAM®®/OpenFOAM®®-1.6-ext $ ./Allwmake
Test the installation:
~/OpenFOAM®®/OpenFOAM®®-1.6-ext $ foamInstallationTest
....
Summary
----------------------------------
Base configuration ok.
Critical systems ok.
done.
....
CREATE YOUR RUN DIRECTORY ~/OpenFOAM®® $ mkdir -p $FOAM_RUN
**************************************************
Every little helps!
María