On 17.01.2015 13:10, graph-tool@v6y.net wrote:
Hi, using either the latest git repo or 2.2.36 and running:
/usr/bin/python3.3 -c 'import graph_tool ; print(graph_tool.__version__)' (or even python3.3 -c 'import graph_tool')
results in:
Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib64/python3.3/site-packages/graph_tool/__init__.py", line 101, in <module> dl_import("from . import libgraph_tool_core as libcore") File "/usr/lib64/python3.3/site-packages/graph_tool/dl_import.py", line 57, in dl_import exec(import_expr, local_dict, global_dict) File "<string>", line 1, in <module> ImportError: /usr/lib64/python3.3/site-packages/graph_tool/libgraph_tool_core.so: undefined symbol: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE
It appears that -lboost_python3_3-mt is not being used, even though my system default is py3.3.
the interesting part of the ./configure log shows:
graph-tool will be installed at: /usr/lib64/python3.3/site-packages =========================== Using python version: 3.3.5 =========================== checking for boostlib >= 1.53.0... yes checking whether the Boost::Python library is available... yes checking for exit in -lboost_python... no checking for exit in -lboost_python... (cached) no checking for exit in -lboost_python-2.7-mt... yes
if I recompile boost without py2.7 support (py3.3 only), then the interesting part of the ./configure log shows:
graph-tool will be installed at: /usr/lib64/python3.3/site-packages =========================== Using python version: 3.3.5 =========================== checking for boostlib >= 1.53.0... yes checking whether the Boost::Python library is available... yes checking for exit in -lboost_python... no checking for exit in -lboost_python... (cached) no checking for exit in -lboost_python-2.7... no checking for exit in -lboost_python-3-mt... yes
and the test command works:
$/usr/bin/python3.3 -c 'import graph_tool ; print(graph_tool.__version__)' 2.2.36 (commit e3865108, Thu Jan 8 17:03:44 2015 +0100)
More detail on this issue is available in the gentoo bug tracker: https://bugs.gentoo.org/show_bug.cgi?id=536734
How do we get the Makefile to have
BOOST_PYTHON_LIB = boost_python-3-mt instead of BOOST_PYTHON_LIB = boost_python-2.7-mt
when boost has been compiled for 2.7 and 3.3?
You should pass the option "--with-boost-python=-3-mt" to the configure script, telling it what suffix should be used. There is no standard naming across systems, and the configure script tries some common ones, but it seems to be failing in this case. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>