|
[Sponsors] |
Cannot find liberty %3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumcliparthappy gif%22 ALT%3d%22%22 BORDER%3d0%3e |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 14, 2006, 04:36 |
Dear all
I have installed O
|
#1 |
Senior Member
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 17 |
Dear all
I have installed OF 1.3 on a linux Debian AMD64 machine. Everthing works and I can run icoFoam without problems. When I try to compile my own application (icoFoam), it fails in the linking phase: Making dependency list for source file icoFoam.C SOURCE_DIR=. SOURCE=icoFoam.C ; g++ -m64 -DlinuxAMD64 -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-30 -I/apps/prod/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/lnInclude -I/apps/prod/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -c $SOURCE -o Make/linuxAMD64Gcc4DPOpt/icoFoam.o /apps/prod/OpenFOAM/OpenFOAM-1.3/wmake/bashScripts/mkObjectDir /data/home/didomax/OpenFOAM/didomax-1.3/applications/bin/linuxAMD64Gcc4DPOpt/ico Foam g++ -m64 -DlinuxAMD64 -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-30 -I/apps/prod/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/lnInclude -I/apps/prod/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC Make/linuxAMD64Gcc4DPOpt/icoFoam.o -L/apps/prod/OpenFOAM/OpenFOAM-1.3/lib/linuxAMD64Gcc4DPOpt \ -lfiniteVolume -lOpenFOAM -liberty -o /data/home/didomax/OpenFOAM/didomax-1.3/applications/bin/linuxAMD64Gcc4DPOpt/ico Foam /usr/bin/ld: cannot find -liberty collect2: ld returned 1 exit status make: *** [/data/home/didomax/OpenFOAM/didomax-1.3/applications/bin/linuxAMD64Gcc4DPOpt/ic oFoam] Error 1 When I change in /apps/prod/OpenFOAM/OpenFOAM-1.3/wmake/rules/linuxAMD64Gcc4/general the following line GLIBS = -liberty in GLIBS = /apps/prod/OpenFOAM/linuxAMD64/gcc-4.1.0/lib/libiberty.a the compilation has no problem at all. Any idea? |
|
September 14, 2006, 05:24 |
That is fine. The supplied gcc
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
That is fine. The supplied gcc installation contains that library.
You can make it a bit more general by specifying $(WM_COMPILER_DIR)/lib/libiberty.a |
|
September 14, 2006, 05:35 |
Ok,
but gcc-4.1.0 has been i
|
#3 |
Senior Member
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 17 |
Ok,
but gcc-4.1.0 has been installed and also the correct path has been setted correctly.. why it doesn't work with the old setting? is that a bug? I mean, in order to compile OF applications the option must be changed in GLIBS = $(WM_COMPILER_DIR)/lib/libiberty.a or there is something wrong just in my installation? Daniele |
|
October 31, 2006, 05:05 |
Hi,
On a different machine
|
#4 |
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18 |
Hi,
On a different machine than my working one, I ran into the same problem. Did you solve this liberty problem, and ifso how? Thanks and regards, Frank
__________________
Frank Bos |
|
November 2, 2006, 05:18 |
Hi,
I do not know if this t
|
#5 |
New Member
Pascal Häußler
Join Date: Mar 2009
Posts: 1
Rep Power: 0 |
Hi,
I do not know if this topic is still of interest. I just want to post here how I fixed this problem: The libiberty is part of the gnu binutils. I just had to install the binutils development files package in addition to the binutils and then everything worked fine. Regards Pascal |
|
August 10, 2007, 15:39 |
Thank you Pascal. I faced the
|
#6 |
Senior Member
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21 |
Thank you Pascal. I faced the same problem:
/usr/bin/ld: cannot find -liberty collect2: ld returned 1 exit status I solved it by installing binutils-devel. My system runs 64 bit Scientific Linux 5.x (RHEL clone). Once again, thanks very much! |
|
|
|