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

[foam-extend.org] Problems with "cannot find -liberty"

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By Nicolao
  • 2 Post By wyldckat
  • 1 Post By pankajhrajput
  • 1 Post By wyldckat
  • 1 Post By dkokron

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2014, 16:23
Default Problems with "cannot find -liberty"
  #1
New Member
 
Nicolao
Join Date: Jul 2012
Location: São Paulo, Brazil
Posts: 13
Rep Power: 14
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, 17:53
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 offline   Reply With Quote

Old   April 28, 2014, 15:47
Default
  #3
New Member
 
Nicolao
Join Date: Jul 2012
Location: São Paulo, Brazil
Posts: 13
Rep Power: 14
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: 6
Rep Power: 10
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 offline   Reply With Quote

Old   March 7, 2016, 12:15
Default
  #6
Member
 
Join Date: Jun 2015
Posts: 30
Rep Power: 11
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 offline   Reply With Quote

Old   March 7, 2016, 16:59
Default
  #8
New Member
 
Pankaj Rajput
Join Date: Jan 2016
Location: New York
Posts: 6
Rep Power: 10
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, 4 views)
pankajhrajput is offline   Reply With Quote

Old   March 7, 2016, 17:16
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 offline   Reply With Quote

Old   March 7, 2016, 18:23
Default
  #10
New Member
 
Pankaj Rajput
Join Date: Jan 2016
Location: New York
Posts: 6
Rep Power: 10
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
Member
 
Join Date: Jun 2015
Posts: 30
Rep Power: 11
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 offline   Reply With Quote

Old   August 25, 2016, 11:57
Default
  #13
Member
 
Dan Kokron
Join Date: Dec 2012
Posts: 33
Rep Power: 14
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.
utkunun likes this.
dkokron is offline   Reply With Quote

Old   August 25, 2016, 17:24
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 offline   Reply With Quote

Reply


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
SimpleFoam convergence problems brahim OpenFOAM Running, Solving & CFD 20 June 9, 2015 10:09
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
CFX problem in ubuntu (linux) Vigneshramaero CFX 0 July 13, 2012 11:22
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 01:52
Problem Building OF on Centos cluster (no admin rights) CKH OpenFOAM Installation 5 November 13, 2011 07:32


All times are GMT -4. The time now is 03:56.