CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compiling (http://www.cfd-online.com/Forums/openfoam-installation/57428-compiling.html)

morfeus80 February 26, 2008 04:42

Hallo, I'm trying to compile
 
Hallo,
I'm trying to compile the liftDrag utility with OpenSuse 10.3, but I have this output:

mattia@linux:~/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing> ./Allwmake
/home/mattia/OpenFOAM/OpenFOAM-1.4.1/wmake/wmake: line 198: make: command not found
/home/mattia/OpenFOAM/OpenFOAM-1.4.1/wmake/wmake: line 199: make: command not found
/home/mattia/OpenFOAM/OpenFOAM-1.4.1/wmake/wmake: cannot make, file Make/linuxGccDPOpt/objectFiles was not created successfully
/home/mattia/OpenFOAM/OpenFOAM-1.4.1/wmake/wmake: line 198: make: command not found
/home/mattia/OpenFOAM/OpenFOAM-1.4.1/wmake/wmake: line 199: make: command not found
/home/mattia/OpenFOAM/OpenFOAM-1.4.1/wmake/wmake: cannot make, file Make/linuxGccDPOpt/objectFiles was not created successfully


What have I to do?

mwild February 26, 2008 05:34

You have to install at least (
 
You have to install at least (using YaST):

- make
- flex

You probably will also need binutils and if it is not installed already, something called libc6-dev (or similar, I don't have suse).

If you didn't install the gcc binary pack you will also need gcc-c++.

Might be that I forgot something...

Hope this helps.

Michael

morfeus80 February 26, 2008 07:03

I installed 'make' and 'flex'
 
I installed 'make' and 'flex' and now it works.

Thanks!

morfeus80 March 3, 2008 04:55

Now I'm trying to install lift
 
Now I'm trying to install liftDrag tool in another machine (a cluster), but when I run wmake in the liftDrag utility location, I have the following error:

[mattia@cluster liftDrag]$ wmake
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/ -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/cfdTools/general/lnInclude -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/specie/lnInclude -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/basic/lnInclude -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels/LESdeltas/lnInclude -IlnInclude -I. -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC Make/linux64GccDPOpt/liftDrag.o -L/home/mattia/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt \
-lcompressiblePostProcessing -lincompressiblePostProcessing -lOpenFOAM -liberty -ldl -lm -o /home/mattia/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/liftDrag
/usr/bin/ld: cannot find -lcompressiblePostProcessing
collect2: ld returned 1 exit status
make: *** [/home/mattia/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/liftDrag] Error 1


Can anyone help me?

dmoroian March 3, 2008 10:24

It complains about libcompress
 
It complains about libcompressiblePostProcessing! I didn't find a library with this name in my distribution. Remove it from the options file and see what functions is actually after. Then you can try to identify them in a new library.

Dragos

morfeus80 March 6, 2008 12:12

I removed lcompressiblePostPro
 
I removed lcompressiblePostProcessing from the option file and now after typing "wmake" I have a lot of output lines. I post only the last, but if you need I can post all the output:

liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldE NS_7volMeshEEC1ERKNS_8IOobject ERKS3_[Foam::GeometricField<double,>::GeometricField(Foam ::IOobject const&, Foam::GeometricField<double,> const&)]+0x105): undefined reference to `Foam::GeometricField<double,>::debug'
Make/linux64GccDPOpt/liftDrag.o: In function `Foam::GeometricField<double,>::GeometricField(Foa m::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)':
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldE NS_7volMeshEEC1ERKNS_8IOobject ERKNS_6fvMeshERKNS_12dimensionSetERKNS_4wordE[Foam::GeometricField<double,>::Geo metricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)]+0xde): undefined reference to `Foam::fvMesh::boundary() const'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldE NS_7volMeshEEC1ERKNS_8IOobject ERKNS_6fvMeshERKNS_12dimensionSetERKNS_4wordE[Foam::GeometricField<double,>::Geo metricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)]+0xfd): undefined reference to `Foam::GeometricField<double,>::debug'
Make/linux64GccDPOpt/liftDrag.o: In function `Foam::tmp<foam::geometricfield<double,> > Foam::operator*<foam::fvpatchfield,>(Foam::Geometr icField<double,> const&, Foam::GeometricField<double,> const&)':
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text._ZN4FoammlINS_12fvPatchFieldENS_7volMeshEEEN S_3tmpINS_14GeometricFieldIdT_ T0_EEEERKS7_SA_[Foam::tmp<foam::geometricfield<double,> > Foam::operator*<foam::fvpatchfield,>(Foam::Geometr icField<double,> const&, Foam::GeometricField<double,> const&)]+0x2a5): undefined reference to `Foam::calculatedFvPatchField<double>::typeName'
Make/linux64GccDPOpt/liftDrag.ohttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.data.rel.ro._ZTIN4Foam11wallFvPatchE[typeinfo for Foam::wallFvPatch]+0x10): undefined reference to `typeinfo for Foam::fvPatch'
collect2: ld returned 1 exit status
make: *** [/home/mattia/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/liftDrag] Error 1


What's the problem now? Do you have any solution?

dmoroian March 6, 2008 12:46

Ok, so try now to replace the
 
Ok, so try now to replace the -lcompressiblePostProcessing with -lOpenFOAM.

Dragos

morfeus80 March 7, 2008 02:54

Thanks Dragos, I raplaced -lco
 
Thanks Dragos, I raplaced -lcompressiblePostProcessing and then it couldn't find the -lincompressiblePostProcessing. So I removed that line from the option file and now the error is the following:

Make/linux64GccDPOpt/liftDrag.o: In function `Foam::GeometricField<double,>::GeometricField(Foa m::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)':
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldE NS_7volMeshEEC1ERKNS_8IOobject ERKNS_6fvMeshERKNS_12dimensionSetERKNS_4wordE[Foam::GeometricField<double,>::Geo metricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)]+0xde): undefined reference to `Foam::fvMesh::boundary() const'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldE NS_7volMeshEEC1ERKNS_8IOobject ERKNS_6fvMeshERKNS_12dimensionSetERKNS_4wordE[Foam::GeometricField<double,>::Geo metricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)]+0xfd): undefined reference to `Foam::GeometricField<double,>::debug'
Make/linux64GccDPOpt/liftDrag.o: In function `Foam::tmp<foam::geometricfield<double,> > Foam::operator*<foam::fvpatchfield,>(Foam::Geometr icField<double,> const&, Foam::GeometricField<double,> const&)':
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text._ZN4FoammlINS_12fvPatchFieldENS_7volMeshEEEN S_3tmpINS_14GeometricFieldIdT_ T0_EEEERKS7_SA_[Foam::tmp<foam::geometricfield<double,> > Foam::operator*<foam::fvpatchfield,>(Foam::Geometr icField<double,> const&, Foam::GeometricField<double,> const&)]+0x2a5): undefined reference to `Foam::calculatedFvPatchField<double>::typeName'
Make/linux64GccDPOpt/liftDrag.ohttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.data.rel.ro._ZTIN4Foam11wallFvPatchE[typeinfo for Foam::wallFvPatch]+0x10): undefined reference to `typeinfo for Foam::fvPatch'
collect2: ld returned 1 exit status
make: *** [/home/mattia/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/liftDrag] Error 1

What can I do now?

dmoroian March 7, 2008 04:16

Hi Mattia, In my previous pos
 
Hi Mattia,
In my previous post I said that you have to replace -lcompressiblePostProcessing with -lOpenFOAM.
The removing part was just a test to see what functions it needs.

Dragos

morfeus80 March 7, 2008 09:37

Hi Dragos, that's what I did,
 
Hi Dragos,
that's what I did, but now I have the same problem with -lincompressiblePostProcessing that is in the line under in the option file.

dmoroian March 7, 2008 17:58

Hm, my appologies, I should re
 
Hm, my appologies, I should read more careful the post.
Ok, so until now you have removed -lcompressiblePostProcessing and -lincompressiblePostProcessing, and added -lOpenFOAM.
Now add -lfiniteVolume in your options file.

Dragos

morfeus80 March 8, 2008 05:03

Hi Dragos, this is last outpu
 
Hi Dragos,
this is last output after -lfiniteVolume has been added:

[mattia@cluster liftDrag]$ wmake
SOURCE=liftDrag.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/mattia/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/ -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/cfdTools/general/lnInclude -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/specie/lnInclude -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/basic/lnInclude -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels/LESdeltas/lnInclude -IlnInclude -I. -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/liftDrag.o
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/ -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/cfdTools/general/lnInclude -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/specie/lnInclude -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/basic/lnInclude -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels/LESdeltas/lnInclude -IlnInclude -I. -I/home/mattia/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC Make/linux64GccDPOpt/liftDrag.o -L/home/mattia/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt \
-lOpenFOAM -lfiniteVolume -lOpenFOAM -liberty -ldl -lm -o /home/mattia/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/liftDrag
Make/linux64GccDPOpt/liftDrag.o: In function `main':
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x2729): undefined reference to `Foam::basicThermo::New(Foam::fvMesh const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x2d46): undefined reference to `Foam::momentCoefficient(Foam::GeometricField<foam ::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::dimensioned<double> const&, Foam::word const&, Foam::Vector<double> const&, double const&, double const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x2de2): undefined reference to `Foam::liftCoefficient(Foam::GeometricField<foam:: vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::dimensioned<double> const&, Foam::word const&, Foam::Vector<double> const&, double const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x2e75): undefined reference to `Foam::dragCoefficient(Foam::GeometricField<foam:: vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::dimensioned<double> const&, Foam::word const&, Foam::Vector<double> const&, double const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x390b): undefined reference to `Foam::compressible::pressureMomentCoefficient(Foa m::GeometricField<foam::vector <double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::word const&, Foam::Vector<double> const&, double const&, double const&, double const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x39ad): undefined reference to `Foam::compressible::pressureLiftCoefficient(Foam: :GeometricField<foam::vector<d ouble>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::word const&, Foam::Vector<double> const&, double const&, double const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x3a43): undefined reference to `Foam::compressible::pressureDragCoefficient(Foam: :GeometricField<foam::vector<d ouble>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::word const&, Foam::Vector<double> const&, double const&, double const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x4461): undefined reference to `Foam::compressible::momentCoefficient(Foam::Geome tricField<foam::vector<double> , Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::GeometricField<double,> const&, Foam::word const&, Foam::Vector<double> const&, double const&, double const&, double const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x450e): undefined reference to `Foam::compressible::liftCoefficient(Foam::Geometr icField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::GeometricField<double,> const&, Foam::word const&, Foam::Vector<double> const&, double const&, double const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x45ae): undefined reference to `Foam::compressible::dragCoefficient(Foam::Geometr icField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::GeometricField<double,> const&, Foam::word const&, Foam::Vector<double> const&, double const&, double const&)'
collect2: ld returned 1 exit status
make: *** [/home/mattia/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/liftDrag] Error 1



