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

[OpenFOAM.org] OF7 compiling error on RHEL 6.5

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

Like Tree4Likes
  • 2 Post By wyldckat
  • 1 Post By ssdoria
  • 1 Post By ssdoria

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2019, 15:47
Default OF7 compiling error on RHEL 6.5
  #1
New Member
 
Sidney Doria
Join Date: Jul 2019
Posts: 3
Rep Power: 7
ssdoria is on a distinguished road
I'm using a RHEL 6.5 with GCC 8.2 and OF6 compiles well, but OF7 throws the following:


Code:
wmake dummy
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100   -IlnInclude -I. -I/opt/share/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude -I/opt/share/OpenFOAM/OpenFOAM-7/src/OSspecific/POSIX/lnInclude   -fPIC -fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed /opt/share/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/UPstream.o /opt/share/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/UIPread.o /opt/share/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/UOPwrite.o -L/opt/share/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib \
            -lpthread  -o /opt/share/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/dummy/libPstream.so
collect2: fatal error: cannot find 'ld'
compilation terminated.
make: *** [/opt/share/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/dummy/libPstream.so] Error 1
GCC version:

Code:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/share/gcc/8.2.0/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --disable-multilib --enable-languages=c,c++,fortran --with-isl=/opt/share/isl/0.18/ --with-mpc=/opt/share/mpc/1.0.3/ --with-mpfr=/opt/share/mpfr/3.1.4/ --with-gmp=/opt/share/gmp/6.1.0/ --prefix=/opt/share/gcc/8.2.0/
Thread model: posix
gcc version 8.2.0 (GCC)
ld version:

Code:
ld -v
GNU ld version 2.20.51.0.2-5.36.el6 20100205

Last edited by wyldckat; July 25, 2019 at 19:59. Reason: Added [CODE][/CODE] markers
ssdoria is offline   Reply With Quote

Old   July 25, 2019, 20:02
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
  1. Edit these two text files in OpenFOAM-7:
    Code:
    wmake/rules/linux64Gcc/c++
    wmake/rules/linux64Gcc/c
  2. Remove from the last two lines in that file the following argument:
    Code:
    -fuse-ld=bfd
  3. Try building OpenFOAM once again.
This is because the conventional installations of GCC+Binutils will provide the gold and bfd variants of ld, but your installation only has the bfd one apparently.


Knowing how you install GCC+Binutils would make it easier to figure out in which situations we need this change.
AnthonyP and anon_q like this.
__________________
wyldckat is offline   Reply With Quote

Old   July 25, 2019, 23:34
Default It worked like a charm!
  #3
New Member
 
Sidney Doria
Join Date: Jul 2019
Posts: 3
Rep Power: 7
ssdoria is on a distinguished road
Bruno, it worked like a charm. Thanx a lot.

Obrigadão. Abri uma garrafa de ginja em sua homenagem! Abraços,
gabrielfelix likes this.
ssdoria is offline   Reply With Quote

Old   July 27, 2019, 10:13
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by ssdoria View Post
Bruno, it worked like a charm. Thanx a lot.
You're welcome. Please also let us know how GCC+Binutils in that machine.
wyldckat is offline   Reply With Quote

Old   July 27, 2019, 21:33
Default
  #5
New Member
 
Sidney Doria
Join Date: Jul 2019
Posts: 3
Rep Power: 7
ssdoria is on a distinguished road
binutils-2.20.51.0.2-5.36.el6.x86_64
Gcc is 8.2 loaded by module. This is an HPC.

module unload
gcc/8.2.0 isl/0.18 mpfr/3.1.4 paraview/4
gmp/6.1.0 mpc/1.0.3 openmpi/3.1.2 zlib/1.2.8

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/share/gcc/8.2.0/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/lto-
wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --disable-multilib --enable-languages=c,c++,fortran --
with-isl=/opt/share/isl/0.18/ --with-mpc=/opt/share/mpc/1.0.3/ --with-mpfr=/opt/sha
re/mpfr/3.1.4/ --with-gmp=/opt/share/gmp/6.1.0/ --prefix=/opt/share/gcc/8.2.0/
Thread model: posix
gcc version 8.2.0 (GCC)
wyldckat likes this.
ssdoria is offline   Reply With Quote

Old   August 3, 2019, 15:36
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
@ssdoria: Many thanks! OK, then it's a custom build done by the HPC system administrators... I guess that the "binutils" they custom built only has a single ld, hence the error.
wyldckat is offline   Reply With Quote

Reply

Tags
of7, rhel6

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
[OpenFOAM.org] Error when compiling OF 5.x in RedHat 6.5 agustinvo OpenFOAM Installation 2 May 31, 2018 09:47
[OLAFLOW] wmake error when installing on RHEL 6.5 Lewis Liang OpenFOAM Community Contributions 10 November 26, 2016 11:10
[OpenFOAM.org] problems with installation of OpenFOAM-2.1.1 on cluster with RHEL 6.5 lisa_china OpenFOAM Installation 1 March 29, 2016 09:08
Fluent compliance with RHEL 4 hervé FLUENT 2 January 25, 2006 05:39


All times are GMT -4. The time now is 01:48.