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

Problems with "cannot find -liberty"

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

Like Tree5Likes
  • 1 Post By Nicolao
  • 2 Post By wyldckat
  • 1 Post By pankajhrajput
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   April 25, 2014, 15:23
Default Problems with "cannot find -liberty"
  #1
New Member
 
Nicolao
Join Date: Jul 2012
Location: São Paulo, Brazil
Posts: 6
Rep Power: 6
Nicolao is on a distinguished road
Hello,
I'm having the famous problem of "cannot find -liberty" when I'm making the foam-extended 3.0 installation.
I've already checked almost every post about this issue, and I cannot find a solution. All posts I read suggest that you must install the binutils-dev package. However, I already have it installed.
I've just installed the Ubuntu 14.04, and I'm not sure if there some kind of incompatibility or something like that.

I'm sorry to bring up this problem again, but I'm starting to give up the installation.

Thanks
ordinary likes this.
Nicolao is offline   Reply With Quote

Old   April 25, 2014, 16:53
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,747
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Greetings Nicolao,

It would seem that the Google force is not strong in you I Googled just now for this:
Code:
FOAM extend 3.0 ubuntu 14.04
and the first link was for this page: http://openfoamwiki.net/index.php/In...om_source_code
If you look for "Ubuntu 14.04" on that page, you'll see what packages are needed to be installed. The list looks nearly identical to all other Ubuntu's, except the new package is called "libiberty-dev". This has been available on that wiki page since the 18th of April

Best regards,
Bruno
sharonyue and Nicolao like this.
__________________
wyldckat is online now   Reply With Quote

Old   April 28, 2014, 14:47
Default
  #3
New Member
 
Nicolao
Join Date: Jul 2012
Location: São Paulo, Brazil
Posts: 6
Rep Power: 6
Nicolao is on a distinguished road
Thank you Bruno!
It worked just fine!
Nicolao is offline   Reply With Quote

Old   March 4, 2016, 16:19
Default
  #4
New Member
 
Pankaj Rajput
Join Date: Jan 2016
Location: New York
Posts: 5
Rep Power: 2
pankajhrajput is on a distinguished road
Hi Nicolao and Bruno

