Import of topology results in a cryptic error after manual compilation
Bug reports:
Please follow the general troubleshooting steps first:
-
Are you running the latest graph-tool
version? -
Do you observe the problem with the current git version? -
Are you using Macports or Homebrew? If yes, please submit an issue there instead: https://github.com/Homebrew/brew/issues and https://trac.macports.org/newticket -
Did you compile graph-tool
manually? -
If you answered yes above, did you use the exact same compiler to build graph-tool
,boost-python
andPython
?
When I try to import the topology module, I get a very cryptic error. I assume it is something about my compilation environment, but I cannot quite pin down what. ldd does not report any issues, nothing interesting pops out at me doing an strace. This is with version 2.27 of graph_tool because that's the last version that supports a C++14 compiler. I do not have access to a C++17 compiler yet.
Do not forget to supply the following information:
-
A minimal and self-contained example that shows the problem. -
Your operating system. -
The Python version you are using. -
If you compiled graph-tool manually: Your compiler version, as well as the version of Boost being used. -
If you are reporting a compilation error, please provide the entire ./configure
output, as well as the entire contents of theconfig.log
file and the entire compilation output.
Do not forget to add code snippets and error messages using Markdown, i.e.
This is Red Hat Enterprise Linux Server release 6.8 (Santiago), Python 3.7.2, g++ (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6) (developer toolset 4), Boost 1.70.0 (compiled with static libraries only).
import graph_tool.topology.libgraph_tool_topology
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/bb/mbigd/mbig2951/dpkgdev/refroot/amd64/opt/bb/lib/python3.7/site-packages/graph_tool/topology/__init__.py", line 73, in <module>
dl_import("from . import libgraph_tool_topology")
File "/bb/mbigd/mbig2951/dpkgdev/refroot/amd64/opt/bb/lib/python3.7/site-packages/graph_tool/dl_import.py", line 61, in dl_import
exec(import_expr, local_dict, global_dict)
File "<string>", line 1, in <module>
SystemError: initialization of libgraph_tool_topology raised unreported exception
This is the simplified example. It was discovered doing this import:
from graph.all import Graph