- changed title to Compilation error on macosx
Compilation error on macosx
Issue #42
resolved
We have the following error when compiling on macosx 10.11.4
using clang
compiler and cmake 3.5.1
. Any suggestion?
[ 58%] Building CXX object CMakeFiles/mshr.dir/src/DolfinMeshUtils.cpp.o
In file included from /opt/HPC/src/fenics-dev-petsc-stable/mshr/src/DolfinMeshUtils.cpp:20:
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:81:14: error: no type named 'vector' in namespace 'std'
const std::vector<std::array<double, 3>>& get_points() const
~~~~~^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:81:20: error: expected member name or ';' after declaration specifiers
const std::vector<std::array<double, 3>>& get_points() const
~~~~~~~~~~~~~~~~~^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:137:53: error: implicit instantiation of undefined template 'std::__1::array<std::__1::multimap<double, unsigned long, std::__1::less<double>,
std::__1::allocator<std::__1::pair<const double, unsigned long> > >, 3>'
std::array<std::multimap<double, std::size_t>, 3> maps;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tuple:116:65: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TYPE_VIS_ONLY array;
^
In file included from /opt/HPC/src/fenics-dev-petsc-stable/mshr/src/DolfinMeshUtils.cpp:20:
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:138:8: error: no type named 'vector' in namespace 'std'
std::vector<std::array<double, 3>> points;
~~~~~^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:138:14: error: expected member name or ';' after declaration specifiers
std::vector<std::array<double, 3>> points;
~~~~~~~~~~~^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:33:7: error: member initializer 'tolerance' does not name a non-static data member or base class
: tolerance(tolerance)
^~~~~~~~~~~~~~~~~~~~
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:41:18: error: use of undeclared identifier 'points'
if (index == points.size())
^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:44:7: error: use of undeclared identifier 'points'; did you mean 'printf'?
points.push_back(std::array<double, 3>{p[0], p[1], p[2]});
^~~~~~
printf
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdio.h:259:6: note: 'printf' declared here
int printf(const char * __restrict, ...) __printflike(1, 2);
^
In file included from /opt/HPC/src/fenics-dev-petsc-stable/mshr/src/DolfinMeshUtils.cpp:20:
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:44:13: error: member reference base type 'int (const char *, ...)' is not a structure or union
points.push_back(std::array<double, 3>{p[0], p[1], p[2]});
~~~~~~^~~~~~~~~~
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:57:31: error: use of undeclared identifier 'points'
const std::size_t index = points.size();
^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:59:5: error: use of undeclared identifier 'points'; did you mean 'printf'?
points.push_back(std::array<double, 3>{p[0], p[1], p[2]});
^~~~~~
printf
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdio.h:259:6: note: 'printf' declared here
int printf(const char * __restrict, ...) __printflike(1, 2);
^
In file included from /opt/HPC/src/fenics-dev-petsc-stable/mshr/src/DolfinMeshUtils.cpp:20:
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:59:11: error: member reference base type 'int (const char *, ...)' is not a structure or union
points.push_back(std::array<double, 3>{p[0], p[1], p[2]});
~~~~~~^~~~~~~~~~
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:72:20: error: use of undeclared identifier 'points'
return index < points.size();
^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:78:12: error: use of undeclared identifier 'points'
return points[i];
^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/DolfinMeshUtils.cpp:185:54: error: no member named 'get_index' in 'FuzzyPointMap'
const std::size_t map_index = vertex_map_inner.get_index(v->point());
~~~~~~~~~~~~~~~~ ^
[ 61%] Building CXX object CMakeFiles/mshr.dir/src/GlobalInitializer.cpp.o
In file included from /opt/HPC/src/fenics-dev-petsc-stable/mshr/src/DolfinMeshUtils.cpp:20:
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:40:31: error: use of undeclared identifier 'get_index'
const std::size_t index = get_index(p);
^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/DolfinMeshUtils.cpp:147:52: note: in instantiation of function template specialization 'FuzzyPointMap::insert_point<dolfin::Point>' requested here
const std::size_t map_index = vertex_map_inner.insert_point(v->point());
^
In file included from /opt/HPC/src/fenics-dev-petsc-stable/mshr/src/DolfinMeshUtils.cpp:20:
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/FuzzyPointLocator.h:71:31: error: use of undeclared identifier 'get_index'
const std::size_t index = get_index(p);
^
/opt/HPC/src/fenics-dev-petsc-stable/mshr/src/DolfinMeshUtils.cpp:159:26: note: in instantiation of function template specialization 'FuzzyPointMap::contains<dolfin::Point>' requested here
if (vertex_map_inner.contains(v->point()))
^
17 errors generated.
make[2]: *** [CMakeFiles/mshr.dir/src/DolfinMeshUtils.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Comments (4)
-
reporter -
My first thought is that is a missing "#include <vector>". I'll see if I can reproduce here.
-
This is fixed now, thanks.
-
- changed status to resolved
- Log in to comment