3

My ultimate goal is to get python package graph_tool working on my system and also on ipynb if possible. I have already brew install graph-tool, as indicated here, but that's still insufficient.

So I follow Anaconda instructions here, and I make decent progress, until the CGAL Library could not be found.

Note: to comply with the Anaconda instructions, I installed anaconda3 and created a new conda environment (named py36env) to conda install all the required packages (packages that must also match with python 3.6)

The entire ./configure output. Below is a snippet:

(py36env) $ ./configure --prefix=/Users/tamtran/anaconda3/envs/py36env/ --with-python-module-path=/Users/tamtran/anaconda3/envs/py36env/lib/python3.6/site-packages --with-cgal=/Users/tamtran/anaconda3/envs/py36env/
.
.
checking whether CGAL is available in /Users/tamtran/anaconda3/envs/py36env/... no
configure: error: CGAL library not found.

The entire config.log. Below is a snippet:

configure:21200: checking whether CGAL is available in /Users/tamtran/anaconda3/envs/py36env/
configure:21236: g++ -std=gnu++14 -o conftest -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -Wall -Wextra -ftemplate-backtrace-limit=0  -DNDEBUG  -I/Users/tamtran/anaconda3/envs/py36env//include -pthread -I/usr/local/include  -L/Users/tamtran/anaconda3/envs/py36env//lib -lCGAL -lCGAL_Core -lgmp -lboost_thread-mt -lpthread conftest.cpp -lgmp -lgmp  >&5
|       #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|       #include <CGAL/convex_hull_2.h>
|       typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|       CGAL::convex_hull_2(points.begin(),points.end(),std::back_inserter(result));
configure:21278: error: CGAL library not found.
CGAL_CPPFLAGS='-I/Users/tamtran/anaconda3/envs/py36env//include'
CGAL_FLAGS=''
CGAL_LDFLAGS='-L/Users/tamtran/anaconda3/envs/py36env//lib -lCGAL -lCGAL_Core -lgmp -lboost_thread-mt -lpthread'

Note: Even without the --with-cgal tag, the same issue occurs. It's also important (I think) that the CGAL search directory is within py36env because CGAL matching with python3.6 is in there, whereas CGAL-python3.5 is in conda root environment. The only differences of ./configure output without the CGAL directory are:

checking whether CGAL is available in /usr... no
checking whether CGAL is available in /usr/local... no
checking whether CGAL is available in /opt... no
checking whether CGAL is available in /opt/local... no
tamtam
  • 641
  • 9
  • 24
  • 1
    Why is using homebrew insufficient? Also, please post the entire contents of the `config.log` file and the entire output of the `configure` script, if you want to give us any chance of understanding why the build is failing. – Tiago Peixoto Oct 26 '17 at 10:35
  • Hi @TiagoPeixoto, when `python3` and `from graph_tool.all import *`, error occurs `Symbol not found: _PyClass_Type`. I will also be attempting to pick that up again. But in the meantime, the Anaconda installation has been boggling me. I've updated the post with links to the entire log and output script! – tamtam Oct 26 '17 at 13:52
  • Did you get this working? I'm curious which `conda install cgal` worked – Nathan majicvr.com Dec 28 '18 at 03:42

1 Answers1

0

on mac os x You must use -lcgal (is using brew)

for example on fedora linux -lCGAL

Marko Lustro
  • 173
  • 1
  • 10
  • Can you give an example of the -lcgal flag? Where do we use it. I tried in both brew install and in the ./configure – Aditya Garg Apr 25 '20 at 01:43