CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Open Source Meshers: Gmsh, Netgen, CGNS, ... (https://www.cfd-online.com/Forums/openfoam-meshing-open/)
-   -   Compiling gmshFoam with OpenFOAM-1.5 (https://www.cfd-online.com/Forums/openfoam-meshing-open/65543-compiling-gmshfoam-openfoam-1-5-a.html)

BlGene June 18, 2009 06:47

Compiling gmshFoam with OpenFOAM-1.5
 
I encountered a buch of problems when trying to compile gmshFoam with openfoam-1.5, in order to get gmsh2ToFoam. Before I try anything experimental like changing makefiles I wanted to inquire if gmshFoam is compatible with openfoam-1.5.

This is the compile error I get (below). It seems to be looking for a buncg of lnInclude files that don't exist in /usr/lib/OpenFOAM/OpenFOAM-1.5/src.
OStringStream.H, messageStream.H, error.H do exist but the compiler is not finding them.

Code:

+ wmake libso libgmshMessageStream
SOURCE=gmshMessageStream.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/usr/lib/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/usr/lib/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude  -fPIC -c $SOURCE -o Make/linux64Gcc/gmshMessageStream.o
In file included from gmshMessageStream.C:30:
gmshMessageStream.H:41:27: error: OStringStream.H: No such file or directory
gmshMessageStream.H:42:27: error: messageStream.H: No such file or directory
gmshMessageStream.C:31:19: error: error.H: No such file or directory
In file included from gmshMessageStream.C:30:
gmshMessageStream.H: In member function 'Foam::gmshMessageStream& Foam::gmshMessageStream::operator<<(T)':
gmshMessageStream.H:90: error: 'OStringStream' was not declared in this scope
gmshMessageStream.H:90: error: expected `;' before 'os'
gmshMessageStream.H:90: error: 'os' was not declared in this scope
gmshMessageStream.C: In function 'Foam::gmshMessageStream& Foam::endl(Foam::gmshMessageStream&)':
gmshMessageStream.C:61: error: 'Info' was not declared in this scope
gmshMessageStream.C:64: error: 'Warning' was not declared in this scope
gmshMessageStream.C:67: error: 'SeriousError' was not declared in this scope
gmshMessageStream.C:70: error: 'FatalError' was not declared in this scope
make: *** [Make/linux64Gcc/gmshMessageStream.o] Error 1


7islands June 18, 2009 10:03

Hi BlGene,
It should be if you checked out from the svn repository. Do other OF user libraries compile on your installation?

Takuya

BlGene June 18, 2009 12:36

I have a svn checkout. I haven't tried to install any other OF user libraries, which ones should I try to install? One possibility might be that the gentoo package manager that I am using is removing the lnInclude files that the makefile is looking for.

7islands June 19, 2009 10:22

Yes the possibly missing lnInclude directories are where I'm suspecting, if you really installed OF under /usr/lib/OpenFOAM/OpenFOAM-1.5. For trying out, any user libraries floating around on this forum or on the Wiki should be OK (e.g. groovyBC).

Takuya

SkunkWorks July 28, 2009 19:26

Something is missing I think?
 
Hi then I try to compile gmshFoam with ./Allwmake

It stops after a while.

It looks like this at the end
__________________________________________________ _____________________

SOURCE=gmshViews/gmshViews.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/rickard/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/dynamicMesh/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/meshTools/lnInclude -I../libgmshMessageStream/lnInclude -I.. -DWM_PROJECT_VERSION_MAJOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $1;}'` -DWM_PROJECT_VERSION_MINOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $2;}'` -DWM_PROJECT_VERSION_PATCH=`echo 1.5 | awk 'BEGIN{FS="."}{if (length($3) > 0) print $3; else print "0";}'` -IlnInclude -I. -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gmshViews.o
/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld returnerade avslutningsstatus 1
make: *** [/home/rickard/OpenFOAM/rickard-1.5/lib/linux64GccDPOpt/libgmshFoam.so] Fel 1

__________________________________________________ ______________________

Any suggestions ?

May be linux64GccDPOpt is corrupt But the check sum is gone according to todays relies om OF 1.6. Is it possible to compile th 1.6. ?

/ Rickard

7islands July 28, 2009 20:28

Hi Rickard,

I still haven't done any testing with the 1.6 release. Meanwhile you can try downloading the 1.5 realease again from here.

T

SkunkWorks July 29, 2009 09:16

Reloaded files And with 64 bit support. (I've got Core2 duo)
 
Hi And thanks a lot!
I still have problem. It starts with;
__________________________________________________ ______________________________

rickard@SkunkWorks:~/OpenFOAM/OpenFOAM-1.5/applications/utilities/gmshFoam$ ./Allwmake
+ wmake libso libgmshMessageStream
Making dependency list for source file gmshMessageStream.C
SOURCE=gmshMessageStream.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/rickard/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gmshMessageStream.o
'/home/rickard/OpenFOAM/rickard-1.5/lib/linux64GccDPOpt/libgmshMessageStream.so' is up to date.
+ wmake libso libgmshFoam
Making dependency list for source file gmshMesh/gmshMeshFormat.C
Making dependency list for source file gmshMesh/gmshPhysicalNames.C
Making dependency list for source file gmshMesh/gmshNodes.C
could not open file Map.hh for source file gmshMesh/gmshNodes.C
Making dependency list for source file gmshMesh/gmshElements.C
Making dependency list for source file gmshMesh/gmshMesh.C
could not open file Map.hh for source file gmshMesh/gmshMesh.C
Making dependency list for source file gmshToPolyMesh/gmshToPolyMesh.C
could not open file Time.hh for source file gmshToPolyMesh/gmshToPolyMesh.C
could not open file Map.hh for source file gmshToPolyMesh/gmshToPolyMesh.C
Making dependency list for source file polyMeshConversion/polyMeshConversion.C
could not open file Time.hh for source file polyMeshConversion/polyMeshConversion.C
Making dependency list for source file polyMeshToGmsh/polyMeshToGmsh.C
could not open file Time.hh for source file polyMeshToGmsh/polyMeshToGmsh.C
Making dependency list for source file gmshViews/gmshViewBase.C
could not open file Time.hh for source file gmshViews/gmshViewBase.C
Making dependency list for source file gmshViews/gmshViewPointMesh.C
could not open file Time.hh for source file gmshViews/gmshViewPointMesh.C
Making dependency list for source file gmshViews/gmshViewPointMeshMotion.C
could not open file Time.hh for source file gmshViews/gmshViewPointMeshMotion.C
Making dependency list for source file gmshViews/gmshViewSurfaceMesh.C
could not open file Time.hh for source file gmshViews/gmshViewSurfaceMesh.C
Making dependency list for source file gmshViews/gmshViewSurfaceMeshMotion.C
could not open file Time.hh for source file gmshViews/gmshViewSurfaceMeshMotion.C
Making dependency list for source file gmshViews/gmshViewVolMesh.C
could not open file Time.hh for source file gmshViews/gmshViewVolMesh.C
Making dependency list for source file gmshViews/gmshViewVolMeshMotion.C
could not open file Time.hh for source file gmshViews/gmshViewVolMeshMotion.C
Making dependency list for source file gmshViews/gmshViews.C
could not open file Time.hh for source file gmshViews/gmshViews.C
SOURCE=gmshMesh/gmshMeshFormat.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/rickard/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/dynamicMesh/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/meshTools/lnInclude -I../libgmshMessageStream/lnInclude -I.. -DWM_PROJECT_VERSION_MAJOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $1;}'` -DWM_PROJECT_VERSION_MINOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $2;}'` -DWM_PROJECT_VERSION_PATCH=`echo 1.5 | awk 'BEGIN{FS="."}{if (length($3) > 0) print $3; else print "0";}'` -IlnInclude -I. -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gmshMeshFormat.o
__________________________________________________ _________________________

And ends up :
SOURCE=gmshViews/gmshViews.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/rickard/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/dynamicMesh/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/meshTools/lnInclude -I../libgmshMessageStream/lnInclude -I.. -DWM_PROJECT_VERSION_MAJOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $1;}'` -DWM_PROJECT_VERSION_MINOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $2;}'` -DWM_PROJECT_VERSION_PATCH=`echo 1.5 | awk 'BEGIN{FS="."}{if (length($3) > 0) print $3; else print "0";}'` -IlnInclude -I. -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gmshViews.o
'/home/rickard/OpenFOAM/rickard-1.5/lib/linux64GccDPOpt/libgmshFoam.so' is up to date.
+ wmake gmsh2ToFoam
Making dependency list for source file gmsh2ToFoam.C
could not open file Time.hh for source file gmsh2ToFoam.C
could not open file Map.hh for source file gmsh2ToFoam.C
SOURCE=gmsh2ToFoam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I../libgmshFoam/lnInclude -I../libgmshMessageStream/lnInclude -I.. -DWM_PROJECT_VERSION_MAJOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $1;}'` -DWM_PROJECT_VERSION_MINOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $2;}'` -DWM_PROJECT_VERSION_PATCH=`echo 1.5 | awk 'BEGIN{FS="."}{if (length($3) > 0) print $3; else print "0";}'` -IlnInclude -I. -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gmsh2ToFoam.o
gmsh2ToFoam.C: In function "void runGmsh(const Foam::fileName&, const Foam::argList&, Foam::label)":
gmsh2ToFoam.C:83: varning: jämföreslse mellan heltalsuttryck med och utan tecken
gmsh2ToFoam.C:102: varning: användning av gammaldags typkonvertering
gmsh2ToFoam.C:102: varning: användning av gammaldags typkonvertering
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I../libgmshFoam/lnInclude -I../libgmshMessageStream/lnInclude -I.. -DWM_PROJECT_VERSION_MAJOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $1;}'` -DWM_PROJECT_VERSION_MINOR=`echo 1.5 | awk 'BEGIN{FS="."}{print $2;}'` -DWM_PROJECT_VERSION_PATCH=`echo 1.5 | awk 'BEGIN{FS="."}{if (length($3) > 0) print $3; else print "0";}'` -IlnInclude -I. -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/rickard/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/gmsh2ToFoam.o -L/home/rickard/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt \
-ldynamicMesh -L/home/rickard/OpenFOAM/rickard-1.5/lib/linux64GccDPOpt -lgmshFoam -lgmshMessageStream -lOpenFOAM -liberty -ldl -lm -o /home/rickard/OpenFOAM/rickard-1.5/applications/bin/linux64GccDPOpt/gmsh2ToFoam
/usr/bin/ld: cannot find -liberty
collect2: ld returnerade avslutningsstatus 1
make: *** [/home/rickard/OpenFOAM/rickard-1.5/applications/bin/linux64GccDPOpt/gmsh2ToFoam] Fel 1
rickard@SkunkWorks:~/OpenFOAM/OpenFOAM-1.5/applications/utilities/gmshFoam$
__________________________________________________ ________________________

I've got Swedish support in the prompt.

gmsh2ToFoam.C:83: varning: jämföreslse mellan heltalsuttryck med och utan tecken
gmsh2ToFoam.C:102: varning: användning av gammaldags typkonvertering
gmsh2ToFoam.C:102: varning: användning av gammaldags typkonvertering

The first line says warning : compare between integer with and without sign
The second and third says :warning : use of old type converting. casting I think.

Any new suggestions ?

Regards / Rickard

7islands July 29, 2009 09:26

You need libiberty. IIRC it's in binutils-devel (the exact name depends on your distro).

T

bigred August 5, 2009 06:49

which is the latest version of gmshFoam and from where is it available for download? I would like to use it to simplify meshing of more complicated models. Thanks.

7islands August 6, 2009 04:03

Hi Matthew,

Please try
Code:

svn co https://of-interfaces.svn.sourceforge.net/svnroot/of-interfaces/trunk/gmshFoam
Takuya

bigred August 6, 2009 04:26

Thanks Takuya,

i'll give it a try this evening. I've been having problems get gmsh to work stably on my laptop though. I think it has something to do with the Via chipset and the S3 graphics not really being supported by ubuntu (or actually via not supporting ubuntu :) )


All times are GMT -4. The time now is 05:34.