CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.99k stars 1.39k forks source link

redefinition of ‘std::size_t OpenMesh::hash_value(const OpenMesh::BaseHandle&)’ using apt-get to install cgal #7534

Closed jtressle closed 1 year ago

jtressle commented 1 year ago

I'm on a ubuntu 20.04 system, and I'm trying to run the mesh simplification with OpenMesh.

https://doc.cgal.org/latest/Surface_mesh_simplification/Surface_mesh_simplification_2edge_collapse_surface_mesh_8cpp-example.html

I'm getting this error:

 redefinition of ‘std::size_t OpenMesh::hash_value(const OpenMesh::BaseHandle&)’
   65 | inline std::size_t hash_value(const BaseHandle& h) { return h.idx(); }

which is related to this closed issue: https://github.com/CGAL/cgal/pull/1377

I have OpenMesh version 10.0 installed, and I installed cgal using apt-get. I believe the issue is that CGAL requires OpenMesh to be installed before we can run this example. I'll try compiling CGAL from source.

sloriot commented 1 year ago

What is the CGAL version installed by apt?

lrineau commented 1 year ago

What is the CGAL version installed by apt?

Ubuntu 20.04 is "Focal". And https://packages.ubuntu.com/source/focal/cgal says cgal (5.0.2-3).

jtressle commented 1 year ago

Hi @lrineau,

Yes, that's correct. I have 5.0.2 on that machine. Sorry to not have added it to the original post.

I was able to get around it by building from source.

lrineau commented 1 year ago

Good to know you found a solution to your original problem. Thanks for letting us know. I close this issue.