CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Problems in compiling solvers when using OpenFOAM13_11092006 (https://www.cfd-online.com/Forums/openfoam-installation/57369-problems-compiling-solvers-when-using-openfoam13_11092006-a.html)

jin_xu June 7, 2008 06:10

Hi everyone, I am using OF-
 
Hi everyone,

I am using OF-1.3 and my OS is ubuntu 7.10. the OF-1.3 in my machine is working perfectly.

To use the FSI solver(icoFsiFoam), I download OpenFOAM-1.3_11092006 and extract it in the ~/OpenFOAM to replace the one used before(which is from OpenFOAM-1.3.General). At this moment, I can still compile the icoFsiFoam solver but I can not run a case for it as I need to rebuild everything(I find this method on the discussions about the balloon case),so I use ./AllMake in the main directory to
build everything(there is no error in this process). at the moment the re-build is done, I type "which g++" in the terminal, it is the one provided by OF, but when I close the terminal and re-open it, then again, I type"which g++", I get:/usr/bin/g++, and when I try to compile the modified icoFsiFoam solver, I get one error:

/usr/bin/ld: cannot find -liberty

I have read some posts in the board, and realise that if "which g++" give you the one provided by OpenFoam, this error will not appear.

so the problem confusing me is that why the enviroment variable is changed after I just replace the orginal OpenFOAM 1.3 directory and rebuild everything and I can not use the g++(or gcc) provided by OF

To find a way around it, I try to follow the buildinstructions in the website for an OF-dev, but I run into some problems:
(1) now I do not need run OF in paralle, do I need to install everything recommended in the website
(2) when I try to use "gmake", I was told this commond is not found, but intead I use "make", is that right?
(3) when I try to type "make install", I was told somthing like "permission denied when creat directory ...usr/tmp.....".

I am just getting started with OF and Linux,and some questions may sound very stupid, Could anyone pleae give me some hints on how to use/build the OpenFOAM-1.3_11092006 correctly

I will really appreciate your help!

jin

jin_xu June 7, 2008 06:17

My machine is 32 bit regard
 
My machine is 32 bit

regards

gschaider June 9, 2008 11:25

Hi Jin! I think it is written
 
Hi Jin!
I think it is written somewhere else on the Board: libiberty.a is provided by some rather "esoteric" packages on some distros and therefor not always present.

On my machines (RHEL/CentOS 5.x) it is provided by binutils-devel. On these distros I find out who provides this with the command "yum provides libiberty". What the equivalent command on Ubuntu would be: I don't know

Bernhard

paulo June 11, 2008 08:07

In Ubuntu it is: apt-cache
 
In Ubuntu it is:

apt-cache search libiberty

It gives nothing in my Kubuntu 7.10

Regards

Paulo

paulo June 11, 2008 08:10

I've read all the messages and
 
I've read all the messages and now foud the result of:

paulo@SEM:~$ apt-cache search liberty
liblasso-java - Liberty ID-FF library - Java bindings
liblasso3 - Liberty ID-FF library - runtime library
liblasso3-dev - Liberty ID-FF library - development kit
python-lasso - Liberty ID-FF library - Python bindings

So maybe installing the liblasso3 package helps.

Regards

Paulo

fw407 June 18, 2008 17:24

Hi Paulo I fix this problem
 
Hi Paulo

I fix this problem by installing binutils-devel.

Kind regards

feng

Shoonya July 2, 2010 12:34

/usr/bin/ld: cannot find -liberty
 
yes that worked in ubuntu 10.04 too, when I was intalling OpenFOAM-1.7.0
when I did
$ ./Allwmake
/usr/bin/ld: cannot find -liberty
collect2: ld returned 1 exit status

....
...

I installed
$ sudo apt-get install binutils-dev

that solved my problem ...and I was able to compile

thank you

dinesh
IIT Kanpur


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