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

Cannot find -lOpenFOAM in 1.7.x install

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bmikuz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2010, 03:28
Default Cannot find -lOpenFOAM in 1.7.x install
  #1
Member
 
Scott
Join Date: Sep 2009
Posts: 44
Rep Power: 17
scott is on a distinguished road
Hi guys,

I have tried installing this from the source download and when compiling either 1.7.0 or 1.7.x on Linux Mint, TinyMe, OpenSUSE I have had the following error after over an hour of compilation... I've tried this a few times and on different machines.

Anbody know what this means?

Thanks! Scott


make[2]: Entering directory `/home/guest/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
Making dependency list for source file mixtureAdiabaticFlameT.C
make[2]: Leaving directory `/home/guest/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
make[2]: Entering directory `/home/guest/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
SOURCE=mixtureAdiabaticFlameT.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/guest/OpenFOAM/OpenFOAM-1.7.x/src/thermophysicalModels/specie/lnInclude -IlnInclude -I. -I/home/guest/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude -I/home/guest/OpenFOAM/OpenFOAM-1.7.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/mixtureAdiabaticFlameT.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/guest/OpenFOAM/OpenFOAM-1.7.x/src/thermophysicalModels/specie/lnInclude -IlnInclude -I. -I/home/guest/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude -I/home/guest/OpenFOAM/OpenFOAM-1.7.x/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOpt/mixtureAdiabaticFlameT.o -L/home/guest/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt \
-lspecie -lOpenFOAM -liberty -ldl -lm -o /home/guest/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/mixtureAdiabaticFlameT
/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make[2]: *** [/home/guest/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/mixtureAdiabaticFlameT] Error 1
make[2]: Leaving directory `/home/guest/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
make[1]: *** [mixtureAdiabaticFlameT] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/home/guest/OpenFOAM/OpenFOAM-1.7.x/applications/utilities/thermophysical'
make: *** [thermophysical] Error 2
make: Target `application' not remade because of errors.
scott is offline   Reply With Quote

Old   July 3, 2010, 06:45
Default
  #2
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Quote:
Originally Posted by scott View Post
/usr/bin/ld: cannot find -lOpenFOAM
There was something wrong when building the library OpenFOAM. There must have been errors earlier during build. Try to pipe the output into a file and look at the first error that occurs. Alternatively, you can compile each library one after another instead of running Allwmake. Then, try to solve the first error that comes up.

Regards Bastian
bastil is offline   Reply With Quote

Old   July 5, 2010, 03:12
Default
  #3
Member
 
Scott
Join Date: Sep 2009
Posts: 44
Rep Power: 17
scott is on a distinguished road
Thanks Bastian.

I started to go through it all but am on a bit of a deadline so just installed the debian/ubuntu version.

Seems to be a common problem though, and not only with OpenFOAM.

Thanks for your help.

Scott
scott is offline   Reply With Quote

Old   November 14, 2012, 10:29
Exclamation
  #4
New Member
 
Blaž Mikuž
Join Date: Sep 2011
Location: Ljubljana
Posts: 29
Rep Power: 15
bmikuz is on a distinguished road
Hi, sorry for posting on 2 year old questions, but we have just solved the issue with compilng the OpenFOAM 2.1.1 on the SUSE Enterprise Linux 11.2 SP1 x64.
What the error means is, that the -lOpenFOAM is trying to link the libOpenFOAM.so, but cannot find it.
When we searched for the libOpenFOAM, we found it in some subdirectory, so we were surprised how the problem occurs.
Then we went on the page http://openfoamwiki.net/index.php/Ho...mpile_OpenFOAM (subsection 7 Modifications for the compilation of PVFoamReader) where they nicely pointed out that the problem occured on older versions of OF because of wrong $FOAM_LIBBIN parameter.

When we compared the path of the paramater $FOAM_LIBBIN and the path of the libOpenFOAM.so with command

HTML Code:
find ~/OpenFOAM/OpenFOAM-2.1.1 -name "libOpenFOAM*" 2>/dev/null; echo $FOAM_LIBBIN
We saw that $FOAM_LIBBIN was pointing to wrong place. Our output:
HTML Code:
/home/r4/user/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so
/home/r4/user/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc45DPOpt/lib
(notice the difference between the linux64GccDPOpt and the linux64Gcc45DPOpt)

When the command wmSET is executed, it defines (and override the FOAM_LIBBIN variable), so we needed to repair it.

Solution is to execute following commands:
  1. wmSET
  2. export FOAM_LIBBIN=/home/r4/user/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/
    (this ^ one needs to point out to the path of the libOpenFOAM.so)
  3. ./Allwclean
  4. ./Allwmake
Hope it helps.

Best regards
FlorisvdBeek likes this.

Last edited by bmikuz; November 19, 2012 at 05:08.
bmikuz 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
ANSYS Workbench on "Uncertified" Linux Distros hsr CFX 289 April 20, 2023 10:23
OpenFOAM-1.6 install cookbook MadsR OpenFOAM Installation 372 November 20, 2010 12:57
Setting ANSYS Install Folder Using The Command Line rjamison CFX 0 March 22, 2010 23:33
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 15:43
Howto install OpenFOAM on mandriva2009qt44 with Qt435 in home directory gzy_1228 OpenFOAM Installation 0 November 15, 2008 15:31


All times are GMT -4. The time now is 18:37.