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.org] Error when compiling OF 5.x in RedHat 6.5 (https://www.cfd-online.com/Forums/openfoam-installation/202431-error-when-compiling-5-x-redhat-6-5-a.html)

agustinvo May 31, 2018 03:16

Error when compiling OF 5.x in RedHat 6.5
 
Good morning all,
I am installing OpenFOAM 5.x in my $HOME directory, and when it compiles the libOpenFOAM.so I got the next error:


Code:

Make/linux64GccDPInt32Opt/primitives/ints/int64/int64IO.o: In function `Foam::operator>>(Foam::Istream&, long&)':
int64IO.C:(.text+0x860): multiple definition of `Foam::operator>>(Foam::Istream&, long&)'
Make/linux64GccDPInt32Opt/primitives/ints/int32/int32IO.o:int32IO.C:(.text+0xab0): first defined here
Make/linux64GccDPInt32Opt/primitives/ints/int64/int64IO.o: In function `Foam::operator<<(Foam::Ostream&, long)':
int64IO.C:(.text+0xa80): multiple definition of `Foam::operator<<(Foam::Ostream&, long)'
Make/linux64GccDPInt32Opt/primitives/ints/int32/int32IO.o:int32IO.C:(.text+0xac0): first defined here
collect2: error: ld returned 1 exit status


Has anyone experienced this?
Many thanks in advance!

wyldckat May 31, 2018 08:26

Quick answer: I'm guessing here that you are using the default GCC 4.4 in RHEL 6.5. This version of GCC is not going to work.

The step by step installation instructions provided here: https://openfoamwiki.net/index.php/I...HEL#CentOS_6.9 - should still work on CentOS 6.5.

agustinvo May 31, 2018 08:47

Hi


I use Gcc 4.9.2, bu anyways, following your indications I managed to compile! Thank you!


All times are GMT -4. The time now is 09:21.