configure: error: CGAL library not found

断了今生、忘了曾经 提交于 2019-12-12 13:32:25

问题


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

回答1:


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

for example on fedora linux -lCGAL



来源:https://stackoverflow.com/questions/46922619/configure-error-cgal-library-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!