Hi, That's a great idea to take it into macports. I am only just checking out graph-tool and it looks really nice, and a macports would certainly be very useful. It also doesnt seem like it would be too much work- I'm sure the macports guys would help out with the autotools configuration- and other than the numpy patch it seems to compile and run just fine on the mac. I have only compiled it 32-bit with gcc44- I have not tried a 64-bit compile and I dont know if its written to be 64bit safe (this would be very nice if it was). There don't seem to be any tests which would be helpful in verifying that the port was working- but a 32bit macport would be a start at least. I initially found this project when I was looking for a working version of the python bindings for the boost graph library- development seems to be discontinued for some time. Can anyone confirm if graph-tool is effectively a customised python binding for the bgl? What would be involved in updating the python bgl bindings? regards, tcb On Thu, Jan 21, 2010 at 11:15 PM, Claudio Martella <claudio.martella@gmail.com> wrote:
Thanks for the patch! I was the one taking out the issue. I also managed to solve the libtool problem but i got stuck to the numpy issue. I'll check out your second patch. Thanks again! BTW i think we should create a macport of this lib!
On Thu, Jan 21, 2010 at 10:39 PM, tcb <thecolourblue+m@gmail.com> wrote:
Hi, I dont know if graph-tool is fully supported under macosx, but I have encountered a few problems with building it (on osx 10.6). The problems seem to stem from the configure/libtool scripts- about which I know very little- but I have figured out enough to get it to build. I noticed the same problem was reported on this list back in October (was it ever resolved?) - the errors were along the lines of "configure: error: No usable boost::python found". This problem would seem to be solved by modifying the configure script, which tries to link against the boost libraries with libboost-python*.[so,a] extensions- on osx I have compiled boost as a shared library and so it should look for libboost-python*.[dylib]. There is a patch for the configure script below. I also found some problems with the libtool script, so I replaced it with libtool (from the macports libtool package) (cp /opt/local/bin/glibtool ~/src/graph-tool/libtool) and the build proceeded to completion. This patch just gets the build working- I dont really know where the configure script gets the [so,a] information from, and its old version of libtool- the proper fix would address these issues. There was also a problem I encountered with numpy_bind.hh when compiling with gcc44 (from macports). The fix was to add another element to the numpy_types map- the patch is also below. regards, tcb --- configure~ 2010-01-21 05:30:22.000000000 +0000 +++ configure 2010-01-21 05:41:37.000000000 +0000 @@ -16695,7 +16695,7 @@ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'` if test "x$ax_boost_user_iostreams_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_iostreams*.{so,a}* 2>/dev/null | sort -r | sed 's,.*/,,' | sed -e 's;^lib\(boost_iostreams.*\)\.so.*$;\1;' -e 's;^lib\(boost_iostreams.*\)\.a*$;\1;'` ; do + for libextension in `ls $BOOSTLIBDIR/libboost_iostreams*.{dylib,a}* 2>/dev/null | sort -r | sed 's,.*/,,' | sed -e 's;^lib\(boost_iostreams.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_iostreams.*\)\.a*$;\1;'` ; do ax_lib=${libextension} as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 @@ -16926,7 +16926,7 @@ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'` if test "x$ax_boost_user_regex_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_regex*.{so,a}* 2>/dev/null | sort -r | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.a*$;\1;'` ; do + for libextension in `ls $BOOSTLIBDIR/libboost_regex*.{dylib,a}* 2>/dev/null | sort -r | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_regex.*\)\.a*$;\1;'` ; do ax_lib=${libextension} as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
--- a/src/graph/numpy_bind.hh +++ b/src/graph/numpy_bind.hh @@ -50,13 +50,16 @@ typedef mpl::map< mpl::pair<int64_t, mpl::int_<NPY_INT64> >, mpl::pair<uint64_t, mpl::int_<NPY_UINT64> >, mpl::pair<double, mpl::int_<NPY_DOUBLE> >, - mpl::pair<long double, mpl::int_<NPY_LONGDOUBLE>
+ mpl::pair<long double, mpl::int_<NPY_LONGDOUBLE> >, + mpl::pair<unsigned long int, mpl::int_<NPY_ULONG> > > numpy_types;
_______________________________________________ graph-tool mailing list graph-tool@forked.de http://lists.forked.de/mailman/listinfo/graph-tool
-- Claudio Martella claudio.martella@gmail.com _______________________________________________ graph-tool mailing list graph-tool@forked.de http://lists.forked.de/mailman/listinfo/graph-tool