This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/doc/buildInstructions/Arch/Manjaro/Compilation_Manjaro_64bit.txt
2013-10-08 01:25:17 -04:00

167 lines
5.7 KiB
Text

Installation of OpenFOAM-1.6-ext on Arch - Manjaro
--------------------------------------------------
Update your Manjaro installation:
pacman -Syyu
--------------------------------------------------------------------------------
# Installation of additional system packages:
pacman -S git
pacman -S mercurial
pacman -S graphviz
pacman -S doxygen
--------------------------------------------------------------------------------
# Minor correction for make/gmake
sudo ln -s /usr/bin/make /usr/local/bin/gmake
--------------------------------------------------------------------------------
# Installation of rpm version 5.2.1 from source code
# Compilation of beecrypt-4.2.1
cd /tmp
wget http://downloads.sourceforge.net/project/beecrypt/beecrypt/4.2.1/beecrypt-4.2.1.tar.gz
tar -zxvf beecrypt-4.2.1.tar.gz
cd beecrypt-4.2.1;
./configure --without-python --without-cplusplus
make
sudo make install
# Compilation of rpm-5.2.1
cd /tmp
wget https://launchpad.net/rpm/5.2/5.2.1/+download/rpm-5.2.1.tar.gz
tar -zxvf rpm-5.2.1.tar.gz
cd rpm-5.2.1
./configure
make
sudo make install
# The rpm command is now available under /usr/local/bin/rpm
# Cleanup
cd /tmp
rm -rf beecrypt-4.2.1 beecrypt-4.2.1.tar.gz rpm-5.2.1 rpm-5.2.1.tar.gz
--------------------------------------------------------------------------------
# Download OpenFOAM-1.6-ext
mkdir ~/OpenFOAM
cd ~/OpenFOAM
git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
--------------------------------------------------------------------------------
# We need to tweak our OpenFOAM setup using the prefs.sh file
cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE \
~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
--------------------------------------------------------------------------------
# We are going to use version 4.6.4 of gcc, provided by the ThirdParty packages
#
# The version of gcc 4.8.1 provided by Manjaro is too recent for the git 'master' branch.
#
# So the system installed compiler will only serve to compile gcc 4.6.4.
# Modify the etc/prefs.sh file to switch to gcc 4.6.4
sed -i s/"compilerInstall=System"/"compilerInstall=OpenFOAM\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
# Activate the compilation of gcc 4.6.4 in the ThirdParty/AllMake.stage1 file
sed -i 0,/"#( rpm_make -p gmp-5.1.2"/s//"( rpm_make -p gmp-5.1.2"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1
sed -i 0,/"#( rpm_make -p mpfr-3.1.2"/s//"( rpm_make -p mpfr-3.1.2"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1
sed -i 0,/"#( rpm_make -p mpc-1.0.1"/s//"( rpm_make -p mpc-1.0.1"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1
sed -i 0,/"#( rpm_make -p gcc-4.6.4"/s//"( rpm_make -p gcc-4.6.4"/ ~/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/AllMake.stage1
--------------------------------------------------------------------------------
# We are going to use the version of QT4 provided by Manjaro
# Unfortunately, the 'qmake' command on Manjaro is called 'qmake-qt4'
# The compilation script for ParaView requires a command called 'qmake'.
# So we are going to make a symbolic link in order to create a 'qmake' command,
# but this should be seen as a bad fix. A much better fix will be contributed under
# 'nextRelease' branch. Until then, this will have to do.
sudo ln -s /usr/bin/qmake-qt4 /usr/local/bin/qmake
# Uncomment and modify the initialization of the variables QT_DIR in the
# file prefs.sh
sed -i s/"#export QT_DIR=path_to_system_installed_qt"/"export QT_DIR=\/usr\/local"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
sed -i s/"#export QT_BIN_DIR=\$QT_DIR\/bin"/"export QT_BIN_DIR=\$QT_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
# This section of the prefs.sh file should now look like this:
#export QT_THIRD_PARTY=1
export QT_DIR=/usr/local
export QT_BIN_DIR=$QT_DIR/bin
--------------------------------------------------------------------------------
# Source this initial OpenFOAM environment to get the basic configuration for
# compilation
. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
# You will get some warnings about missing file for gcc-4.6.4, and problem with
# your compiler installation.
# This is quite normal, your gcc-4.6.4 compiler is not even compiled and
# installed yet. Patience patience...
# Compile the ThirdParty packages, including the gcc 4.6.4 compiler
cd $WM_PROJECT_DIR/ThirdParty
./AllMake >& log.AllMake &
tail -f log.AllMake # To keep an eye on the compilation process
--------------------------------------------------------------------------------
# Update your OpenFOAM environment to get the basic configuration from the newly
# compiled ThirdParty packages
. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
# Compile OpenFOAM-1.6-ext
cd $WM_PROJECT_DIR
./Allwmake >& log.Allwmake &
tail -f log.Allwmake # To keep an eye on the compilation process
--------------------------------------------------------------------------------
# Execute Allwmake a second time because of a bad library building sequence for
# the library -lfaceDecompositionMotionSolver
./Allwmake >& log.Allwmake2 &
tail -f log.Allwmake2 # To keep an eye on the compilation process
--------------------------------------------------------------------------------
# Run a tutorial to check the basic functionality
cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
blockMesh >& log.blockMesh
simpleFoam >& log.simpleFoam
paraFoam
--------------------------------------------------------------------------------
# You can also generate the Doxygen documentation, which is quite handy if
# you plan to poke around the OpenFOAM source code
cd $WM_PROJECT_DIR/doc
./Allwmake
# You are done!
--------------------------------------------------------------------------------
Martin Beaudoin
October 2013