CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] Compilation error (openFOAM v4.1)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By joaoantoniocardoso

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2019, 08:01
Default Compilation error (openFOAM v4.1)
  #1
New Member
 
Praveen Srinivasa
Join Date: Jun 2019
Posts: 1
Rep Power: 0
praveenSrinivas is on a distinguished road
Hej,

I am a new user of openFOAM and I am trying ton install openFOAM V4.1 (without docker) on our computational clusters. I encountered a compilation error and require some help figuring out what it is.

WE are using the SLES 15 (2018)

I am attaching the error message below, please take a look at it.

Code:
Making dependency list for source file foamyQuadMesh.C
Making dependency list for source file shortEdgeFilter2D.C
Making dependency list for source file CV2DIO.C
Making dependency list for source file insertBoundaryConformPointPairs.C
Making dependency list for source file insertSurfaceNearPointPairs.C
Making dependency list for source file insertSurfaceNearestPointPairs.C
Making dependency list for source file insertFeaturePoints.C
Making dependency list for source file CV2D.C
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -frounding-math -DNDEBUG -I/home/u049944/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/cgal-system/include -I/include -I/include -I/home/u049944/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/boost-system/include -I/usr/include -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds -I/home/u049944/OpenFOAM/OpenFOAM-4.1/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/lnInclude -I../conformalVoronoi2DMesh/lnInclude -I../conformalVoronoiMesh/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/parallel/decompose/decompositionMethods/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/finiteVolume/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/meshTools/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/surfMesh/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/edgeMesh/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/dynamicMesh/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/mesh/extrudeModel/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/sampling/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/triSurface/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/fileFormats/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/mesh/snappyHexMesh/lnInclude -IlnInclude -I. -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/home/u049944/OpenFOAM/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c CV2D.C -o /home/u049944/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.o
In file included from CV2D.C:26:0:
CV2D.H:352:51: error: \u2018point\u2019 does not name a type
inline const point2D& toPoint2D(const point&) const;
^~~~~
CV2D.H:354:20: error: \u2018point\u2019 does not name a type
inline point toPoint3D(const point2D&) const;
^~~~~
CV2D.H:366:20: error: \u2018point\u2019 does not name a type
inline point toPoint3D(const Point&) const;
^~~~~
In file included from CV2D.H:469:0,
from CV2D.C:26:
CV2DI.H: In member function \u2018bool Foam::CV2D::insertMirrorPoint(const point2D&, const point2D&)\u2019:
CV2DI.H:85:24: error: \u2018toPoint3D\u2019 was not declared in this scope
if (qSurf_.outside(toPoint3D(mirrorPoint)))
^~~~~~~~~
CV2DI.H:85:24: note: suggested alternative: \u2018toPoint2D\u2019
if (qSurf_.outside(toPoint3D(mirrorPoint)))
^~~~~~~~~
toPoint2D
CV2DI.H: At global scope:
CV2DI.H:124:57: error: \u2018point\u2019 does not name a type; did you mean \u2018Point\u2019?
inline const Foam:oint2D& Foam::CV2D::toPoint2D(const point& p) const
^~~~~
Point
CV2DI.H:141:60: error: no \u2018Foamint Foam::CV2D::toPoint3D(const point2D&) const\u2019 member function declared in class \u2018Foam::CV2D\u2019
inline Foamint Foam::CV2D::toPoint3D(const point2D& p) const
^~~~~
CV2DI.H:176:58: error: no \u2018Foamint Foam::CV2D::toPoint3D(const Point&) const\u2019 member function declared in class \u2018Foam::CV2D\u2019
inline Foamint Foam::CV2D::toPoint3D(const Point& P) const
^~~~~
CV2D.C: In constructor \u2018Foam::CV2D::CV2D(const Foam::Time&, const Foam::dictionary&)\u2019:
CV2D.C:156:9: error: no matching function for call to \u2018Foam::CV2D::point(Foam::ITstream&)\u2019
).z()
^
In file included from /usr/include/CGAL/Delaunay_triangulation_2.h:28:0,
from CGALTriangulation2DKernel.H:36,
from CGALTriangulation2Ddefs.H:44,
from CV2D.H:122,
from CV2D.C:26:
/usr/include/CGAL/Triangulation_2.h:980:1: note: candidate: const Point& CGAL::Triangulation_2<Gt, Tds>:oint(CGAL::Triangulation_2<Gt, Tds>::Face_handle, int) const [with Gt = CGAL::Epick; Tds = CGAL::Triangulation_data_structure_2<CGAL::Triangulation_hierarchy_vertex_base_2<CGAL::indexedVertex<CGAL::Epick> >, CGAL::indexedFace<CGAL::Epick> >; CGAL::Triangulation_2<Gt, Tds>::Point = CGAL::Point_2<CGAL::Epick>; CGAL::Triangulation_2<Gt, Tds>::Face_handle = CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::indexedFace<CGAL::Epick, CGAL::Triangulation_face_base_2<CGAL::Epick, CGAL::Triangulation_ds_face_base_2<CGAL::Triangulation_data_structure_2<CGAL::Triangulation_hierarchy_vertex_base_2<CGAL::indexedVertex<CGAL::Epick> >, CGAL::indexedFace<CGAL::Epick> > > > >, CGAL:efault, CGAL:efault, CGAL:efault>, false>]
Triangulation_2<Gt, Tds>::
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/CGAL/Triangulation_2.h:980:1: note: candidate expects 2 arguments, 1 provided
/usr/include/CGAL/Triangulation_2.h:991:1: note: candidate: const Point& CGAL::Triangulation_2<Gt, Tds>:oint(CGAL::Triangulation_2<Gt, Tds>::Vertex_handle) const [with Gt = CGAL::Epick; Tds = CGAL::Triangulation_data_structure_2<CGAL::Triangulation_hierarchy_vertex_base_2<CGAL::indexedVertex<CGAL::Epick> >, CGAL::indexedFace<CGAL::Epick> >; CGAL::Triangulation_2<Gt, Tds>::Point = CGAL::Point_2<CGAL::Epick>; CGAL::Triangulation_2<Gt, Tds>::Vertex_handle = CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_hierarchy_vertex_base_2<CGAL::indexedVertex<CGAL::Epick, CGAL::Triangulation_vertex_base_2<CGAL::Epick, CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<CGAL::Triangulation_hierarchy_vertex_base_2<CGAL::indexedVertex<CGAL::Epick> >, CGAL::indexedFace<CGAL::Epick> > > > > >, CGAL:efault, CGAL:efault, CGAL:efault>, false>]
Triangulation_2<Gt, Tds>::
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/CGAL/Triangulation_2.h:991:1: note: no known conversion for argument 1 from \u2018Foam::ITstream\u2019 to \u2018CGAL::Triangulation_2<CGAL::Epick, CGAL::Triangulation_data_structure_2<CGAL::Triangulation_hierarchy_vertex_base_2<CGAL::indexedVertex<CGAL::Epick> >, CGAL::indexedFace<CGAL::Epick> > >::Vertex_handle {aka CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_hierarchy_vertex_base_2<CGAL::indexedVertex<CGAL::Epick, CGAL::Triangulation_vertex_base_2<CGAL::Epick, CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<CGAL::Triangulation_hierarchy_vertex_base_2<CGAL::indexedVertex<CGAL::Epick> >, CGAL::indexedFace<CGAL::Epick> > > > > >, CGAL:efault, CGAL:efault, CGAL:efault>, false>}\u2019
CV2D.C: In member function \u2018void Foam::CV2D::insertPoints(const point2DField&, Foam::scalar)\u2019:
CV2D.C:194:31: error: \u2018toPoint3D\u2019 was not declared in this scope
if (qSurf_.wellInside(toPoint3D(p), nearness))
^~~~~~~~~
CV2D.C:194:31: note: suggested alternative: \u2018toPoint2D\u2019
if (qSurf_.wellInside(toPoint3D(p), nearness))
^~~~~~~~~
toPoint2D
CV2D.C: In member function \u2018void Foam::CV2D::insertGrid()\u2019:
CV2D.C:263:19: error: expected \u2018;\u2019 before \u2018p\u2019
point p(x0 + i*deltax, y0 + j*deltay, 0);
^
CV2D.C:263:13: error: statement cannot resolve address of overloaded function
point p(x0 + i*deltax, y0 + j*deltay, 0);
^~~~~
CV2D.C:267:17: error: \u2018p\u2019 was not declared in this scope
p.x() += pert*(rndGen.scalar01() - 0.5);
^
CV2D.C:271:35: error: \u2018p\u2019 was not declared in this scope
if (qSurf_.wellInside(p, 0.5*meshControls().minCellSize2()))
^
CV2D.C: In member function \u2018void Foam::CV2D::newPoints()\u2019:
CV2D.C:465:17: error: \u2018toPoint3D\u2019 was not declared in this scope
toPoint3D(vert),
^~~~~~~~~
CV2D.C:465:17: note: suggested alternative: \u2018toPoint2D\u2019
toPoint3D(vert),
^~~~~~~~~
toPoint2D
CV2D.C:480:61: error: no matching function for call to \u2018Foam::CV2D::toPoint2D(Foam::Vector<double>&)\u2019
alignments[vit->index()] = toPoint2D(norm[0]);
^
In file included from CV2D.H:469:0,
from CV2D.C:26:
CV2DI.H:124:29: note: candidate: const point2D& Foam::CV2D::toPoint2D(const int&) const
inline const Foam::point2D& Foam::CV2D::toPoint2D(const point& p) const
^~~~
CV2DI.H:124:29: note: no known conversion for argument 1 from \u2018Foam::Vector<double>\u2019 to \u2018const int&\u2019
CV2DI.H:130:33: note: candidate: const point2DField Foam::CV2D::toPoint2D(const pointField&) const
inline const Foam::point2DField Foam::CV2D::toPoint2D(const pointField& p) const
^~~~
CV2DI.H:130:33: note: no known conversion for argument 1 from \u2018Foam::Vector<double>\u2019 to \u2018const pointField& {aka const Foam::Field<Foam::Vector<double> >&}\u2019
CV2DI.H:149:37: note: candidate: const point2D& Foam::CV2D::toPoint2D(const Point&) const
inline Foam::CV2D::point2DFromPoint Foam::CV2D::toPoint2D(const Point& P) const
^~~~
CV2DI.H:149:37: note: no known conversion for argument 1 from \u2018Foam::Vector<double>\u2019 to \u2018const Point& {aka const CGAL::Point_2<CGAL::Epick>&}\u2019
make[2]: *** [/home/u049944/OpenFOAM/OpenFOAM-4.1/wmake/rules/General/transform:8: /home/u049944/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.o] Error 1
make[2]: Leaving directory '/home/u049944/OpenFOAM/OpenFOAM-4.1/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh'
make[1]: *** [/home/u049944/OpenFOAM/OpenFOAM-4.1/wmake/makefiles/apps:39: generation] Error 2
make[1]: Leaving directory '/home/u049944/OpenFOAM/OpenFOAM-4.1/applications/utilities/mesh'
make: *** [/home/u049944/OpenFOAM/OpenFOAM-4.1/wmake/makefiles/apps:39: mesh] Error 2

