|
[Sponsors] |
[OpenFOAM.com] Install OpenFOAM 2112 in Ubuntu 22.04 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 5, 2022, 16:21 |
Install OpenFOAM 2112 in Ubuntu 22.04
|
#1 |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 4 |
Hello to all,
I would like to install OpenFOAM v2112 in debug mode in Ubuntu 22.04. The compiler used in Ubuntu 20.04 is GCC 9.4. In Ubuntu 22.04 the default is GCC 11.2.0. This is giving me problems with the installation. I have installed GCC9 with: Code:
sudo apt install gcc-9 g++-9 The error I am getting is: Code:
primitives/functions/Math/erfInv.C: In function ‘Foam::scalar Foam::Math::erfInv(Foam::scalar)’: primitives/functions/Math/erfInv.C:45:21: error: ‘numeric_limits’ is not a member of ‘std’ 45 | return std::numeric_limits<scalar>::infinity(); | ^~~~~~~~~~~~~~ primitives/functions/Math/erfInv.C:45:42: error: expected primary-expression before ‘>’ token 45 | return std::numeric_limits<scalar>::infinity(); | ^ primitives/functions/Math/erfInv.C:45:45: error: ‘::infinity’ has not been declared; did you mean ‘finite’? 45 | return std::numeric_limits<scalar>::infinity(); | ^~~~~~~~ | finite make: *** [/home/tRock/OpenFOAM/OpenFOAM-v2112/wmake/rules/General/transform:35: /home/tRock/OpenFOAM/OpenFOAM-v2112/build/linux64GccDPInt32Debug/src/OpenFOAM/primitives/functions/Math/erfInv.o] Error 1 Best Regards |
|
May 5, 2022, 17:16 |
|
#2 |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 4 |
Well,
I added to src/OpenFOAM/primitives/functions/Math/MathFunctions.H Code:
#include <limits> Edit: After compilation when running the pitzDaily tutorial with simpleFoam, I get the error: Code:
--> FOAM FATAL IO ERROR: (openfoam-2112) error in IOstream "sha1" for operation Foam::Ostream& Foam::operator<<(Foam::Ostream&, int32_t) Last edited by tRock; May 5, 2022 at 19:34. |
|
May 6, 2022, 18:03 |
|
#3 |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 4 |
Any idea, on how to solve this?
I also tried compiling with g++-9 and gcc-9 Code:
sudo apt install build-essential sudo apt-get install gcc-9 g++-9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 sudo update-alternatives --config gcc # To select gcc version [9.4.0] sudo update-alternatives --config g++ # To select g++ version[9.4.0] Code:
--> FOAM FATAL IO ERROR: (openfoam-2112) error in IOstream "sha1" for operation Foam::Ostream& Foam::operator<<(Foam::Ostream&, int32_t) How can I solve this? |
|
May 8, 2022, 00:12 |
|
#4 |
New Member
TX
Join Date: May 2022
Posts: 3
Rep Power: 4 |
I'm struggling gcc version, too.
today, I tried to compile openfoam for Ubuntu 20.04, and somehow, I would like to install 9.3.0 instead of 9.4.0, but I found it's so hard to change. I tried multiple ways, all failed. Have you ever compile openfoam in ubuntu 20.04? I got error ".../OSspecific/POSIX/POSIX.o] Error 1. |
|
May 9, 2022, 05:43 |
|
#5 | |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 4 |
Quote:
Hi, On Ubuntu 20.04 I never experienced any installation issues. |
||
May 28, 2022, 05:48 |
|
#6 |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 4 |
has anyone been able to install OF through the source in Ubuntu 22.04?
What procedure did you use to make it work? Best regards |
|
September 25, 2023, 09:37 |
|
#7 |
New Member
Chris
Join Date: Nov 2021
Posts: 12
Rep Power: 5 |
For me it worked out to complile with gcc-10. To do this you first have to install it by:
Code:
sudo apt install gcc-10 g++-10 Code:
export WM_COMPILE_CONTROL="version=10" |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] Installing OpenFOAM 2.4.0 on Ubuntu 20.04 for Windows | RKyle | OpenFOAM Installation | 5 | January 25, 2022 11:45 |
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology | wyldckat | OpenFOAM | 17 | November 10, 2017 16:54 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 15:24 |
How to install two version openfoam on ubuntu? | MAHDI1366 | OpenFOAM Installation | 1 | July 1, 2014 15:25 |
How to Install Openfoam 2.2.2 in Ubuntu 14.04? | satty_00 | OpenFOAM Installation | 7 | May 18, 2014 11:04 |