ThirdParty packages: modification for calling make another compiler than gcc
[openfoam-extend-OpenFOAM-1.6-ext.git] / doc / buildInstructions / Arch / Manjaro / Compilation_Manjaro_64bit.txt
blobf0174364d38215be2cae441a3458699466a38dab
1 Installation of OpenFOAM-1.6-ext on Arch - Manjaro
2 --------------------------------------------------
4 Update your Manjaro installation:
6 pacman -Syyu
8 --------------------------------------------------------------------------------
10 # Installation of additional system packages:
12 pacman -S git
13 pacman -S mercurial
14 pacman -S graphviz
15 pacman -S doxygen
17 --------------------------------------------------------------------------------
19 # Minor correction for make/gmake
20 sudo ln -s /usr/bin/make /usr/local/bin/gmake
22 --------------------------------------------------------------------------------
24 # Installation of rpm version 5.2.1 from source code
26 # Compilation of beecrypt-4.2.1
27 cd /tmp
28 wget http://downloads.sourceforge.net/project/beecrypt/beecrypt/4.2.1/beecrypt-4.2.1.tar.gz
29 tar -zxvf beecrypt-4.2.1.tar.gz
30 cd beecrypt-4.2.1; 
31 ./configure --without-python --without-cplusplus
32 make 
33 sudo make install
35 # Compilation of rpm-5.2.1
36 cd /tmp
37 wget https://launchpad.net/rpm/5.2/5.2.1/+download/rpm-5.2.1.tar.gz
38 tar -zxvf rpm-5.2.1.tar.gz
39 cd rpm-5.2.1
40 ./configure
41 make
42 sudo make install
43 # The rpm command is now available under /usr/local/bin/rpm
45 # Cleanup
46 cd /tmp
47 rm -rf beecrypt-4.2.1 beecrypt-4.2.1.tar.gz rpm-5.2.1 rpm-5.2.1.tar.gz
49 --------------------------------------------------------------------------------
51 # Download OpenFOAM-1.6-ext
53 mkdir ~/OpenFOAM
54 cd ~/OpenFOAM
55 git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext
57 --------------------------------------------------------------------------------
59 # We need to tweak our OpenFOAM setup using the prefs.sh file
61 cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE \
62    ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
64 --------------------------------------------------------------------------------
66 # We are going to use version 4.6.4 of gcc, provided by the ThirdParty packages
68 # The version of gcc 4.8.1 provided by Manjaro is too recent for the git 'master' branch.
69
70 # So the system installed compiler will only serve to compile gcc 4.6.4.
72 # Modify the etc/prefs.sh file to switch to gcc 4.6.4
73 sed -i s/"compilerInstall=System"/"compilerInstall=OpenFOAM\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh
75 # Activate the compilation of gcc 4.6.4 in the ThirdParty/AllMake.stage1 file
76 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
77 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
78 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
79 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
81 --------------------------------------------------------------------------------
83 # We are going to use the version of QT4 provided by Manjaro
84 # Unfortunately, the 'qmake'  command on Manjaro is called 'qmake-qt4'
85 # The compilation script for ParaView requires a command called 'qmake'.
86 # So we are going to make a symbolic link in order to create a 'qmake' command,
87 # but this should be seen as a bad fix. A much better fix will be contributed under
88 # 'nextRelease' branch. Until then, this will have to do.
90 sudo ln -s /usr/bin/qmake-qt4 /usr/local/bin/qmake
93 # Uncomment and modify the initialization of the variables QT_DIR in the
94 # file prefs.sh
96 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
97 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
100 # This section of the prefs.sh file should now look like this:
102 #export QT_THIRD_PARTY=1
103 export QT_DIR=/usr/local
104 export QT_BIN_DIR=$QT_DIR/bin
107 --------------------------------------------------------------------------------
109 # Source this initial OpenFOAM environment to get the basic configuration for
110 # compilation
111 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
113 # You will get some warnings about missing file for gcc-4.6.4, and problem with
114 # your compiler installation.
115 # This is quite normal, your gcc-4.6.4 compiler is not even compiled and
116 # installed yet. Patience patience...
118 # Compile the ThirdParty packages, including the gcc 4.6.4 compiler
120 cd $WM_PROJECT_DIR/ThirdParty
121 ./AllMake >& log.AllMake &
122 tail -f log.AllMake   # To keep an eye on the compilation process
124 --------------------------------------------------------------------------------
126 # Update your OpenFOAM environment to get the basic configuration from the newly
127 # compiled ThirdParty packages
129 . ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
131 # Compile OpenFOAM-1.6-ext
133 cd $WM_PROJECT_DIR
134 ./Allwmake >& log.Allwmake &  
135 tail -f log.Allwmake          # To keep an eye on the compilation process
137 --------------------------------------------------------------------------------
139 # Execute Allwmake a second time because of a bad library building sequence for
140 # the library -lfaceDecompositionMotionSolver 
142 ./Allwmake >& log.Allwmake2 & 
143 tail -f log.Allwmake2          # To keep an eye on the compilation process
145 --------------------------------------------------------------------------------
147 # Run a tutorial to check the basic functionality
149 cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily
150 blockMesh >& log.blockMesh
151 simpleFoam >& log.simpleFoam
152 paraFoam
154 --------------------------------------------------------------------------------
156 # You can also generate the Doxygen documentation, which is quite handy if
157 # you plan to poke around the OpenFOAM source code
159 cd $WM_PROJECT_DIR/doc
160 ./Allwmake
163 # You are done!
165 --------------------------------------------------------------------------------
166 Martin Beaudoin
167 October 2013