Boost.Python.ArgumentError: Python argument types did not match C++ signature

I have been trying to compile the recent git version of graph-tool against my
anaconda python. I do this using

sudo ./configure CXX="g++-5" CXXFLAGS="-std=gnu++14
-Wno-unused-local-typedefs" PYTHON="/home/pmj27/anaconda2/bin/python2.7"
CAIROMM_LIBS="-L/home/pmj27/anaconda2/include/cairomm-1.0/cairomm"
--enable-openmp

(if I skip the sudo it won't pick up boost for reasons not quite known to
me). I then run "sudo make -j20" followed by "make install". When opening
python and importing the module I however get the error message

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/home/pmj27/anaconda2/lib/python2.7/site-packages/graph_tool/__init__.py",
line 3323, in <module>
    openmp_set_schedule("static", 0)
  File
"/home/pmj27/anaconda2/lib/python2.7/site-packages/graph_tool/__init__.py",
line 3320, in openmp_set_schedule
    return libcore.openmp_set_schedule(schedule, chunk)
Boost.Python.ArgumentError: Python argument types in
    graph_tool.libgraph_tool_core.openmp_set_schedule(str, int)
did not match C++ signature:
    openmp_set_schedule(std::__cxx11::basic_string<char,
std::char_traits&lt;char>, std::allocator<char> >, int)

My first thought was that graph-tool must be linking against an incorrect
version of boost. So, following the advice from other posts, I ran ldd
/home/pmj27/anaconda2/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so
. This returns:

        linux-vdso.so.1 => (0x00007fffc93ce000)
        libpython2.7.so.1.0 => /home/pmj27/anaconda2/lib/libpython2.7.so.1.0
(0x00007fbcd05ec000)
        libboost_iostreams.so.1.63.0 =>
/home/pmj27/anaconda2/lib/libboost_iostreams.so.1.63.0 (0x00007fbcd03c4000)
        libboost_python.so.1.63.0 =>
/home/pmj27/anaconda2/lib/libboost_python.so.1.63.0 (0x00007fbcd0175000)
        libboost_regex.so.1.63.0 =>
/home/pmj27/anaconda2/lib/libboost_regex.so.1.63.0 (0x00007fbccfe5a000)
        libboost_coroutine.so.1.63.0 =>
/home/pmj27/anaconda2/lib/libboost_coroutine.so.1.63.0 (0x00007fbccfc50000)
        libexpat.so.1 => /home/pmj27/anaconda2/lib/libexpat.so.1
(0x00007fbccfa27000)
        libstdc++.so.6 => /home/pmj27/anaconda2/lib/libstdc++.so.6
(0x00007fbccf66b000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbccf33c000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbccef72000)
        libgcc_s.so.1 => /home/pmj27/anaconda2/lib/libgcc_s.so.1
(0x00007fbcced5b000)
        libgomp.so.1 => /home/pmj27/anaconda2/lib/libgomp.so.1
