CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compiling Error Red Hat Linux 5 (https://www.cfd-online.com/Forums/openfoam-installation/93433-compiling-error-red-hat-linux-5-a.html)

LWhitson2 October 15, 2011 15:28

Compiling Error Red Hat Linux 5
 
I am trying to compile OpenFOAM on RHEL 5.0 and I keep getting a lot of errors. The following is the first of the errors and I was hoping someone could help me figure out what I am doing wrong.

Code:

wmake libso mpi
'/var/local/scratch/whitsonl/programs/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/openmpi-1.5.3/libPstream.so' is up to date.
+ OSspecific/POSIX/Allwmake
Found <sys/inotify.h>  --  enabling inotify for file monitoring.
'/var/local/scratch/whitsonl/programs/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libOSspecific.o' is up to date.
+ wmake libso OpenFOAM
SOURCE=meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPOpt -IlnInclude -I. -I/var/local/scratch/whitsonl/programs/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/var/local/scratch/whitsonl/programs/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/polyMeshTetDecomposition.o
lnInclude/globalIndexAndTransformI.H: In member function ‘Foam::labelList Foam::globalIndexAndTransform::transformIndicesForPatches(const Foam::labelHashSet&) const’:
lnInclude/globalIndexAndTransformI.H:515: warning: converting to ‘Foam::label’ from ‘double’
lnInclude/syncToolsTemplates.C: In static member function ‘static void Foam::syncTools::syncBoundaryFaceList(const Foam::polyMesh&, Foam::UList<T>&, const CombineOp&, const TransformOp&) [with T = Foam::Vector<double>, CombineOp = Foam::eqOp<Foam::Vector<double> >, TransformOp = Foam::mapDistribute::transformPosition]’:
lnInclude/syncTools.H:395:  instantiated from ‘static void Foam::syncTools::swapBoundaryFacePositions(const Foam::polyMesh&, Foam::UList<T>&) [with T = Foam::Vector<double>]’
meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C:234:  instantiated from here
lnInclude/syncToolsTemplates.C:1355: error: call of overloaded ‘Field(Foam::SubField<Foam::Vector<double> >)’ is ambiguous
lnInclude/Field.C:141: note: candidates are: Foam::Field<Type>::Field(const Foam::Field<Type>&) [with Type = Foam::Vector<double>]
lnInclude/Field.C:179: note:                Foam::Field<Type>::Field(const Foam::UList<T>&) [with Type = Foam::Vector<double>]
lnInclude/syncToolsTemplates.C:1358: error: call of overloaded ‘Field(Foam::SubField<Foam::Vector<double> >)’ is ambiguous
lnInclude/Field.C:141: note: candidates are: Foam::Field<Type>::Field(const Foam::Field<Type>&) [with Type = Foam::Vector<double>]
lnInclude/Field.C:179: note:                Foam::Field<Type>::Field(const Foam::UList<T>&) [with Type = Foam::Vector<double>]
lnInclude/syncToolsTemplates.C: In static member function ‘static void Foam::syncTools::syncBoundaryFaceList(const Foam::polyMesh&, Foam::UList<T>&, const CombineOp&, const TransformOp&) [with T = int, CombineOp = Foam::maxEqOp<int>, TransformOp = Foam::mapDistribute::transform]’:
lnInclude/syncTools.H:300:  instantiated from ‘static void Foam::syncTools::syncBoundaryFaceList(const Foam::polyMesh&, Foam::UList<T>&, const CombineOp&) [with T = int, CombineOp = Foam::maxEqOp<int>]’
meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C:298:  instantiated from here
lnInclude/syncToolsTemplates.C:1355: error: call of overloaded ‘Field(Foam::SubField<int>)’ is ambiguous
lnInclude/Field.C:141: note: candidates are: Foam::Field<Type>::Field(const Foam::Field<Type>&) [with Type = int]
lnInclude/Field.C:179: note:                Foam::Field<Type>::Field(const Foam::UList<T>&) [with Type = int]
lnInclude/syncToolsTemplates.C:1358: error: call of overloaded ‘Field(Foam::SubField<int>)’ is ambiguous
lnInclude/Field.C:141: note: candidates are: Foam::Field<Type>::Field(const Foam::Field<Type>&) [with Type = int]
lnInclude/Field.C:179: note:                Foam::Field<Type>::Field(const Foam::UList<T>&) [with Type = int]
make: *** [Make/linux64GccDPOpt/polyMeshTetDecomposition.o] Error 1

Thanks,
Bryce

wyldckat October 16, 2011 04:42

Greetings Bryce,

What Gcc version are you using?
Code:

gcc -v
If it's anything below 4.3.3, then you'll need to either request your system's administrator for a more recent one or build one yourself.
Another possibility is to use OpenFOAM version made available by the CentFOAM project: http://sourceforge.net/apps/mediawik...itle=Main_Page

Yet another possibility would be to use Intel's compiler, Icc, but I think you'll need at least the version 12.0 for building OpenFOAM 2.0.

Best regards and good luck!
Bruno


All times are GMT -4. The time now is 07:48.