Last edited by wyldckat; June 16, 2019 at 15:06. Reason: Added [CODE][/CODE] markers
praveenSrinivas is offline   Reply With Quote

Old   June 16, 2019, 15:13
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: "foamy*Mesh" applications are rarely used, so the quickest solution is to skip it. You can skip over it by running Allwmake with the option "-k", e.g.:
Code:
./Allwmake -k
If you still want to build it, a few questions:
  1. Which GCC version are you using? You can check with these commands:
    Code:
    gcc --version
    g++ --version
  2. Which CGAL and Boost versions are installed in your system? I believe you can check with these commands:
    Code:
    zypper info cgal
    zypper info boost
    although I'm not certain of the exact package names...
__________________
wyldckat is offline   Reply With Quote

Old   September 30, 2019, 18:40
Default
  #3
New Member
 
João Antônio Cardoso
Join Date: Jun 2014
Posts: 1
Rep Power: 0
joaoantoniocardoso is on a distinguished road
Hi, same error here compiling OpenFOAM-4.1 (release from github), using:


Code:
 cgal 4.14-1
parmetis 4.0.3.p4-1
scotch 6.0.6-1
bzip2 1.0.8-2
boost 1.69.0-2
flex 2.6.4-2
paraview 5.6.0-5
 gcc 9.1.0-2
