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

OpenFoam 2.1.x /2.2.0 compilation failed on Ubuntu 12.04/10 64bit

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2013, 18:10
Unhappy OpenFoam 2.1.x /2.2.0 compilation failed on Ubuntu 12.04/10 64bit
  #1
Senior Member
 
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 13
keepfit is on a distinguished road
hi, Foamers,

I have been using OpenFOAM 2.1.1 for a while, now I wanna install OpenFOAM on a thinkpad x200 laptop.

So far I tried:

1) Fresh installed Ubuntu 12.10 64bit
Both OF 2.1.1 and OF 2.2.0 compilation failed according to the following installation guide:
http://openfoamwiki.net/index.php/In...M-2.1.1/Ubuntu

and
http://www.openfoam.org/download/source.php

2) So I removed the latest Ubuntu 12.10 system and replaced it with the Ubuntu 12.04.2 LTS (x64), which is same as the OS of my Desktop PC in which OF 2.1.1 is already installed from source pack

here is the first error for OF 2.2.0 compilation:

Quote:
.....
wmake libso mpi
/usr/bin/ld: error: --add-needed is not supported but is required for libdl.so.2 in /home/dao/OpenFOAM/ThirdParty-2.2.0/platforms/linux64Gcc/openmpi-1.6.3/lib64/libmpi.so
collect2: ld returned 1 exit status
make: *** [/home/dao/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/lib/openmpi-1.6.3/libPstream.so] Error 1
+ OSspecific/POSIX/Allwmake
'/home/dao/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/lib/libOSspecific.o' is up to date.
....
Should I change the "linux64Gcc" rules for c/c++, because there are a lot of "/usr/bin/ld: error:....... " errors.

Any hints or recommendation will be appreciated.

Greetings!
keepfit is offline   Reply With Quote

Old   March 26, 2013, 08:31
Default
  #2
Senior Member
 
Adhiraj
Join Date: Sep 2010
Location: Karnataka, India
Posts: 187
Rep Power: 15
adhiraj is on a distinguished road
Are you using gcc 4.7?

I had to add the flag "-fpermissive" to the file wmake/rules/linux64Gcc/c++.

Code:
c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -fpermissive
This was for OpenFOAM 1.7.1, so may be a bit different from 2.x.x though.
This was in Ubuntu 12.10 64 bit.

Last edited by adhiraj; March 26, 2013 at 08:36. Reason: Added OS info.
adhiraj is offline   Reply With Quote

Old   March 26, 2013, 09:43
Default
  #3
Senior Member
 
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 13
keepfit is on a distinguished road
Quote:
Originally Posted by adhiraj View Post
Are you using gcc 4.7?

I had to add the flag "-fpermissive" to the file wmake/rules/linux64Gcc/c++.

Code:
c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -fpermissive
This was for OpenFOAM 1.7.1, so may be a bit different from 2.x.x though.
This was in Ubuntu 12.10 64 bit.
I reinstalled Ubuntu 12.04 LTS again!

but this time I just update the system and then Install OF without installing any other software.

Hoping it works.

PS: the gcc version is 4.6.3.
keepfit is offline   Reply With Quote

Reply

Tags
compilation error, source code, ubuntu 12.04


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
Transient boundary conditions Jarrod Sinclair (Sinclair) OpenFOAM Running, Solving & CFD 133 May 6, 2015 06:21
OpenFoam 1.7.1 in Ubuntu 10.04 won't start working Leech OpenFOAM Installation 8 August 10, 2014 20:42
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
user subroutine error CFDUSER CFX 2 December 9, 2006 06:31
user defined function cfduser CFX 0 April 29, 2006 10:58


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