3

I attempted to install graphtool using the following commands:

brew tap homebrew/science
brew install graph-tool

The install finishes successfully but when I import graph_tool, I see the following 'Symbol not found' error:

Python 2.7.10 (default, Jul 14 2015, 19:46:27) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import graph_tool
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/graph_tool/__init__.py", line 105, in <module>
dl_import("from . import libgraph_tool_core as libcore")
File "/usr/local/lib/python2.7/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: dlopen(/usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so, 8): Symbol not found: __ZNK5boost9re_detail31cpp_regex_traits_implementationIcE17transform_primaryEPKcS4_
Referenced from: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so
Expected in: /usr/local/opt/boost/lib/libboost_regex.dylib
in /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so
>>> exit()

After reading about this a bit, I thought there might be an issue with different compilers being used to compile boost versus graph-tool. I uninstalled boost, boost-python, and graph-tool and re-installed, compiling from source.

brew -v install --with-icu4c --build-from-source --with-c++11 boost
brew -v install --with-icu4c --build-from-source --with-c++11 boost-python
brew -v install --build-from-source graph-tool --without-scipy --without-matplotlib --without-numpy

boost and boost-python were successful, however graph-tool fails:

Making install in centrality
  CXX      graph_centrality_bind.lo
  CXX      graph_betweenness.lo
  CXX      graph_closeness.lo
  CXX      graph_eigentrust.lo
  CXX      graph_eigenvector.lo
  CXX      graph_hits.lo
../../../../src/graph/centrality/graph_hits.cc:71:44: error: 'placeholders' is not a class, namespace, or enumeration
        (g, std::bind(get_hits_dispatch(), placeholders::_1, g.get_vertex_index(),
                                           ^
../../../../src/graph/centrality/graph_hits.cc:71:44: error: reference to 'placeholders' is ambiguous
        (g, std::bind(get_hits_dispatch(), placeholders::_1, g.get_vertex_index(),
                                           ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1863:11: note: candidate found by name lookup is 'std::__1::placeholders'
namespace placeholders
          ^
/usr/local/include/boost/bind/placeholders.hpp:29:11: note: candidate found by name lookup is 'boost::placeholders'
namespace placeholders
          ^
../../../../src/graph/centrality/graph_hits.cc:72:23: error: 'placeholders' is not a class, namespace, or enumeration
                      placeholders::_2,  placeholders::_3, y, epsilon, max_iter,
                      ^
../../../../src/graph/centrality/graph_hits.cc:72:23: error: reference to 'placeholders' is ambiguous
                      placeholders::_2,  placeholders::_3, y, epsilon, max_iter,
                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1863:11: note: candidate found by name lookup is 'std::__1::placeholders'
namespace placeholders
          ^
/usr/local/include/boost/bind/placeholders.hpp:29:11: note: candidate found by name lookup is 'boost::placeholders'
namespace placeholders
          ^
../../../../src/graph/centrality/graph_hits.cc:72:42: error: 'placeholders' is not a class, namespace, or enumeration
                      placeholders::_2,  placeholders::_3, y, epsilon, max_iter,
                                         ^
../../../../src/graph/centrality/graph_hits.cc:72:42: error: reference to 'placeholders' is ambiguous
                      placeholders::_2,  placeholders::_3, y, epsilon, max_iter,
                                         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1863:11: note: candidate found by name lookup is 'std::__1::placeholders'
namespace placeholders
          ^
/usr/local/include/boost/bind/placeholders.hpp:29:11: note: candidate found by name lookup is 'boost::placeholders'
namespace placeholders
          ^
6 errors generated.

Additional configuration information:

==> Formula
Tap: homebrew/science
Path: /usr/local/Library/Taps/homebrew/homebrew-science/graph-tool.rb
==> Configuration
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 4ddb79413782c82840154f75280ff67a1ded10f4
Last commit: 13 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit broadwell
OS X: 10.10.5-x86_64
Xcode: N/A
CLT: 7.2.0.0.1.1447826929
Clang: 7.0 build 700
X11: N/A
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: N/A

Also

$ xcode-select -p
/Library/Developer/CommandLineTools
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

Any ideas on how to proceed from here to get graphtool working?

1 Answer 1

1

I opened an issue for this a couple of days ago: https://github.com/Homebrew/homebrew-science/issues/3237

Unfortunately the first try at a solution didn't work for me. Maybe you'll have better luck?

Sign up to request clarification or add additional context in comments.

1 Comment

Ah thank you for the heads-up. Unfortunately I am not familiar enough with applying patches to just apply the fix and see what happens. I will have to watch the open issue and see if anything gets clarified.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.