|
[Sponsors] |
June 6, 2006, 15:19 |
Hello,
I am trying to buid
|
#1 |
New Member
Daniel Tourde - Caelae.se
Join Date: Mar 2009
Posts: 3
Rep Power: 17 |
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 |
|
June 7, 2006, 03:38 |
> cannot find -lOpenFOAM
s
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
> cannot find -lOpenFOAM
seems something has gone wrong earlier when building the OpenFOAM library. Good luck. |
|
June 19, 2006, 08:07 |
Hi there,
I have waited a whi
|
#3 |
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 |
|
June 20, 2006, 04:57 |
All is explained on the wiki p
|
#4 |
Guest
Posts: n/a
|
All is explained on the wiki page. Thanks for having documented it!
|
|
June 8, 2007, 08:15 |
exactly in which part ?
|
#5 |
Member
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 17 |
exactly in which part ?
|
|
March 28, 2008, 03:56 |
Hi, I tried to compile a dev v
|
#6 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
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 ? |
|
March 28, 2008, 04:10 |
May I add that, if I am in the
|
#7 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
May I add that, if I am in the src directory, and type wmake libso OpenFOAM, it reports an up to date libOpenFOAM.so
|
|
March 28, 2008, 04:13 |
go to ../OpenFOAM-1.4.1/src
|
#8 |
Member
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 17 |
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 |
|
March 28, 2008, 04:20 |
this file exist
/home/flur
|
#9 |
Member
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 17 |
this file exist
/home/flurec/temp/dev/OpenFOAM-1.4.1-dev/lib/linuxGccDPOpt/libOpenFOAM.so ? |
|
March 28, 2008, 05:37 |
Yes, it exists. I am checking
|
#10 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
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 ? |
|
March 28, 2008, 05:55 |
wcleanAll ...
|
#11 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
wcleanAll ...
|
|
March 28, 2008, 09:09 |
After changing the gcc version
|
#12 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
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 |
|
March 31, 2008, 05:06 |
I installed flex and zlib (to
|
#13 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
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. |
|
March 31, 2008, 05:29 |
update: I should not have writ
|
#14 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
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 |
|
March 31, 2008, 07:00 |
It is written in the Install-I
|
#15 |
New Member
Joerg Schenkel
Join Date: Mar 2009
Location: Leinfelden, 70771, Germany
Posts: 3
Rep Power: 17 |
It is written in the Install-Instruction that
you have to install the OPENFOAM direct into the HOME. So if I´m 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 |
|
March 31, 2008, 08:30 |
I modified two variables to ta
|
#16 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
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 ? |
|
|
|
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 11:03 |
where i can find | atique-ur-rehman | Main CFD Forum | 2 | March 2, 2003 10:40 |
where i can find? | S. Sulaksana | Main CFD Forum | 0 | January 18, 2003 04:01 |
where i can find? | sulaksana | Main CFD Forum | 0 | September 13, 2002 05:22 |