Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Add a new formula for graph-tool #13592

Closed
wants to merge 1 commit into from
Closed

Conversation

studer
Copy link

@studer studer commented Jul 25, 2012

graph-tool is an efficient python module for manipulation and statistical analysis of graphs (a.k.a. networks). Contrary to most other python modules with similar functionality, the core data structures and algorithms are implemented in C++, making extensive use of template metaprogramming, based heavily on the Boost Graph Library. This confers a level of performance which is comparable (both in memory usage and computation time) to that of a pure C++ library.

graph-tool is an efficient python module for manipulation and statistical analysis of graphs (a.k.a. networks). Contrary to most other python modules with similar functionality, the core data structures and algorithms are implemented in C++, making extensive use of template metaprogramming, based heavily on the Boost Graph Library. This confers a level of performance which is comparable (both in memory usage and computation time) to that of a pure C++ library.
@jtratner
Copy link

jtratner commented Aug 1, 2012

Does this actually work for you? I have all the dependencies installed, but graph-tool refuses to find my lib directory for Python. Here's all the bug report output: https://gist.github.com/3223265

@arlolra
Copy link
Contributor

arlolra commented Oct 10, 2012

@jtratner It does ... with a little effort.

  1. You need to edit a Makefile in Python to configure the PyMac_Error to a non-relative path. See: http://stackoverflow.com/a/8276426. That should fix the compilation error you're seeing above.

  2. You need to install an older version of Boost (1.5.x seems to be incompatible ... at least for me). There's some discussion of supporting multiple versions of Boost in homebrew (see Support Boost 1.49 in core, side-by-side with boost-current #15299) but, until then, you can follow the instructions in cufflinks fails with boost 1.50.0; works with boost 1.49.0 #14385 to get 1.4.9

@adamv
Copy link
Contributor

adamv commented Nov 1, 2012

I'm unable to install matplotlib:

cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -DNDEBUG -g -O3 -Wall -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I. -I/usr/local/lib/python2.7/site-packages/numpy/core/include/freetype2 -I./freetype2 -I/usr/local/homebrew/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ft2font.cpp -o build/temp.macosx-10.7-x86_64-2.7/src/ft2font.o

In file included from src/ft2font.cpp:3:

src/ft2font.h:16:10: fatal error: 'ft2build.h' file not found

#include <ft2build.h>

         ^

1 error generated.

error: command 'cc' failed with exit status 1

@jtratner
Copy link

jtratner commented Nov 1, 2012

Did you try following these instructions -
http://stackoverflow.com/questions/12363557/matplotlib-install-failure-on-mac-osx-10-8-mountain-lion?
I had to futz around a bit to get it to work (but it's been a while so
I
don't remember what I did off the top of my head).

Sometimes the other thing you need to do is symlink files so they can be
found (e.g. Xcode puts it in a different place). Not sure if that's what's
going on in this case.

@adamv
Copy link
Contributor

adamv commented Nov 1, 2012

The requirement for matplotlib ought to say you need to brew install some stuff first depending on OS.

@jtratner
Copy link

jtratner commented Nov 2, 2012

well, if you figure out which combination works, maybe you could write up a
formula and save it either in master (if they'll accept it) or see if you
can get it in one of the alternate tap repositories.

@adamv
Copy link
Contributor

adamv commented Nov 2, 2012

So here's my concern, if we merge this then we're going to get a ton of bug reports asking how to get it to actually work, unless we provide very clear install instructions.

@adamv
Copy link
Contributor

adamv commented Jan 1, 2013

I'm going to close this due to no response from the submitter, but this software is still something we would like to package if possible. The formula will need to be updated to use an older boost (if needed; we now package older boost in the main repo) and include explicit instructions on how to "make this work", per the comments in this thread.

If we don't provide instructions or an improved install, we'll certainly get lots of bug reports when we merge it.

@adamv adamv closed this Jan 1, 2013
@mkhorton
Copy link

Any new progress on this? I'd be very interested in being able to install graph-tool via homebrew.

I just gave @studer's formula a go, but with the new version of graph tool (2.2.24), and my homebrew fully updated. I had to add google-sparsehash to the dependancies. It failed with:

/usr/include/c++/4.2.1/tr1/tuple_iterate.h:48:29: error: expected '>'
const int tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >::value;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [graph_blockmodel.lo] Error 1

Unfortunately, I don't know enough about graph-tool or homebrew to fix this -- but if anyone can get graph-tool working, it'd be much appreciated.

@mkhorton
Copy link

Okay, seems like my problems were related to this bug:

http://projects.skewed.de/graph-tool/ticket/125

Using "--disable-sparsehash" seems to work, but I'm not sure what effect this will have on the functionality of graph-tool itself. Hopefully minimal?

@nvioli
Copy link

nvioli commented Jun 11, 2013

This formula seems to have worked for me. The only nonstandard things I had to do were downgrading boost as suggested above (14385) and pointing the default python install to the new plugins:

sudo ln -s /usr/local/lib/python2.7/site-packages/cairo/ /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cairo
sudo ln -s /usr/local/lib/python2.7/site-packages/graph_tool/ /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/graph_tool

@fobdy
Copy link

fobdy commented Dec 16, 2013

Some candidate for Mavericks (with cairo and sparsehash support) https://gist.github.com/fobdy/7976463

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants