Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile on Ubuntu 16.04 #2

Closed
lawsonfulton opened this issue Jun 1, 2018 · 2 comments
Closed

Doesn't compile on Ubuntu 16.04 #2

lawsonfulton opened this issue Jun 1, 2018 · 2 comments

Comments

@lawsonfulton
Copy link
Contributor

lawsonfulton commented Jun 1, 2018

Installed CGAL with

$  sudo apt-get install libcgal-dev libcgal-qt5-dev

Cmake completes with no issue, but fails when building tetwild.cpp with many errors of the form

[ 99%] Building CXX object CMakeFiles/TetWild.dir/tetwild.cpp.o
In file included from /usr/include/CGAL/Constrained_triangulation_2.h:28:0,
                 from /usr/include/CGAL/Constrained_Delaunay_triangulation_2.h:25,
                 from /home/lawson/Workspace/TetWild/SimpleTetrahedralization.cpp:15:
/usr/include/CGAL/Triangulation_2.h: In instantiation of ‘class CGAL::Triangulation_2<CGAL::Epeck, CGAL::Default>’:
/usr/include/CGAL/Constrained_triangulation_2.h:47:7:   required from ‘class CGAL::Constrained_triangulation_2<CGAL::Epeck, CGAL::Default, CGAL::Exact_predicates_tag>’
/usr/include/CGAL/Constrained_Delaunay_triangulation_2.h:63:7:   required from ‘class CGAL::Constrained_Delaunay_triangulation_2<CGAL::Epeck, CGAL::Default, CGAL::Exact_predicates_tag>’
/home/lawson/Workspace/TetWild/SimpleTetrahedralization.cpp:19:12:   required from here
/usr/include/CGAL/Triangulation_2.h:100:48: error: no type named ‘size_type’ in ‘struct CGAL::Default’
   typedef typename Tds::size_type              size_type;
                                                ^
/usr/include/CGAL/Triangulation_2.h:101:48: error: no type named ‘difference_type’ in ‘struct CGAL::Default’
   typedef typename Tds::difference_type        difference_type;
                                                ^
/usr/include/CGAL/Triangulation_2.h:103:48: error: no type named ‘Vertex’ in ‘struct CGAL::Default’
   typedef typename Tds::Vertex                 Vertex;
...
...

Only hint I can find is this stackoverflow post which suggests upgrading OS version.

@Yixin-Hu
Copy link
Owner

Yixin-Hu commented Jun 1, 2018

Did you try having CGAL example code compiled on your machine?

@GregVernon
Copy link

GregVernon commented Jun 1, 2018

I noticed this this morning and have a fix. The problem is that, as of right now, Ubuntu 16.04 considers CGAL v 4.7-4 to be the current version. Here's how to fix:

  1. Download CGAL-4.12 source code: https://github.com/CGAL/cgal/releases
  2. Extract the source code (if necessary) from the zip/tar/xz file
  3. Place the extracted folder ("cgal-releases-CGAL-4.12") in the TetWild/extern/ directory
  4. Rename the folder to CGAL
  5. Set CMAKE_PREFIX_PATH environment variable to the path of the CGAL folder:
    export CMAKE_PREFIX_PATH=/path/to/TetWild/extern/:/path/to/TetWild/extern/CGAL/
  6. Rerun cmake ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants