Issue installing graph-tool due to cgal dependency

I've been struggling to get graph-tool installed on a standard 18.04 Ubuntu
system for the past few hours (~5) due to the CGAL dependency. I first
tried installing graph-tool from the packages, which ran fine but the
library didn't actually seem to get installed (all the python import
statements couldn't find it).

I then tried installing from source and it makes it all the way to the end
with the error:

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

However, libcgal-dev is definitely installed:

dpkg -L libcgal-dev | head -n10
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/cmake
/usr/lib/x86_64-linux-gnu/cmake/CGAL
/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_Macros.cmake
/usr/lib/x86_64-linux-gnu/cmake/CGAL/FindTBB.cmake
/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_Common.cmake
/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports-release.cmake

No amount of futzing about with the LDFLAGS/CFLAGS seems to get it to work.

Has anyone run into this before? This is probably the longest time I've
spent trying to install a package in years :frowning:

I've been struggling to get graph-tool installed on a standard 18.04 Ubuntu
system for the past few hours (~5) due to the CGAL dependency. I first
tried installing graph-tool from the packages, which ran fine but the
library didn't actually seem to get installed (all the python import
statements couldn't find it).

It most certainly got installed. If you can't import it, the most likely
explanation is that you are not using the correct python interpreter.

For example, sometimes people install python using anaconda, and expect it
to find packages (such as graph-tool) which have been installed in the
system, which will not happen. Sometimes people install a package for python
2, and cannot find it with version 3, etc.

I then tried installing from source and it makes it all the way to the end
with the error:

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

However, libcgal-dev is definitely installed:

dpkg -L libcgal-dev | head -n10
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/cmake
/usr/lib/x86_64-linux-gnu/cmake/CGAL
/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_Macros.cmake
/usr/lib/x86_64-linux-gnu/cmake/CGAL/FindTBB.cmake
/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_Common.cmake
/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports-release.cmake

No amount of futzing about with the LDFLAGS/CFLAGS seems to get it to work.

The reason for the failure is usually to be seen in configure.log.

Without this information, and how you evoked the configure script in the
first place, with full output, is not possible to say anything.

Has anyone run into this before? This is probably the longest time I've
spent trying to install a package in years :frowning:

Which is ironic, given that your first try using the binary package probably
worked just fine, you just didn't notice it.

Best,
Tiago