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

Cannot find lOpenFOAM

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 6, 2006, 15:19
Default Hello, I am trying to buid
  #1
New Member
 
Daniel Tourde - Caelae.se
Join Date: Mar 2009
Posts: 3
Rep Power: 8
danieltourde is on a distinguished road
Hello,

I am trying to buid OpenFOAM 1.3 from source on a stock Gentoo Linux box (gcc 4.1.1, glibc 2.4, X11R7). I just follow blindly and stupdly the installation procedure provided with the source code and I get the following errors (a few time before it stops to build):

SOURCE_DIR=.
SOURCE=foamInfoExec.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter
-Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30
-I/home/ted/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I.
-fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/foamInfoExec.o
/home/ted/OpenFOAM/OpenFOAM-1.3/wmake/bashScripts/mkObjectDir
/home/ted/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/foamInfoExec
g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3
-DNoRepository -ftemplate-depth-30
-I/home/ted/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I.
-fPIC -pthread Make/linuxGcc4DPOpt/foamInfoExec.o
-L/home/ted/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt \
-lOpenFOAM -liberty -o
/home/ted/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/foamInfoExec
/usr/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../i686-pc-linux-gnu/bin/ld:
cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make: ***
[/home/ted/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/foamInfoExec]
Error 1

Any idea? Help...

Daniel
danieltourde is offline   Reply With Quote

Old   June 7, 2006, 03:38
Default > cannot find -lOpenFOAM s
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
> cannot find -lOpenFOAM

seems something has gone wrong earlier when building the OpenFOAM library. Good luck.
mattijs is offline   Reply With Quote

Old   June 19, 2006, 08:07
Default Hi there, I have waited a whi
  #3
theof
Guest
 
Posts: n/a
Hi there,
I have waited a while before posting this but now I am really blocked. I have just recompile OF-1.3 on linux suse 10, gcc-4.0.2. All the libraries compiled fine, libOpenFOAM included. When I want to compile the libPVFoamReader, it first compiles the libvtkFoam then I get the previous "cannot find -lOpenFOAM". I am trying to link with paraview-2.5 compiled with cmake-2.4.2. Any suggestion?
Theophane
  Reply With Quote

Old   June 20, 2006, 04:57
Default All is explained on the wiki p
  #4
theof
Guest
 
Posts: n/a
All is explained on the wiki page. Thanks for having documented it!
  Reply With Quote

Old   June 8, 2007, 08:15
Default exactly in which part ?
  #5
Member
 
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 8
arkangel is on a distinguished road
exactly in which part ?
arkangel is offline   Reply With Quote

Old   March 28, 2008, 04:56
Default Hi, I tried to compile a dev v
  #6
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
johndeas is on a distinguished road
Hi, I tried to compile a dev version of OpenFOAM (from svn), on a RHEL 5, using the compiler provided with the latest stable version of OpenFOAM. However, I get this linking error :

g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/flurec/temp/dev/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude -fPIC -pthread Make/linuxGccDPOpt/kivaToFoam.o -L/home/flurec/temp/dev/OpenFOAM-1.4.1-dev/lib/linuxGccDPOpt \
-lOpenFOAM -ldl -lm -o /home/flurec/temp/dev/OpenFOAM-1.4.1-dev/applications/bin/linuxGccDPOpt/kivaToFo am
/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make[3]: *** [/home/flurec/temp/dev/OpenFOAM-1.4.1-dev/applications/bin/linuxGccDPOpt/kivaToF oam] Error 1
make[3]: Leaving directory `/home/flurec/temp/dev/OpenFOAM-1.4.1-dev/applications/utilities/mesh/conversion /kivaToFoam'
make[2]: *** [kivaToFoam] Error 2
make[2]: Target `application' not remade because of errors.
make[2]: Leaving directory `/home/flurec/temp/dev/OpenFOAM-1.4.1-dev/applications/utilities/mesh/conversion '
make[1]: *** [conversion] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/home/flurec/temp/dev/OpenFOAM-1.4.1-dev/applications/utilities/mesh'
make: *** [mesh] Error 2
make: Target `application' not remade because of errors.

Is there something that need to be fixed in a path ?
johndeas is offline   Reply With Quote

Old   March 28, 2008, 05:10
Default May I add that, if I am in the
  #7
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
johndeas is on a distinguished road
May I add that, if I am in the src directory, and type wmake libso OpenFOAM, it reports an up to date libOpenFOAM.so
johndeas is offline   Reply With Quote

Old   March 28, 2008, 05:13
Default go to ../OpenFOAM-1.4.1/src
  #8
Member
 
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 8
arkangel is on a distinguished road
go to ../OpenFOAM-1.4.1/src

and issue this command

%wmake libso OpenFOAM

It will tell you more information why OpenFoam cannot be built
arkangel is offline   Reply With Quote

Old   March 28, 2008, 05:20
Default this file exist /home/flur
  #9
Member
 
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 8
arkangel is on a distinguished road
this file exist

/home/flurec/temp/dev/OpenFOAM-1.4.1-dev/lib/linuxGccDPOpt/libOpenFOAM.so

?
arkangel is offline   Reply With Quote

