CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.com] ThirdParty-v2006 Error building gcc-4.8.5 with ./makeGcc Centos8

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2022, 11:44
Default ThirdParty-v2006 Error building gcc-4.8.5 with ./makeGcc Centos8
  #1
New Member
 
Huw
Join Date: Feb 2021
Posts: 2
Rep Power: 0
Huwedwards is on a distinguished road
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
Huwedwards is offline   Reply With Quote

Old   May 10, 2022, 12:09
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Huwedwards View Post
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"
olesen is offline   Reply With Quote

Old   May 10, 2022, 12:30
Default
  #3
New Member
 
Huw
Join Date: Feb 2021
Posts: 2
Rep Power: 0
Huwedwards is on a distinguished road
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.
Huwedwards is offline   Reply With Quote

Old   May 11, 2022, 06:56
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Huwedwards View Post
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.
olesen is offline   Reply With Quote

Old   November 4, 2023, 08:41
Default Problem with too high gcc version
  #5
New Member
 
Yanjun Tong
Join Date: Jul 2020
Posts: 13
Rep Power: 5
Hughtong is on a distinguished road
Quote:
Originally Posted by olesen View Post
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?
Hughtong is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[foam-extend.org] foam-extend-4.1 cannot compile on Centos8 Ya_Squall2010 OpenFOAM Installation 2 July 22, 2020 03:03
[foam-extend.org] foam-extend-4.0 gcc errors & maybe paraFoam powerline332 OpenFOAM Installation 3 May 24, 2018 22:16
OpenFOAM 1.6 ext fportela OpenFOAM Installation 11 December 26, 2013 19:55
Thirdparty mesquite-2.1.2 compile fix for newer gcc kmooney OpenFOAM Bugs 3 May 10, 2012 10:27


All times are GMT -4. The time now is 02:33.