Months ago I was able to compile with gcc 8.1 making some modifications (described here: https://gist.github.com/joaoantonioc...c5921a1d4a14b7) but I have no clue about the version of the other dependencies..

As sugested, I tried to compile using '-k' (without cleaning the build) but it produce the same error. Did I have to start compilation from beginning again?


---edit:


Well, I was able to solve this compilation issue using the last released piece of code for CV2D.H (from OpenFoam-7). I tried to understand what changed using a diff but I didn't notice anything big.


In a simple command:

Code:
wget https://raw.githubusercontent.com/OpenFOAM/OpenFOAM-7/109ba3c8d53a8fa1e97854b168a16970aaeea951/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.H -P $HOME/OpenFOAM/OpenFOAM-4.1/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh
souza.emer likes this.

Last edited by joaoantoniocardoso; September 30, 2019 at 19:14. Reason: added my solution
joaoantoniocardoso is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[foam-extend.org] foam-extend-3.2 compilation on windows kirmaks OpenFOAM Installation 7 December 3, 2019 20:20
[OpenFOAM.org] Compilation Error with OpenFOAM-5.x using Intel Compilers aow OpenFOAM Installation 4 April 25, 2019 16:17
Compilation error for OpenFOAM-ext on Ubantu 10.04 32 bit Sargam05 OpenFOAM Installation 13 March 22, 2014 05:21
Compilation Error (V 1.7.1; Icc 12.1.0, OpenMPI 1.4.3) floydfan OpenFOAM Installation 7 December 20, 2011 05:56
Compilation Error.... Arnab Siemens 4 September 12, 2004 15:54


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