Difference between revisions of "Installation/Linux/foam-extend-4.0/Ubuntu"
(→Ubuntu 16.04: Started working on Ubuntu 18.04) |
(→Ubuntu 18.04: Switch to using GCC 5, just to avoid hassles with trying to use GCC 7) |
||
Line 70: | Line 70: | ||
<bash>sudo apt-get install git-core build-essential binutils-dev cmake flex \ | <bash>sudo apt-get install git-core build-essential binutils-dev cmake flex \ | ||
zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev \ | zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev \ | ||
− | libxt-dev rpm mercurial graphviz python python-dev | + | libxt-dev rpm mercurial graphviz python python-dev gcc-5 g++-5 |
</bash> | </bash> | ||
Line 81: | Line 81: | ||
echo export WM_THIRD_PARTY_USE_BISON_27=1 >> etc/prefs.sh | echo export WM_THIRD_PARTY_USE_BISON_27=1 >> etc/prefs.sh | ||
echo export QT_SELECT=qt4 >> etc/prefs.sh | echo export QT_SELECT=qt4 >> etc/prefs.sh | ||
+ | echo "export WM_CC='gcc-5'" >> etc/prefs.sh | ||
+ | echo "export WM_CXX='g++-5'" >> etc/prefs.sh | ||
source etc/bashrc</bash> | source etc/bashrc</bash> | ||
Line 86: | Line 88: | ||
Then before running {{tt|Allwmake.firstInstall}}, run the following commands: | Then before running {{tt|Allwmake.firstInstall}}, run the following commands: | ||
<bash>sed -i -e 's=rpmbuild --define=rpmbuild --define "_build_id_links none" --define=' ThirdParty/tools/makeThirdPartyFunctionsForRPM | <bash>sed -i -e 's=rpmbuild --define=rpmbuild --define "_build_id_links none" --define=' ThirdParty/tools/makeThirdPartyFunctionsForRPM | ||
+ | sed -i -e 's/gcc/\$(WM_CC)/' wmake/rules/linux64Gcc/c | ||
+ | sed -i -e 's/g++/\$(WM_CXX)/' wmake/rules/linux64Gcc/c++ | ||
</bash> | </bash> | ||
[[Category:Installing OpenFOAM on Linux]] [[Category:Installing OpenFOAM on Ubuntu]] | [[Category:Installing OpenFOAM on Linux]] [[Category:Installing OpenFOAM on Ubuntu]] |
Revision as of 20:47, 1 September 2018
1 Introduction
This page is dedicated to preparing an Ubuntu system for installing the foam-extend project .
Contents
2 Ubuntu versions
2.1 Ubuntu 12.04
Run the following commands:
sudo apt-get update
sudo apt-get install git-core build-essential binutils-dev flex \ bison zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev \ libxt-dev rpm mercurial graphviz python python-dev
Then follow the instructions on the previous page, subsection Get the source code, although keep in mind to run the following commands before you run source etc/bashrc:
echo export WM_COMPILER=Gcc49 >> etc/prefs.sh echo export WM_THIRD_PARTY_USE_GCC_492=1 >> etc/prefs.sh echo export compilerInstall=FOAM >> etc/prefs.sh
More specifically, the commands should be executed something like this:
cd ~/foam/foam-extend-4.0 echo export WM_COMPILER=Gcc49 >> etc/prefs.sh echo export WM_THIRD_PARTY_USE_GCC_492=1 >> etc/prefs.sh echo export compilerInstall=FOAM >> etc/prefs.sh source etc/bashrc
2.2 Ubuntu 14.04
Run the following commands:
sudo apt-get update
sudo apt-get install git-core build-essential binutils-dev cmake flex \ bison zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev libiberty-dev \ libxt-dev rpm mercurial graphviz python python-dev
Then continue following the instructions on the previous page, subsection Get the source code.
2.3 Ubuntu 16.04
Run the following commands:
sudo apt-get update
sudo apt-get install git-core build-essential binutils-dev cmake flex \ zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev libiberty-dev \ libxt-dev rpm mercurial graphviz python python-dev
Then follow the instructions on the previous page, subsection Get the source code, although keep in mind to run the following commands before you run source etc/bashrc:
echo export WM_THIRD_PARTY_USE_BISON_27=1 >> etc/prefs.sh
More specifically, the commands should be executed something like this:
cd ~/foam/foam-extend-4.0 echo export WM_THIRD_PARTY_USE_BISON_27=1 >> etc/prefs.sh source etc/bashrc
2.4 Ubuntu 18.04
WARNING: These instructions are currently being written and under testing!
Run the following commands:
sudo apt-get update
sudo apt-get install git-core build-essential binutils-dev cmake flex \ zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev \ libxt-dev rpm mercurial graphviz python python-dev gcc-5 g++-5
Then follow the instructions on the previous page, subsection Get the source code, although keep in mind to run the following commands before you run source etc/bashrc:
echo export WM_THIRD_PARTY_USE_BISON_27=1 >> etc/prefs.sh
More specifically, the commands should be executed something like this:
cd ~/foam/foam-extend-4.0 echo export WM_THIRD_PARTY_USE_BISON_27=1 >> etc/prefs.sh echo export QT_SELECT=qt4 >> etc/prefs.sh echo "export WM_CC='gcc-5'" >> etc/prefs.sh echo "export WM_CXX='g++-5'" >> etc/prefs.sh source etc/bashrc
Then before running Allwmake.firstInstall, run the following commands:
sed -i -e 's=rpmbuild --define=rpmbuild --define "_build_id_links none" --define=' ThirdParty/tools/makeThirdPartyFunctionsForRPM sed -i -e 's/gcc/\$(WM_CC)/' wmake/rules/linux64Gcc/c sed -i -e 's/g++/\$(WM_CXX)/' wmake/rules/linux64Gcc/c++