|
[Sponsors] |
[OpenFOAM.com] Install OpenFOAM 2112 in Ubuntu 22.04 |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 3 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 3 ![]() |
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 18:34. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 3 ![]() |
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? |
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
TX
Join Date: May 2022
Posts: 3
Rep Power: 3 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#5 | |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 3 ![]() |
Quote:
Hi, On Ubuntu 20.04 I never experienced any installation issues. |
||
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Join Date: Mar 2022
Posts: 24
Rep Power: 3 ![]() |
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 |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 10:45 |
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology | wyldckat | OpenFOAM | 17 | November 10, 2017 15:54 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 14:24 |
How to install two version openfoam on ubuntu? | MAHDI1366 | OpenFOAM Installation | 1 | July 1, 2014 14:25 |
How to Install Openfoam 2.2.2 in Ubuntu 14.04? | satty_00 | OpenFOAM Installation | 7 | May 18, 2014 10:04 |