CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.com] ThirdParty-v2006 Error building gcc-4.8.5 with ./makeGcc Centos8 (https://www.cfd-online.com/Forums/openfoam-installation/242769-thirdparty-v2006-error-building-gcc-4-8-5-makegcc-centos8.html)

Huwedwards May 10, 2022 10:44

ThirdParty-v2006 Error building gcc-4.8.5 with ./makeGcc Centos8
 
Hi,

I am trying to install Openfoam-v2006 on my local machine which is running Centos8. I have been following the linked instructions (https://sourceexample.com/en/6fd29c0ca6c4680b69dd/) but when it comes to build GCC with the ./makeGcc command I get the following error:

make: *** [Makefile:886: all] Error 2
Error building: gcc-4.8.5

After much troubleshooting I haven't been able to find an explanation of what Error 2 refers to, or any others with the same issue. If anyone has experience with the same issue or could offer some guidance that would be much appreciated.

Thanks

olesen May 10, 2022 11:09

Quote:

Originally Posted by Huwedwards (Post 827750)
Hi,

I am trying to install Openfoam-v2006 on my local machine which is running Centos8. I have been following the linked instructions (https://sourceexample.com/en/6fd29c0ca6c4680b69dd/) but when it comes to build GCC with the ./makeGcc command I get the following error:

make: *** [Makefile:886: all] Error 2
Error building: gcc-4.8.5

After much troubleshooting I haven't been able to find an explanation of what Error 2 refers to, or any others with the same issue. If anyone has experience with the same issue or could offer some guidance that would be much appreciated.

Thanks


If you have centos-8 I really don't know why you would want to bother building a much, much older compiler from scratch. Simply doesn't make sense to me. If you want to use older/new compilers, by far the easiest is to install them from your system. If you need to reference different system compilers, use the WM_COMPILE_CONTROL (see etc/bashrc for comments) to pick the version. My current compilation setup:
Code:

# etc/prefs.sh
export WM_COMPILER_TYPE=system
export WM_COMPILER=Clang140
export WM_COMPILE_CONTROL="version=14.0 +lld"

On my system this equates to "/usr/bin/clang-14.0"

Huwedwards May 10, 2022 11:30

Thank you for your reply. I am attempting to use the third party packages from ThirdParty-v2006 which as far as I'm aware requires WM_COMPILER_TYPE=ThirdParty in etc/bashrc. Is it possible to build the third party packages (e.g scotch) using a system-installed compiler? If so, how would I go about doing so.

olesen May 11, 2022 05:56

Quote:

Originally Posted by Huwedwards (Post 827753)
Thank you for your reply. I am attempting to use the third party packages from ThirdParty-v2006 which as far as I'm aware requires WM_COMPILER_TYPE=ThirdParty in etc/bashrc. Is it possible to build the third party packages (e.g scotch) using a system-installed compiler? If so, how would I go about doing so.


Using the system compiler for other ThirdParty components is completely standard.


The main (only?) reason for making your own ThirdParty gcc etc would be if you have a really, really old operating system with an old compiler (eg, gcc-4.4) that does not support c++11. The only other reason (what I have) is on new system but need to check if the OpenFOAM code is still acceptable for old compilers.

Hughtong November 4, 2023 07:41

Problem with too high gcc version
 
Quote:

Originally Posted by olesen (Post 827818)
Using the system compiler for other ThirdParty components is completely standard.


The main (only?) reason for making your own ThirdParty gcc etc would be if you have a really, really old operating system with an old compiler (eg, gcc-4.4) that does not support c++11. The only other reason (what I have) is on new system but need to check if the OpenFOAM code is still acceptable for old compilers.

There's another problem...If you got too high gcc version, up to gcc-11.*
When you using this compiler to compile OpenFOAM-2.3.x, got error:

warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
335 | register label i = min(this->size_, newSize);

Will this effect the compile process?


All times are GMT -4. The time now is 19:13.