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

Cannot find liberty %3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumcliparthappy gif%22 ALT%3d%22%22 BORDER%3d0%3e

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 14, 2006, 04:36
Default Dear all I have installed O
  #1
Senior Member
 
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 17
panara is on a distinguished road
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?
panara is offline   Reply With Quote

Old   September 14, 2006, 05:24
Default That is fine. The supplied gcc
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
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
mattijs is offline   Reply With Quote

Old   September 14, 2006, 05:35
Default Ok, but gcc-4.1.0 has been i
  #3
Senior Member
 
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 17
panara is on a distinguished road
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
panara is offline   Reply With Quote

Old   October 31, 2006, 05:05
Default Hi, On a different machine
  #4
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
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
lr103476 is offline   Reply With Quote

Old   November 2, 2006, 05:18
Default Hi, I do not know if this t
  #5
New Member
 
Pascal Häußler
Join Date: Mar 2009
Posts: 1
Rep Power: 0
pascalhaeussler is on a distinguished road
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
pascalhaeussler is offline   Reply With Quote

Old   August 10, 2007, 15:39
Default 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
msrinath80 is on a distinguished road
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!
msrinath80 is offline   Reply With Quote

Reply

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
FoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp rengu OpenFOAM Running, Solving & CFD 5 March 3, 2009 11:19
Problem in generating too many pointsFoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp marhamat OpenFOAM 0 August 6, 2008 04:49
Compiling liftDrag crashed with initc%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartsadgif%22 ALT%3d%22%22 BORDER%3d0%3etext0x20 undefined reference to %60mainb sponiar OpenFOAM Running, Solving & CFD 2 January 17, 2008 05:00
%230 FoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp nishant_hull OpenFOAM Running, Solving & CFD 18 October 30, 2007 14:52
%230 FoamerrorprintStackFoam%3cIMG SRC%3d%22httpopenfoamcfdonlinecomforumclipartproudgif%22 ALT%3d%22O%22 BORDER%3d0%3estreamamp guimch OpenFOAM Running, Solving & CFD 6 October 25, 2007 18:52


All times are GMT -4. The time now is 13:55.