Thanks in advance!

dmoroian March 8, 2008 05:25

The class basicThermo comes in
 
The class basicThermo comes in libbasicThermophysicalModels, so add:
-lbasicThermophysicalModels

Dragos

morfeus80 March 8, 2008 06:24

Thanks, these are last lines o
 
Thanks, these are last lines of the new output:

liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x3a43): undefined reference to `Foam::compressible::pressureD
ragCoefficient(Foam::GeometricField<foam::vector<d ouble>, Foam::fvPatchField, Fo
am::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volM
esh> const&, Foam::word const&, Foam::Vector<double> const&, double const&, doub
le const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x4461): undefined reference to `Foam::compressible::momentCoe
fficient(Foam::GeometricField<foam::vector<double> , Foam::fvPatchField, Foam::vo
lMesh> const&, Foam::GeometricField<double,> c onst&, Foam::GeometricField<double,> const&, F oam::word const&, Foam::Vector<double> const&, double const&, double const&, dou ble const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x450e): undefined reference to `Foam::compressible::liftCoeff icient(Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volM esh> const&, Foam::GeometricField<double,> con st&, Foam::GeometricField<double,> const&, Foa m::word const&, Foam::Vector<double> const&, double const&, double const&)'
liftDrag.Chttp://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif.text+0x45ae): undefined reference to `Foam::compressible::dragCoeff icient(Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volM esh> const&, Foam::GeometricField<double,> con st&, Foam::GeometricField<double,> const&, Foa m::word const&, Foam::Vector<double> const&, double const&, double const&)'
/home/mattia/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so: undefined reference to `Foam::specie::RR'
/home/mattia/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so: undefined reference to `Foam::perfectGas::perfectGas(Foam::Istream&)'
/home/mattia/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so: undefined reference to `Foam::specie::Tstd'
collect2: ld returned 1 exit status
make: *** [/home/mattia/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt /liftDrag] Error 1

morfeus80 March 8, 2008 09:16

Another thing: if I copy the -
 
Another thing: if I copy the -libcompressiblePostProcessing and -libincompressiblePostProcessing libraries from the 32bit version to the 64bit version where I can't find them, can it cause any problem?

dmoroian March 10, 2008 02:23

Hi Mattia, On short: 1. If y
 
Hi Mattia,
On short:
1. If you copy the libraries and put them in let say /tmp/libcompressiblePostProcessing and /tmp/libincompressiblePostProcessing you should add something like this -L/tmp and then the usual -lcompress.... But I don't know if you can use the 32bit versions!

2. The function/class missed by the compiler (Foam::compressible::pressureDragCoefficient) in the above message is not on my distribution so...

Anyway I will try to compile myself the utility and I will let you know about it.

Dragos

morfeus80 March 10, 2008 03:53

Thanks Dragos, you're very ki
 
Thanks Dragos,
you're very kind to help me!

dmoroian March 13, 2008 07:26

Hello Mattia, Well, good and
 
Hello Mattia,
Well, good and bad news. The good ones are that liftDrag utility gets compiled without any problems on the OpenFOAM-1.4.1-dev version. The bad news is that you have to download it and compile it yourself, still if you follow the build instructions it should go smooth.

Dragos

ryan_m March 16, 2008 02:21

Hey, Im a relatively new Op
 
Hey,

Im a relatively new OpenFOAM user (1 week). I have run plenty of 2D cases with ok results. Im looking at using the liftDrag tool but getting really confused with so much info on the forum. The only version of OpenFOAM I have on my computer is 1.4.1. Can somebody please tell where to download liftDrag from and which folder to put it in for 1.4.1?

Thanks very much for any help.

Ryan


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