CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

Cannot find -lOpenFOAM in 1.7.x install

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

Like Tree1Likes
  • 1 Post By bmikuz

LinkBack Thread Tools Display Modes
Old   July 3, 2010, 02:28
Default Cannot find -lOpenFOAM in 1.7.x install
Join Date: Sep 2009
Posts: 41
Rep Power: 10
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, 05:45
Senior Member
Join Date: Mar 2009
Posts: 502
Rep Power: 13
bastil is on a distinguished road
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, 02:12
Join Date: Sep 2009
Posts: 41
Rep Power: 10
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 is offline   Reply With Quote

Old   November 14, 2012, 10:29
New Member
Blaž Mikuž
Join Date: Sep 2011
Location: Ljubljana
Posts: 29
Rep Power: 8
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, 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 (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 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:
(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
  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


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
ANSYS Workbench on "Uncertified" Linux Distros hsr CFX 266 December 9, 2017 13:06
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 21:18.