(0x00007fbcceb38000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fbcce91a000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbcce716000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1
(0x00007fbcce513000)
        libz.so.1 => /home/pmj27/anaconda2/lib/./libz.so.1
(0x00007fbcce2fc000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbcce0f4000)
        libicudata.so.56 => /home/pmj27/anaconda2/lib/./libicudata.so.56
(0x00007fbccc711000)
        libicui18n.so.56 => /home/pmj27/anaconda2/lib/./libicui18n.so.56
(0x00007fbccc214000)
        libicuuc.so.56 => /home/pmj27/anaconda2/lib/./libicuuc.so.56
(0x00007fbccbe2f000)
        libboost_context.so.1.63.0 =>
/home/pmj27/anaconda2/lib/./libboost_context.so.1.63.0 (0x00007fbccbc26000)
        libboost_thread.so.1.63.0 =>
/home/pmj27/anaconda2/lib/./libboost_thread.so.1.63.0 (0x00007fbccba04000)
        libboost_chrono.so.1.63.0 =>
/home/pmj27/anaconda2/lib/./libboost_chrono.so.1.63.0 (0x00007fbccb7fd000)
        libboost_system.so.1.63.0 =>
/home/pmj27/anaconda2/lib/./libboost_system.so.1.63.0 (0x00007fbccb5fa000)
        /lib64/ld-linux-x86-64.so.2 (0x000055cf9c8bc000)

As far as I can tell all boost libraries are based on the anaconda boost
libraries. Does anybody have any ideas what might be going wrong?

Best,

Philipp

Whenever this happens it means there is mismatch between the Python version
that is being used, Boost Python, and graph-tool. All these must be linked
together with the same version during compilation. Please read the installation
instructions carefully:

   https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#manual-compilation

The odd thing though is that graph-tool is compiled against
/home/pmj27/anaconda2/bin/python2.7. The anaconda boost is installed through
conda so should also be linked against that. I can try and tell configure
explicitely to take its boost libraries from /home/pmj27/anaconda2/lib/. As
far as I can tell all the library files reside in that folder. What would I
need to specify for that? (My proficiency isn't great enough to piece it
together from the manual unfortuantely.) As far as I can tell by the output
reproduced by ldd
/home/pmj27/anaconda2/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so
though the boost libraries used by graph-tool are the anaconda boost
libraries as they reside in /home/pmj27/anaconda2/lib/ so it isn't clear to
me if that would change much. Or am I missing a vital piece here?

You are describing a consistent picture, but the error proves otherwise.

I think what you might be confusing is the compilation-time linking
(which gets setup when you do ./configure and make) and the run-time
linking (this is what you see with ldd). If ldd shows the right library,
it does not mean that the linking was in fact done correctly. I tried to
explain this in the documentation, but it seems I failed...

In short, you have to be sure that the paths given to configure are
correct, which in your case I think should be:

   ./configure --prefix=$HOME/.local PYTHON=/home/pmj27/anaconda2/bin/python2.7 CPPFLAGS="-I/home/pmj27/anaconda2/include" LDFLAGS="-L/home/pmj27/anaconda2/lib"

As is explained in the documentation. But this assumes that the rest of
your boost-python + python installation is consistent, which I have no
idea.

Best,
Tiago

Thank you for that, that was a lot more helpful than my past hour of
googling...

Based on what you suggested I ran

./configure --prefix=$HOME/.local CXX="g++-5" CXXFLAGS="-std=gnu++14
-Wno-unused-local-typedefs" PYTHON=/home/pmj27/anaconda2/bin/python2.7
CPPFLAGS="-I/home/pmj27/anaconda2/include"
LDFLAGS="-L/home/pmj27/anaconda2/lib" --enable-openmp

This means it now correctly picks up boost but now returns me two cryptic
error messages:

checking python2.7 module: numpy... yes
./configure: line 20689: -I/home/pmj27/anaconda2/include: No such file or
directory
checking for
/home/pmj27/anaconda2/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h...
no
configure: error: Numpy extension header not found

/home/pmj27/anaconda2/include and
/home/pmj27/anaconda2/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h
both exist though. Based on config.log
<http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4027064/config.log&gt;
the issue seems to be with Python.h:

configure:20691: g++-5 -c -fopenmp -O3 -fvisibility=default
-fvisibility-inlines-hidden -Wno-deprecated -ftemplate-depth-250 -DNDEBUG
-Wall -Wextra -ftemplate-backtrace-limit=0 -std=gnu++14
-Wno-unused-local-typedefs -I/home/pmj27/anaconda2/include conftest.cpp >&5
conftest.cpp:43:20: fatal error: Python.h: No such file or directory
compilation terminated.

I presume this means it isn't picking up python correctly anymore?

Best,

Philipp

You manage to find the weirdest errors... Could you please try again with
the new git version?

I am getting that impression too. Unfortunately the newest git verison
produces the same error as far as I can tell. config.log
<http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4027066/config.log&gt;
is attached again.

Can you please try once more?

That resolved the numpy issue. Now I get another error message though:

configure: creating ./config.status
config.status: creating Makefile
gawk: symbol lookup error: /home/pmj27/anaconda2/lib/libreadline.so.6:
undefined symbol: PC
config.status: error: could not create Makefile

I have attached the config.log
<http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4027068/config.log&gt;
again. Doing some googling this is an issue others have observed too with
anaconda (https://github.com/ContinuumIO/anaconda-issues/issues/152 ). Is
this something addressable within graph-tool or by providing configure flags
or is this something that needs to be solved within anaconda?

Best,

Philipp

This is not a graph-tool problem at all. You should try some of the
workarounds described in the anaconda issue.

Applying the work around and using the system readline means ./configure now
seems to run without errors.

When running make I get an error however revolving around CGAL. Do you know
what might be causing them?

In file included from
/usr/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h:30:0,
                 from graph_triangulation.cc:55:
/home/pmj27/anaconda2/include/CGAL/Periodic_3_triangulation_traits_3.h:33:9:
error: redefinition of ‘class CGAL::Traits_with_offsets_adaptor<K,
Functor_>’
   class Traits_with_offsets_adaptor {
         ^
In file included from
/usr/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h:27:0,
                 from graph_triangulation.cc:55:
/usr/include/CGAL/Traits_with_offsets_adaptor.h:31:9: error: previous
definition of ‘class CGAL::Traits_with_offsets_adaptor<K, Functor_>’
   class Traits_with_offsets_adaptor {
         ^
In file included from
/usr/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h:30:0,
                 from graph_triangulation.cc:55:
/home/pmj27/anaconda2/include/CGAL/Periodic_3_triangulation_traits_3.h:96:7:
error: redefinition of ‘class CGAL::Periodic_3_construct_point_3<K,
Construct_point_3_base>’
class Periodic_3_construct_point_3 : public Construct_point_3_base
       ^
In file included from
/usr/include/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h:28:0,
                 from graph_triangulation.cc:55:
/usr/include/CGAL/Periodic_3_construct_point_3.h:31:7: error: previous
definition of ‘class CGAL::Periodic_3_construct_point_3<K,
Construct_point_3_base>’
class Periodic_3_construct_point_3 : public Construct_point_3_base
       ^
In file included from
/home/pmj27/anaconda2/include/boost/type_traits/ice.hpp:15:0,
                 from
/home/pmj27/anaconda2/include/boost/python/detail/def_helper.hpp:9,
                 from
/home/pmj27/anaconda2/include/boost/python/class.hpp:29,
                 from /home/pmj27/anaconda2/include/boost/python.hpp:18,
                 from ../../../src/graph/numpy_bind.hh:22,
                 from graph_triangulation.cc:72:
/home/pmj27/anaconda2/include/boost/type_traits/detail/ice_or.hpp:17:71:
note: #pragma message: NOTE: Use of this header (ice_or.hpp) is deprecated
# pragma message("NOTE: Use of this header (ice_or.hpp) is deprecated")
                                                                       ^
In file included from
/home/pmj27/anaconda2/include/boost/type_traits/ice.hpp:16:0,
                 from
/home/pmj27/anaconda2/include/boost/python/detail/def_helper.hpp:9,
                 from
/home/pmj27/anaconda2/include/boost/python/class.hpp:29,
                 from /home/pmj27/anaconda2/include/boost/python.hpp:18,
                 from ../../../src/graph/numpy_bind.hh:22,
                 from graph_triangulation.cc:72:
/home/pmj27/anaconda2/include/boost/type_traits/detail/ice_and.hpp:18:72:
note: #pragma message: NOTE: Use of this header (ice_and.hpp) is deprecated
# pragma message("NOTE: Use of this header (ice_and.hpp) is deprecated")
                                                                        ^
In file included from
/home/pmj27/anaconda2/include/boost/type_traits/ice.hpp:17:0,
                 from
/home/pmj27/anaconda2/include/boost/python/detail/def_helper.hpp:9,
                 from
/home/pmj27/anaconda2/include/boost/python/class.hpp:29,
                 from /home/pmj27/anaconda2/include/boost/python.hpp:18,
                 from ../../../src/graph/numpy_bind.hh:22,
                 from graph_triangulation.cc:72:
/home/pmj27/anaconda2/include/boost/type_traits/detail/ice_not.hpp:17:72:
note: #pragma message: NOTE: Use of this header (ice_not.hpp) is deprecated
# pragma message("NOTE: Use of this header (ice_not.hpp) is deprecated")
                                                                        ^
In file included from
/home/pmj27/anaconda2/include/boost/type_traits/ice.hpp:18:0,
                 from
/home/pmj27/anaconda2/include/boost/python/detail/def_helper.hpp:9,
                 from
/home/pmj27/anaconda2/include/boost/python/class.hpp:29,
                 from /home/pmj27/anaconda2/include/boost/python.hpp:18,
                 from ../../../src/graph/numpy_bind.hh:22,
                 from graph_triangulation.cc:72:
/home/pmj27/anaconda2/include/boost/type_traits/detail/ice_eq.hpp:17:71:
note: #pragma message: NOTE: Use of this header (ice_eq.hpp) is deprecated
# pragma message("NOTE: Use of this header (ice_eq.hpp) is deprecated")
                                                                       ^
In file included from
/home/pmj27/anaconda2/include/CGAL/Periodic_3_Delaunay_triangulation_3.h:29:0,
                 from graph_triangulation.cc:56:
/home/pmj27/anaconda2/include/CGAL/Periodic_3_triangulation_3.h: In
instantiation of ‘CGAL::Periodic_3_triangulation_3<GT, TDS>::Vertex_handle
CGAL::Periodic_3_triangulation_3<GT, TDS>::periodic_insert(const Point&,
const Offset&, CGAL::Periodic_3_triangulation_3<GT, TDS>::Locate_type,
CGAL::Periodic_3_triangulation_3<GT, TDS>::Cell_handle, const
Conflict_tester&, Point_hider&, CGAL::Periodic_3_triangulation_3<GT,

::Vertex_handle) [with Conflict_tester =

CGAL::Periodic_3_Delaunay_triangulation_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>

::Conflict_tester; Point_hider =

CGAL::Periodic_3_Delaunay_triangulation_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>

::Point_hider; GT =

CGAL::Periodic_3_Delaunay_triangulation_traits_3<CGAL::Epick>; TDS =
CGAL::Triangulation_data_structure_3<CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >,
CGAL::Sequential_tag>; CGAL::Periodic_3_triangulation_3<GT,

::Vertex_handle =

CGAL::internal::CC_iterator<CGAL::Compact_container&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<CGAL::Triangulation_data_structure_3&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >, CGAL::Sequential_tag>

>, CGAL::Default, CGAL::Default, CGAL::Default>, false>;

CGAL::Periodic_3_triangulation_3<GT, TDS>::Point =
CGAL::Point_3<CGAL::Epick>; CGAL::Periodic_3_triangulation_3<GT,

::Offset = CGAL::Periodic_3_offset_3;

CGAL::Periodic_3_triangulation_3<GT, TDS>::Cell_handle =
CGAL::internal::CC_iterator<CGAL::Compact_container&lt;CGAL::Triangulation_cell_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >, CGAL::Sequential_tag>

>, CGAL::Default, CGAL::Default, CGAL::Default>, false>]’:

/home/pmj27/anaconda2/include/CGAL/Periodic_3_triangulation_3.h:2553:37:
required from ‘CGAL::Periodic_3_triangulation_3<GT, TDS>::Vertex_handle
CGAL::Periodic_3_triangulation_3<GT, TDS>::insert_in_conflict(const Point&,
CGAL::Periodic_3_triangulation_3<GT, TDS>::Locate_type,
CGAL::Periodic_3_triangulation_3<GT, TDS>::Cell_handle, int, int, const
Conflict_tester&, Point_hider&) [with Conflict_tester =
CGAL::Periodic_3_Delaunay_triangulation_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>

::Conflict_tester; Point_hider =

CGAL::Periodic_3_Delaunay_triangulation_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>

::Point_hider; GT =

CGAL::Periodic_3_Delaunay_triangulation_traits_3<CGAL::Epick>; TDS =
CGAL::Triangulation_data_structure_3<CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >,
CGAL::Sequential_tag>; CGAL::Periodic_3_triangulation_3<GT,

::Vertex_handle =

CGAL::internal::CC_iterator<CGAL::Compact_container&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<CGAL::Triangulation_data_structure_3&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >, CGAL::Sequential_tag>

>, CGAL::Default, CGAL::Default, CGAL::Default>, false>;

CGAL::Periodic_3_triangulation_3<GT, TDS>::Point =
CGAL::Point_3<CGAL::Epick>; CGAL::Periodic_3_triangulation_3<GT,

::Cell_handle =

CGAL::internal::CC_iterator<CGAL::Compact_container&lt;CGAL::Triangulation_cell_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >, CGAL::Sequential_tag>

>, CGAL::Default, CGAL::Default, CGAL::Default>, false>]’

/home/pmj27/anaconda2/include/CGAL/Periodic_3_triangulation_3.h:1000:30:
required from ‘CGAL::Periodic_3_triangulation_3<GT, TDS>::Vertex_handle
CGAL::Periodic_3_triangulation_3<GT, TDS>::insert_in_conflict(const Point&,
CGAL::Periodic_3_triangulation_3<GT, TDS>::Cell_handle, const
Conflict_tester&, Point_hider&) [with Conflict_tester =
CGAL::Periodic_3_Delaunay_triangulation_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>

::Conflict_tester; Point_hider =

CGAL::Periodic_3_Delaunay_triangulation_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>

::Point_hider; GT =

CGAL::Periodic_3_Delaunay_triangulation_traits_3<CGAL::Epick>; TDS =
CGAL::Triangulation_data_structure_3<CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >,
CGAL::Sequential_tag>; CGAL::Periodic_3_triangulation_3<GT,

::Vertex_handle =

CGAL::internal::CC_iterator<CGAL::Compact_container&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<CGAL::Triangulation_data_structure_3&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >, CGAL::Sequential_tag>

>, CGAL::Default, CGAL::Default, CGAL::Default>, false>;

CGAL::Periodic_3_triangulation_3<GT, TDS>::Point =
CGAL::Point_3<CGAL::Epick>; CGAL::Periodic_3_triangulation_3<GT,

::Cell_handle =

CGAL::internal::CC_iterator<CGAL::Compact_container&lt;CGAL::Triangulation_cell_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >, CGAL::Sequential_tag>

>, CGAL::Default, CGAL::Default, CGAL::Default>, false>]’

/home/pmj27/anaconda2/include/CGAL/Periodic_3_Delaunay_triangulation_3.h:176:36:
required from ‘CGAL::Periodic_3_Delaunay_triangulation_3<Gt,

::Vertex_handle CGAL::Periodic_3_Delaunay_triangulation_3<Gt,
::insert(const Point&, CGAL::Periodic_3_Delaunay_triangulation_3<Gt,
::Cell_handle) [with Gt =

CGAL::Periodic_3_Delaunay_triangulation_traits_3<CGAL::Epick>; Tds =
CGAL::Triangulation_data_structure_3<CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >,
CGAL::Sequential_tag>; CGAL::Periodic_3_Delaunay_triangulation_3<Gt,

::Vertex_handle =

CGAL::internal::CC_iterator<CGAL::Compact_container&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<CGAL::Triangulation_data_structure_3&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >, CGAL::Sequential_tag>

>, CGAL::Default, CGAL::Default, CGAL::Default>, false>;

CGAL::Periodic_3_Delaunay_triangulation_3<Gt, Tds>::Point =
CGAL::Point_3<CGAL::Epick>; CGAL::Periodic_3_Delaunay_triangulation_3<Gt,

::Cell_handle =

CGAL::internal::CC_iterator<CGAL::Compact_container&lt;CGAL::Triangulation_cell_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3&lt;CGAL::Triangulation_vertex_base_3&lt;CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_vertex_base_3<void> >,
CGAL::Triangulation_cell_base_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>,
CGAL::Periodic_3_triangulation_ds_cell_base_3<void> >, CGAL::Sequential_tag>

>, CGAL::Default, CGAL::Default, CGAL::Default>, false>]’

graph_triangulation.hh:117:24: required from ‘void
graph_tool::get_triangulation<Triang, IsPeriodic>::operator()(Graph&,
Points&, PosMap) const [with Graph =
boost::undirected_adaptor<boost::adj_list&lt;long unsigned int> >; Points =
boost::multi_array_ref<double, 2ul>; PosMap =
boost::checked_vector_property_map<std::vector&lt;double>,
boost::typed_identity_property_map<long unsigned int> >; Triang =
CGAL::Periodic_3_Delaunay_triangulation_3<CGAL::Periodic_3_Delaunay_triangulation_traits_3&lt;CGAL::Epick>

; IsPeriodic = std::integral_constant<bool, true>]’

graph_triangulation.cc:103:42: required from here
/home/pmj27/anaconda2/include/CGAL/Periodic_3_triangulation_3.h:2164:17:
warning: unused parameter ‘lt’ [-Wunused-parameter]
     Locate_type lt, Cell_handle c, const Conflict_tester &tester,
                 ^
Makefile:562: recipe for target 'graph_triangulation.lo' failed
make[4]: *** [graph_triangulation.lo] Error 1
make[4]: *** Waiting for unfinished jobs....

[warnings about unused definitions]
                                    ^
make[4]: Leaving directory '/home/pmj27/graph-tool/src/graph/generation'
Makefile:740: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/pmj27/graph-tool/src/graph'
Makefile:419: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/pmj27/graph-tool/src'
Makefile:591: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pmj27/graph-tool'
Makefile:478: recipe for target 'all' failed
make: *** [all] Error 2

When you copy and paste the error message in your email editor, it wraps
long lines, making it very difficult to read. You should always attach
outputs like this, not put them in the body of the message.

What CGAL version do you have installed?

I have noticed that too. Does the output of `make` get routed to a file like
it does for config.log? Or would I need to use console redirection?

The system cgal seems to be version 4.7-4. The conda version is cgal 4.5 by
ostrokach

I have noticed that too. Does the output of `make` get routed to a file like
it does for config.log? Or would I need to use console redirection?

You need to redirect.

The system cgal seems to be version 4.7-4. The conda version is cgal 4.5 by
ostrokach

It seems like 4.5 is too old. Version 4.7 should work, however.

I have updated cgal to 4.7 so that now works and after applying the
libreadline workaround it compiles and installs but I still get C++
signature mismatches.

I have ripped off Anaconda entirely, re-installed it, installed the latest
Boost in it using only one source to make sure all packages are compatible
(conda-forge). Running "./configure --prefix=$HOME/.local CXX="g++-5"
CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs"
PYTHON="/home/pmj27/anaconda2/bin/python2.7"
CPPFLAGS="-I/home/pmj27/anaconda2/include"
LDFLAGS="-L/home/pmj27/anaconda2/lib" --enable-openmp" seems to work and
completes succesfully, however, the configuration summary prints "Boost CPP
flags: -I/usr/include" which is not what I want and which I guess is causing
my later problems?

In case it helps, I was able to build the graph-tool v2.20 conda package
successfully using the recipe I put in this repo:
https://gitlab.com/conda-forgery/graph-tool. I uploaded the package to the
conda-forgery anaconda channel:
https://anaconda.org/conda-forgery/graph-tool.

You can find the conda recipe in the recipe
<https://gitlab.com/conda-forgery/graph-tool/tree/master/recipe&gt; folder and
commands required to build the package in the .gitlab-ci.yml
<https://gitlab.com/conda-forgery/graph-tool/blob/master/.gitlab-ci.yml&gt;
file. The package is built using the same linux-anvil
<https://hub.docker.com/r/condaforge/linux-anvil/&gt; docker container that is
used to build conda-forge packages. Most of the dependencies are available
in the conda-forge channel, but you also need to add the conda-forgery
channel (I should probably come up with a better name) in order to install
pycairo.

Note that this builds graph-tool without graphics support. Graphis support
requires too many dependencies that I had difficulty compiling from source.

I have updated cgal to 4.7 so that now works and after applying the

libreadline workaround it compiles and installs but I still get C++
signature mismatches.

I have ripped off Anaconda entirely, re-installed it, installed the latest
Boost in it using only one source to make sure all packages are compatible
(conda-forge). Running "./configure --prefix=$HOME/.local CXX="g++-5"
CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs"
PYTHON="/home/pmj27/anaconda2/bin/python2.7"
CPPFLAGS="-I/home/pmj27/anaconda2/include"
LDFLAGS="-L/home/pmj27/anaconda2/lib" --enable-openmp" seems to work and
completes succesfully, however, the configuration summary prints "Boost CPP
flags: -I/usr/include" which is not what I want and which I guess is
causing
my later problems?

====================
                             CONFIGURATION SUMMARY

====================
Using python version: 2.7.13
Python interpreter: /home/pmj27/anaconda2/bin/python2.7
Installation path:
/home/pmj27/anaconda2/lib/python2.7/site-packages/graph_tool

C++ compiler (CXX): g++-5
C++ compiler version: 5.4.0

Prefix: /home/pmj27/.local
Pkgconfigdir: ${libdir}/pkgconfig

Python CPP flags: -I/home/pmj27/anaconda2/include/python2.7
Python LD flags: -L/home/pmj27/anaconda2/lib -lpython2.7
Boost CPP flags: -I/usr/include
Boost LD flags: -lboost_iostreams -lboost_python -lboost_regex
-lboost_coroutine
Numpy CPP flags:
-I/home/pmj27/anaconda2/lib/python2.7/site-packages/numpy/core/include
Sparsehash CPP flags:
CGAL CPP flags: -I/usr/include
CGAL LD flags: -L/usr/lib -lCGAL -lCGAL_Core -lgmp
Expat CPP flags: -I/usr/include
Expat LD flags: -L/usr/lib -lexpat
Cairomm CPP flags: -std=c++11 -I/usr/include/cairomm-1.0
-I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/cairo
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include
Cairomm LD flags: -lcairomm-1.0 -lcairo -lsigc-2.0
OpenMP compiler flags: -fopenmp
OpenMP LD flags:
Extra CPPFLAGS: -I/home/pmj27/anaconda2/include
Extra CXXFLAGS: -fopenmp -O3 -fvisibility=default
-fvisibility-inlines-hidden -Wno-deprecated -ftemplate-depth-250 -DNDEBUG
-Wall -Wextra -ftemplate-backtrace-limit=0 -std=gnu++14
-Wno-unused-local-typedefs
Extra LDFLAGS: -L/home/pmj27/anaconda2/lib

Using OpenMP: yes
Using sparsehash: yes
Using cairo: yes

====================

Is there any way of telling why it keeps defaulting back to using the boost
in /usr/include and a way of making sure it doesn't do so? The config.log
<http://main-discussion-list-for-the-graph-tool-project.9824
80.n3.nabble.com/file/n4027075/config.log>
is attached.

--
View this message in context: http://main-discussion-list-fo
r-the-graph-tool-project.982480.n3.nabble.com/Boost-Python-
ArgumentError-Python-argument-types-did-not-match-C-
signature-tp4027056p4027075.html
Sent from the Main discussion list for the graph-tool project mailing list
archive at Nabble.com.
_______________________________________________
graph-tool mailing list
graph-tool(a)skewed.de
https://lists.skewed.de/mailman/listinfo/graph-tool

attachment.html (15.4 KB)

Thank you, I have had a look at your channel! The reason I am trying to
compile it is so that I can quickly react to bug fixes implemented in the
git version which isn't possible using packages compiled by somebody else as
I depend on their schedules then.

I have also dug around a bit more and am using "./configure
--prefix=$HOME/.local --with-boost=/home/pmj27/anaconda2 CXX="g++-5"
CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs"
PYTHON="/home/pmj27/anaconda2/bin/python2.7"
CPPFLAGS="-I/home/pmj27/anaconda2/include"
LDFLAGS="-L/home/pmj27/anaconda2/lib" --enable-openmp". This returns me a
configuration summary that finally looks like what I would expect
referencing the anaconda boost verion:

Which boost version do you have installed?

`conda list` returns `boost 1.63.0
np112py27_6 conda-forge`. That should be about as up-to-date as it gets.

This is strange. I have the same version, and I cannot reproduce the error.