I recently updated to Ubuntu 15.01 and was making the foam-extend-3.2 installation. I kept on getting the famous 'cannot find -liberty' error (which I was able to resolve thanks to Bruno's post ) however, I am also getting 'cannot find -lfoam' error. I have searched a lot online but I couldnt find anything that would fix this error, maybe I am not looking in the right direction.

Do you guys know what could be causing this 'cannot find -lfoam' error?

Thanks.
ordinary likes this.
pankajhrajput is offline   Reply With Quote

Old   March 6, 2016, 11:36
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,747
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by pankajhrajput View Post
however, I am also getting 'cannot find -lfoam' error. I have searched a lot online but I couldnt find anything that would fix this error, maybe I am not looking in the right direction.
Quick request:
  1. Run:
    Code:
    foam
    ./Allwmake > log.make 2>&1
    gzip < log.make > log.make.gz
  2. Attach the file "log.make.gz" to your next post.
This way I can diagnose the origin/reason of the error.
pankajhrajput likes this.
__________________
wyldckat is online now   Reply With Quote

Old   March 7, 2016, 12:15
Default
  #6
New Member
 
Join Date: Jun 2015
Posts: 24
Rep Power: 3
Ali Blues is on a distinguished road
Dear Bruno,
I'm installing foam-extend 3.2.x on a workstation with Ubuntu-12, as non-root. So I made the appropriate modifications in etc/prefs.sh to use third party software and use FOAM as compiler.

in etc/prefs.sh:

Code:
export WM_COMPILER=Gcc49
export WM_THIRD_PARTY_USE_GCC_492=1
export compilerInstall=FOAM
export QT_THIRD_PARTY=1

# For AllMake.stage1
export WM_THIRD_PARTY_USE_CMAKE_322=1

# For AllMake.stage2
export WM_THIRD_PARTY_USE_OPENMPI_188=1

# For AllMake.stage3
export WM_THIRD_PARTY_USE_METIS_510=1
export WM_THIRD_PARTY_USE_PARMGRIDGEN_10=1
export WM_THIRD_PARTY_USE_LIBCCMIO_261=1
export WM_THIRD_PARTY_USE_MESQUITE_212=1
export WM_THIRD_PARTY_USE_SCOTCH_604=1
export WM_THIRD_PARTY_USE_PARMETIS_403=1
export WM_THIRD_PARTY_USE_PYFOAM_064=1
export WM_THIRD_PARTY_USE_HWLOC_1101=1


# For AllMake.stage4
export WM_THIRD_PARTY_USE_QT_486=1
export WM_THIRD_PARTY_USE_PARAVIEW_431=1
So when I compile using ./AllMake, everything seems to be fine. But then when I try to compile foam, I get the error as others have in this post, i.e.
Code:
/usr/bin/ld: cannot find -liberty.
Would you have any suggestions for how I can resolve this.
Thanks in advance.

Best
Ali
Ali Blues is offline   Reply With Quote

Old   March 7, 2016, 16:54
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,747
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick answer @Ali: I don't have time to fully test this, but please try the following steps:
Code:
foam
sed -iold -e "s=\-liberty==" wmake/rules/*/general
Now you can run "Allwmake" again, like this:
Code:
foam
./Allwmake > log.make 2>&1
It will take a long time to build. Once it's done, please run it again, to get a summary of the error messages:
Code:
./Allwmake > log.make 2>&1
Now look for the first error in "log.make". Hopefully there will be none.
wyldckat is online now   Reply With Quote

Old   March 7, 2016, 16:59
Default
  #8
New Member
 
Pankaj Rajput
Join Date: Jan 2016
Location: New York
Posts: 5
Rep Power: 2
pankajhrajput is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick request:
  1. Run:
    Code:
    foam
    ./Allwmake > log.make 2>&1
    gzip < log.make > log.make.gz
  2. Attach the file "log.make.gz" to your next post.
This way I can diagnose the origin/reason of the error.
Hi Bruno

Thanks for your reply. Please find the log file attached with this post.

Thanks again
Pankaj
Attached Files
File Type: gz log.make.gz (153.5 KB, 3 views)
pankajhrajput is offline   Reply With Quote

Old   March 7, 2016, 17:16
Default
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,747
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Hi Pankaj,
Quote:
Originally Posted by pankajhrajput View Post
Thanks for your reply. Please find the log file attached with this post.
From where did you download the source code for foam-extend 3.2? Did you do any changes to the source code?

Because the error message that you are getting is because the "libfoam.so" was built with the name "libOpenFOAM.so"!?

To solve this issue, got into the foam-extend-3.2 folder:
Code:
foam
And edit the file "src/foam/Make/files" and change the last line from "libOpenFOAM" to "libfoam".
Then run "Allwmake" once again, the same way you did before.

Best regards,
Bruno
wyldckat is online now   Reply With Quote

Old   March 7, 2016, 18:23
Default
  #10
New Member
 
Pankaj Rajput
Join Date: Jan 2016
Location: New York
Posts: 5
Rep Power: 2
pankajhrajput is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
And edit the file "src/foam/Make/files" and change the last line from "libOpenFOAM" to "libfoam".
Then run "Allwmake" once again, the same way you did before.
Hi Bruno

Thanks for your prompt reply. Your recommended change fixed the problem and I was able to build it successfully. I think I changed that line in a desperate attempt to fix the installation build (before i found this post) and forgot about it.

Thanks again for your help, I really appreciate it.

Pankaj
pankajhrajput is offline   Reply With Quote

Old   March 8, 2016, 05:48
Default
  #11
New Member
 
Join Date: Jun 2015
Posts: 24
Rep Power: 3
Ali Blues is on a distinguished road
Dear Bruno,
As always you're awesome! It worked, it just gives the following warning at the end which says that it is for "project developers"; whatever that means.
Best
Ali

Code:
CMake Warning (dev) at CMakeLists.txt:54 (TARGET_LINK_LIBRARIES):
  Policy CMP0023 is not set: Plain and keyword target_link_libraries
  signatures cannot be mixed.  Run "cmake --help-policy CMP0023" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  The keyword signature for target_link_libraries has already been used with
  the target "PV4FoamReader_SM".  All uses of target_link_libraries with a
  target should be either all-keyword or all-plain.

  The uses of the keyword signature are here:

   * /home/ali/foam/foam-extend-3.2/ThirdParty/packages/ParaView-4.3.1/platforms/linux64Gcc49DPOpt/lib/cmake/paraview-4.3/ParaViewPlugins.cmake:1099 (target_link_libraries)

This warning is for project developers.  Use -Wno-dev to suppress it.
Ali Blues is offline   Reply With Quote

Old   March 13, 2016, 15:10
Default
  #12
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,747
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by Ali Blues View Post
It worked, it just gives the following warning at the end which says that it is for "project developers"; whatever that means.
Quick answer: you can safely ignore that message.
wyldckat is online now   Reply With Quote

Old   August 25, 2016, 10:57
Default
  #13
Member
 
Dan Kokron
Join Date: Dec 2012
Posts: 33
Rep Power: 5
dkokron is on a distinguished road
Bruno,

Removing all references to -liberty from the wmake/rules/*/general files resolved this issue for me. Thanks for the suggestion.
dkokron is offline   Reply With Quote

Old   August 25, 2016, 16:24
Default
  #14
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,747
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Greetings Dan,

Many thanks for the feedback and reminder!
I'm testing now on Ubuntu 16.04 and I'll make a pull request for the "nextRelease" branch at foam-extend 3.2 for this, so that they can do a larger build test.

I never really understood why we were ever depending on the "libiberty.so" library.

Best regards,
Bruno
__________________
wyldckat is online now   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with baffles ounifiras FLOW-3D 11 September 10, 2016 14:33
Hotmail and Gmail Problems - Solutions Found pete Site News & Announcements 7 November 14, 2014 11:34
Installation problems OF-1.6-ext on Ubuntu 12.04 and SUSE fedvasu OpenFOAM Installation 10 April 3, 2014 07:26
how to find c3x blade coordinates gokhanS Main CFD Forum 2 December 8, 2013 11:24
Some problems with Star CD Micha CD-adapco 0 August 6, 2003 13:55


All times are GMT -4. The time now is 11:31.