CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM compilation fails on applicationsutilitiesmesh (http://www.cfd-online.com/Forums/openfoam-installation/57390-openfoam-compilation-fails-applicationsutilitiesmesh.html)

geoffjay February 21, 2008 20:54

I'm trying to compile OpenFOAM
 
I'm trying to compile OpenFOAM 1.4.1 with paraview 2.4.4 (cmake v2.4.8) on Suse Linux Enterprise Server 10.1

I've followed the document at:

http://openfoamwiki.net/non_cdl/OpenFOAMWiki/index.php

and everything goes fine until the last step where I execute ./Allwmake from my OpenFOAM directory. The first build error seems to be:

/usr/bin/ld: cannot find -lfiniteVolume

Anyone have a solution? Thanks.

geoffjay February 21, 2008 21:35

I didn't mention before that t
 
I didn't mention before that the machine arch is x86_64. I found some posts on this message board where people were having similar problems and a couple of them said to go and manually compile things so I've been tracing back the errors trying to compile the root of this evil and it's led me to the src/triSurface directory.

Inside that directory I run wmake and receive:

SOURCE=triSurface/interfaces/STL/readSTLASCII.L ; flex++ -f $SOURCE ; mv lex.yy.cc Make/linux64GccDPOpt/readSTLASCII.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/crdc/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c Make/linux64GccDPOpt/readSTLASCII.C -o Make/linux64GccDPOpt/readSTLASCII.o
/bin/sh: flex++: command not found
mv: cannot stat `lex.yy.cc': No such file or directory
g++: Make/linux64GccDPOpt/readSTLASCII.C: No such file or directory
g++: no input files
make: *** [Make/linux64GccDPOpt/readSTLASCII.o] Error 1

There looks to be 3 things that are failing, flex++, lex.yy.cc, and readSTLASCII.C

I added flex using YaST and went into the triSurface directory and compiled that manually. After that I re-ran Allwmake and there seems to be new progress. I'll update on the next error (or hopefully not).

geoffjay February 21, 2008 23:04

Here I am again unfortunately.
 
Here I am again unfortunately. This time the error looks like it occurs on vtkFoam compilation,

SOURCE=vtkFoam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/crdc/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/crdc/OpenFOAM/linux64/paraview-2.4.4/include -I../PVFoamReader -IlnInclude -I. -I/home/crdc/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/vtkFoam.o
In file included from vtkFoam.C:38:
../PVFoamReader/vtkFoamReader.h:40:30: error: vtkDataSetSource.h: No such file or directory
vtkFoam.C:39:35: error: vtkDataArraySelection.h: No such file or directory

and it carries on with similar "No such file or directory" errors for several .h and .c files that begin with vtk.

hjasak February 22, 2008 04:29

No, all is one failure: find
 
No, all is one failure: find and install flex++ on your computer. Then, making sure that which flex++ shows something sensible, go to src and type ./Allwmake. Everything should build without problem.

Regarding the vtk/paraview failure, you will need to compile paraview locally. Detailed instructions are in:

http://openfoam-extend.svn.sourcefor...trunk/Core/Ope nFOAM-1.4.1-dev/buildInstructions.txt?view=markup

Enjoy,

Hrv

geoffjay February 25, 2008 19:44

I installed flex++ and continu
 
I installed flex++ and continued with the instructions at the link that was provided by Hrvoje and the next error I get is about a missing ParaViewLibraryDepends.cmake file:

+ cd PVFoamReader
+ mkdir -p Make/linux64GccDPOpt
+ cd Make/linux64GccDPOpt
+ cmake ../..
CMake Error: Error in cmake code at
/home/crdc/OpenFOAM/linux64/paraview-2.4.4/lib/paraview-2.4/ParaViewConfig.cmake :29:
INCLUDE Could not find include file: /home/crdc/OpenFOAM/linux64/paraview-2.4.4-obj/ParaViewLibraryDepends.cmake
Current CMake stack:
[2] /home/crdc/OpenFOAM/linux64/paraview-2.4.4/lib/paraview-2.4/ParaViewConfig.cmake
[1] /home/crdc/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/graphic s/PVFoamReader/PVFoamReader/CMakeLists.txt
CMake Error: Error in cmake code at
/home/crdc/OpenFOAM/linux64/cmake-2.4.8/share/cmake-2.4/Modules/UseVTKConfig40.c make:21:
LOAD_CACHE Cannot load cache file from /home/crdc/OpenFOAM/linux64/paraview-2.4.4-obj/VTK/CMakeCache.txt
Current CMake stack:
[4] /home/crdc/OpenFOAM/linux64/cmake-2.4.8/share/cmake-2.4/Modules/UseVTKConfig40.c make
[3] /home/crdc/OpenFOAM/linux64/cmake-2.4.8/share/cmake-2.4/Modules/FindVTK.cmake
[2] /home/crdc/OpenFOAM/linux64/paraview-2.4.4/ParaViewUse.cmake
[1] /home/crdc/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/graphic s/PVFoamReader/PVFoamReader/CMakeLists.txt
Warning: CMake is forcing CMAKE_C_FLAGS_DEBUG to "" to match that imported from VTK. If this message appears for more than one imported project, you have conflicting options and will have to re-build one of those projects.
Warning: CMake is forcing CMAKE_C_FLAGS_RELEASE to "" to match that imported from VTK. If this message appears for more than one imported project, you have conflicting options and will have to re-build one of those projects.
Warning: CMake is forcing CMAKE_C_FLAGS_MINSIZEREL to "" to match that imported from VTK. If this message appears for more than one imported project, you have conflicting options and will have to re-build one of those projects.
Warning: CMake is forcing CMAKE_C_FLAGS_RELWITHDEBINFO to "" to match that imported from VTK. If this message appears for more than one imported project, you have conflicting options and will have to re-build one of those projects.
Warning: CMake is forcing CMAKE_CXX_FLAGS_DEBUG to "" to match that imported from VTK. If this message appears for more than one imported project, you have conflicting options and will have to re-build one of those projects.
Warning: CMake is forcing CMAKE_CXX_FLAGS_RELEASE to "" to match that imported from VTK. If this message appears for more than one imported project, you have conflicting options and will have to re-build one of those projects.
Warning: CMake is forcing CMAKE_CXX_FLAGS_MINSIZEREL to "" to match that imported from VTK. If this message appears for more than one imported project, you have conflicting options and will have to re-build one of those projects.
Warning: CMake is forcing CMAKE_CXX_FLAGS_RELWITHDEBINFO to "" to match that imported from VTK. If this message appears for more than one imported project, you have conflicting options and will have to re-build one of those projects.
-- Loading ParaView CMake commands
-- Loading ParaView CMake commands - done
-- Configuring done
+ make

???

geoffjay February 25, 2008 20:08

To get around the last error a
 
To get around the last error and finish compilation I had to find the files (ParaViewLibraryDepends.cmake and CMakeCache.txt) and copy them into the directories that were complaining. Thanks for the help with pointing me at the right document.

mirko April 24, 2008 11:05

Geoff, where did you find t
 
Geoff,

where did you find those files?

(trying on RHEL5 64-bit)

Thanks,

Mirko

mirko April 24, 2008 11:25

Please disregard my previous m
 
Please disregard my previous message. I am still trying to figure out how to do a proper installation of OpenFoam. I'll read the instructions on the wiki page, and if I have trouble (& don't find the problem discussed here) I will post.

Sorry for the noise,

Mirko

hjasak April 24, 2008 12:28

Have a look here: build in
 
Have a look here:

build instructions

This should help you to build OpenFOAM and all necessary tools on your system from scratch.

Enjoy,

Hrv

mirko April 24, 2008 14:28

Hrvoje, I apologize for bei
 
Hrvoje,

I apologize for being obtuse as I was not able to find the site for development (except at http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/release/). I tried the CVS on sourceforge but it seems empty.

Thanks,

Mirko

mirko April 24, 2008 15:18

maybe: svn list https://op
 
maybe:

svn list https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/O penFOAM-1.4.1-dev

Let's see if that works :-)

Mirko

hjasak April 25, 2008 13:18

Just for the record: the build
 
Just for the record: the build instructions are generic, with minimal changes to software versions etc. You do not need to download the dev version to do this, any old version will do (+ some brains).

Look at it as a kind of step-by-step rather than an attempt to produce a canned build script.

Good luck,

Hrv

mirko April 29, 2008 15:26

Hrvoje, I was able to compi
 
Hrvoje,

I was able to compile the -dev version using your instructions, after removing the dx-related directory (I was not able to install dx at this time).

My only issue is that the compilation used the system gcc (4.1.2) instead of the one that I downloaded with OF. I will look into that later (I did find some posts).

Thanks,

Mirko


All times are GMT -4. The time now is 08:55.