Old   March 28, 2008, 06:37
Default Yes, it exists. I am checking
  #10
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
johndeas is on a distinguished road
Yes, it exists. I am checking all the paths in the various bashrc to understand why it is not taking into account.

I am also updatding my gcc to the one distributed with at http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/release/ and thus I would like to clean all the executable. Is it possible to run something like wclean globally, or do I have to automate something to launch wclean in every directory where wmake is called ?
johndeas is offline   Reply With Quote

Old   March 28, 2008, 06:55
Default wcleanAll ...
  #11
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
johndeas is on a distinguished road
wcleanAll ...
johndeas is offline   Reply With Quote

Old   March 28, 2008, 10:09
Default After changing the gcc version
  #12
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
johndeas is on a distinguished road
After changing the gcc version, I wanted to clean/rebuild my installation with :

foam
wcleanAll
src
rm -rf */platforms
foam
Allwmake

However some librairies are not build. If I try wmake libso triSurface, I get

readSTLASCII.C:234:23: error: FlexLexer.h: no such file or directory

and various errors like

readSTLASCII.C:5079: error: does not name a type
johndeas is offline   Reply With Quote

Old   March 31, 2008, 05:06
Default I installed flex and zlib (to
  #13
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
johndeas is on a distinguished road
I installed flex and zlib (to get zlib.h) from repositories even if I understood that they were built in the Allwmake process. If I type which flex, I get /usr/bin/flex, whereas I think I should have got something inside OpenFOAM path, had everything been setup properly. There were no warnings for the one-two hour compilation time before I left for weekend.

However, to my horror when I came back today, I saw I still have compilation errors. I found in the last compilation directives before it stopped compiling warnings like this one:

"readKivaGrid.H:232: warning: deprecated conversion from string constant to "

and, readKivaGrid.H contains:

char* kivaPatchNames[nBCs] =
{
"piston",
"valve",
"liner",
"cylinderHead",
"axis",
"wedge",
"inflow",
"outflow",
"presin",
"presout",
"symmetryPlane",
"cyclic"
};

whith }; being at line 232

however, there were no errors, but warnings. The error message was:

make[3]: Leaving directory `/home/flurec/temp/OpenFOAM/OpenFOAM-1.4.1-dev/applications/utilities/mesh/conve rsion/kivaToFoam'
make[2]: Leaving directory `/home/flurec/temp/OpenFOAM/OpenFOAM-1.4.1-dev/applications/utilities/mesh/conve rsion'
make[1]: Target `application' not remade because of errors.

Also, if I type wmake libso kivaToFoam, I get
"libNULL.so is up to date"

My hypothesis is that the flex version from my repository is not uptodate (package 2.5.4a-41.fc6), but still, I do not understand why the one supplied with openFOAM in not the one used (and why I had to install zlib-devel to get zlib.h which is supplied in OF by the way). The latter has been built, I can found a flex executable in : applications/utilities/miscellaneous/foamFlex

I am really motivated to get OF built from development version, however I am limited in my understanding of what is currently going on.
johndeas is offline   Reply With Quote

Old   March 31, 2008, 05:29
Default update: I should not have writ
  #14
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
johndeas is on a distinguished road
update: I should not have written wmake libso reaKiva, if I go the kivaToFoam directory and type wmake, I get :
FOAM_APPBIN/kivaToFoam is up to date.

also, if I type which foamFlex++, I get one which is inside FOAM_APPBIN
johndeas is offline   Reply With Quote

Old   March 31, 2008, 07:00
Default It is written in the Install-I
  #15
jas
New Member
 
Joerg Schenkel
Join Date: Mar 2009
Location: Leinfelden, 70771, Germany
Posts: 3
Rep Power: 8
jas is on a distinguished road
It is written in the Install-Instruction that
you have to install the OPENFOAM direct into the HOME.

So if Im right
/home/flurec/temp/dev/OpenFOAM-1.4.1-dev/lib/linuxGccDPOpt/libOpenFOAM.so
should look like
/home/OpenFOAM-1.4.1-dev/lib/linuxGccDPOpt/libOpenFOAM.so
jas is offline   Reply With Quote

Old   March 31, 2008, 08:30
Default I modified two variables to ta
  #16
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 8
johndeas is on a distinguished road
I modified two variables to take into account that I did not install in the home:

export WM_PROJECT_INST_DIR=/home/flurec/temp/$WM_PROJECT
export WM_PROJECT_USER_DIR=/home/flurec/temp/$LOGNAME-$WM_PROJECT_VERSION

Using similar settings, the stable binary version of OpenFOAM worked (and I was able to compile my owm solvers). But maybe I should ajust other variables to compile the core of OpenFOAM librairies ?
johndeas is offline   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
find the example about VOF tjuwsz FLUENT 0 May 10, 2006 04:45
where i can find? khalil khanagarayah Main CFD Forum 0 March 4, 2003 12:03
where i can find atique-ur-rehman Main CFD Forum 2 March 2, 2003 11:40
where i can find? S. Sulaksana Main CFD Forum 0 January 18, 2003 05:01
where i can find? sulaksana Main CFD Forum 0 September 13, 2002 05:22


All times are GMT -4. The time now is 17:34.