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 installation on AIX 53 with gnu 40 compiler (http://www.cfd-online.com/Forums/openfoam-installation/57638-openfoam-installation-aix-53-gnu-40-compiler.html)

chauvin June 13, 2006 08:15

Hello All -- I am trying to
 
Hello All --

I am trying to compile OpenFOAM on AIX 5.3 with gcc/g++ v4.
Everything is going ok until the creation of the libPstream.so shared library.


cd Make/ibmOpt ; g++ -fpermissive -maix32 -Dibm -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -ffast-m
ath -DNoRepository -ftemplate-depth-30 -I/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclu
de -IlnInclude -I. -fPIC -pthread -shared Pstream.o IPread.o OPwrite.o -L/works/work1/nsc/workdir/tonga/OpenF
OAM/OpenFOAM-1.2/lib/ibmOpt -o /works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/lib/ibmOpt/dummy/libPstream .so
ld: 0711-317 ERROR: Undefined symbol: Foam::error::exit(int)
ld: 0711-317 ERROR: Undefined symbol: Foam::error::abort()
ld: 0711-317 ERROR: Undefined symbol: Foam::FatalError
ld: 0711-317 ERROR: Undefined symbol: .Foam::error::operator()(char const*, char const*, int)
ld: 0711-317 ERROR: Undefined symbol: .Foam::operator<<(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&, char const*)
ld: 0711-317 ERROR: Undefined symbol: .Foam::operator<<(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&, char)
ld: 0711-317 ERROR: Undefined symbol: Foam::IOstream::name_
ld: 0711-317 ERROR: Undefined symbol: .Foam::operator<<(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&, int)
ld: 0711-317 ERROR: Undefined symbol: vtable for Foam::IPstream
ld: 0711-317 ERROR: Undefined symbol: vtable for Foam::IOstream
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,>, std::allocator<char> >::_Rep::
_M_destroy(std::allocator<char> const&)
ld: 0711-317 ERROR: Undefined symbol: Foam::IOstream::check(char const*) const
ld: 0711-317 ERROR: Undefined symbol: Foam::IOstream::print(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) const
ld: 0711-317 ERROR: Undefined symbol: vtable for __cxxabiv1::__si_class_type_info
ld: 0711-317 ERROR: Undefined symbol: typeinfo for Foam::IOstream
ld: 0711-317 ERROR: Undefined symbol: vtable for __cxxabiv1::__vmi_class_type_info
ld: 0711-317 ERROR: Undefined symbol: Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifPstream::print(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) const
ld: 0711-317 ERROR: Undefined symbol: Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifPstream::write(Foam::token const&)
ld: 0711-317 ERROR: Undefined symbol: Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifPstream::write(char)
ld: 0711-317 ERROR: Undefined symbol: Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifPstream::write(char const*)
ld: 0711-317 ERROR: Undefined symbol: Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifPstream::write(Foam::word const&)
ld: 0711-317 ERROR: Undefined symbol: Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifPstream::write(Foam::string const&)
ld: 0711-317 ERROR: Undefined symbol: Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifPstream::write(int)
ld: 0711-317 ERROR: Undefined symbol: Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifPstream::write(double)
ld: 0711-317 ERROR: Undefined symbol: Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifPstream::write(char const*, long)
ld: 0711-317 ERROR: Undefined symbol: vtable for __cxxabiv1::__class_type_info
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make: 1254-004 The error code from the last command is 1.


I have observed this behaviour with both version 1.3 and 1.2 of OpenFOAM.

Could you please help me with that?

mattijs June 13, 2006 12:44

You are missing a -lOpenFOAM s
 
You are missing a -lOpenFOAM somewhere on the link line. Check the corresponding $WM_DIR/rules/linuxGcc4/ files.

chauvin June 15, 2006 12:30

Thank you very much for your h
 
Thank you very much for your help!!!!!!!!


But now I have two other issues -- I have moved to gcc4.1 -- which seemed C++ code writing related.

The first error is:

lnInclude/tetPolyBoundaryMeshCellDecomp.H:49: error: forward declaration of 'const struct Foam::globalProcessorTetPolyPatchCellDecomp'

when compiling the processorTetPolyPatchCellDecompM.C file.

Here is the complete output:
SOURCE_DIR=tetPolyMeshCellDecomp/tetPolyPatches/derivedTetPolyPatches/processorT etPolyPatch
SOURCE=tetPolyMeshCellDecomp/tetPolyPatches/derivedTetPolyPatches/processorTetPo lyPatch/processorTetPolyPatchCellDecompM.C ; g++ -maix32 -fpermissive -DAIX -Wall
-O3 -fno-gcse -DNoRepository -ftemplate-depth-30 -DCELL_DECOMP -I/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC
-c $SOURCE -o Make.cellDecomp/AIXOpt/processorTetPolyPatchCellDecompM.o
tetPolyMeshCellDecomp/tetPolyPatches/derivedTetPolyPatches/processorTetPolyPatch /processorTetPolyPatchCellDecomp.C: In member function 'Foam::labelList Foam::processorTetPo
lyPatchCellDecomp::calcProcLocalEdgesIndices(const Foam::PrimitivePatch<foam::face,>&) const':
tetPolyMeshCellDecomp/tetPolyPatches/derivedTetPolyPatches/processorTetPolyPatch /processorTetPolyPatchCellDecomp.C:77: error: invalid use of undefined type 'const struct Fo
am::globalProcessorTetPolyPatchCellDecomp'
lnInclude/tetPolyBoundaryMeshCellDecomp.H:49: error: forward declaration of 'const struct Foam::globalProcessorTetPolyPatchCellDecomp'


And the other one which seems more serious:
SOURCE=derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixed ValueFvPatchFields.C ; g++ -maix32 -fpermissive -DAIX -Wall -O3 -fno-gcse -DNoRep
ository -ftemplate-depth-30 -I/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/meshTools/lnInclude -I/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/sampl
ing/lnInclude -I/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -c $SOURCE -o Make/AIXOpt/timeVaryingUniformFixed
ValueFvPatchFields.o
derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFv PatchField.C: In constructor 'Foam::timeVaryingUniformFixedValueFvPatchField<ty pe>::timeVary
ingUniformFixedValueFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with Type = double]':
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPa tchField.H:128: instantiated from 'static Foam::tmp<foam::fvpatchfield<type> > Foam::fvPat
chField<type>::adddictionaryConstructorToTable<fvp atchfieldtype>::New(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with fvPatchFieldType = Foam
::timeVaryingUniformFixedValueFvPatchField<double> , Type = double]'
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPa tchField.H:128: instantiated from 'Foam::fvPatchField<type>::adddictionaryConstructo rToTab
le<fvpatchfieldtype>::adddictionaryConstructorToTa ble() [with fvPatchFieldType = Foam::timeVaryingUniformFixedValueFvPatchField<dou ble>, Type = double]'
derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFv PatchFields.C:40: instantiated from here
derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFv PatchField.C:80: error: no matching function for call to 'operator==(Foam::Field<double>)'
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/cell ModelI.H:124: note: candidates are: bool Foam::operator==(const Foam::cellModel&, const Foam
::cellModel&)
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/edge I.H:147: note: bool Foam::operator==(const Foam::edge&, const Foam::edge&)
derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFv PatchField.C: In constructor 'Foam::timeVaryingUniformFixedValueFvPatchField<ty pe>::timeVary
ingUniformFixedValueFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with Type = Foam::Vector<double>]':
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPa tchField.H:128: instantiated from 'static Foam::tmp<foam::fvpatchfield<type> > Foam::fvPat
chField<type>::adddictionaryConstructorToTable<fvp atchfieldtype>::New(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with fvPatchFieldType = Foam
::timeVaryingUniformFixedValueFvPatchField<foam::v ector<double> >, Type = Foam::Vector<double>]'
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPa tchField.H:128: instantiated from 'Foam::fvPatchField<type>::adddictionaryConstructo rToTab
le<fvpatchfieldtype>::adddictionaryConstructorToTa ble() [with fvPatchFieldType = Foam::timeVaryingUniformFixedValueFvPatchField<foa m::vector<double> >, Type = Foam::Vector<
double>]'
derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFv PatchFields.C:40: instantiated from here
derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFv PatchField.C:80: error: no matching function for call to 'operator==(Foam::Field<Foam::Vecto
r<double> >)'
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/cell ModelI.H:124: note: candidates are: bool Foam::operator==(const Foam::cellModel&, const Foam
::cellModel&)
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/edge I.H:147: note: bool Foam::operator==(const Foam::edge&, const Foam::edge&)
derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFv PatchField.C: In constructor 'Foam::timeVaryingUniformFixedValueFvPatchField<ty pe>::timeVary
ingUniformFixedValueFvPatchField(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with Type = Foam::Tensor<double>]':
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPa tchField.H:128: instantiated from 'static Foam::tmp<foam::fvpatchfield<type> > Foam::fvPat
chField<type>::adddictionaryConstructorToTable<fvp atchfieldtype>::New(const Foam::fvPatch&, const Foam::Field<type>&, const Foam::dictionary&) [with fvPatchFieldType = Foam
::timeVaryingUniformFixedValueFvPatchField<foam::t ensor<double> >, Type = Foam::Tensor<double>]'
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPa tchField.H:128: instantiated from 'Foam::fvPatchField<type>::adddictionaryConstructo rToTab
le<fvpatchfieldtype>::adddictionaryConstructorToTa ble() [with fvPatchFieldType = Foam::timeVaryingUniformFixedValueFvPatchField<foa m::tensor<double> >, Type = Foam::Tensor<
double>]'
derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFv PatchFields.C:40: instantiated from here
derivedFvPatchFields/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFv PatchField.C:80: error: no matching function for call to 'operator==(Foam::Field<Foam::Tenso
r<double> >)'
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/cell ModelI.H:124: note: candidates are: bool Foam::operator==(const Foam::cellModel&, const Foam
::cellModel&)
/works/work1/nsc/workdir/tonga/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/edge I.H:147: note: bool Foam::operator==(const Foam::edge&, const Foam::edge&)



Could you help me one more time? I am not a C++ expert so it is not easy for me to understand what is going wrong here.

hjasak June 15, 2006 13:12

In the file tetPolyMeshCell
 
In the file

tetPolyMeshCellDecomp/tetPolyPatches/derivedTetPolyPatches/processorTetPolyPatch /processorTetPolyPatchCellDecomp.C

at the beginning there should be a line saying something like:

#include "globalProcessorTetPolyPatchCellDecomp.H"

If it is not there, add it.

Hrv


All times are GMT -4. The time now is 00:12.