Compiling osx (snow leopard)
Hi, i have been trying to compile graph-tool for a while now, but get stuck with syntax errors in the makefile and subsequent compilation errors.
After running ./configure
henriks-macbook-pro:graph-tool-clean henrik$ make
make all-recursive
Making all in src
Making all in graph
Making all in generation
CXX graph_generation.lo
../../../libtool: line 894: syntax error near unexpected token "X$1"' ../../../libtool: line 894:
func_quote_for_eval_unquoted_result=$ECHO "X$1" | $Xsed -e "$sed_quote_subst"
;;'
make[4]: *** [graph_generation.lo] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I tracked down the syntax error and deleted the functions and removed references to it. (the method did qouting for 'aesthetic' purposes). Now the makefile works, but it probably doesnt include boost properly:
henriks-macbook-pro:graph-tool-clean henrik$ make
make all-recursive
Making all in src
Making all in graph
Making all in generation
CXX graph_generation.lo
In file included from ./../graph_filtering.hh:49,
from graph_generation.cc:20:
./../graph_wrap.hh: In function 'void boost::clear_vertex(typename boost::graph_traits<boost::GraphWrap<Graph> >::vertex_descriptor, boost::GraphWrap<Graph>)':
./../graph_wrap.hh:227: error: 'is_directed' is not a class or namespace
./../graph_wrap.hh:227: error: expected primary-expression before '>' token
./../graph_wrap.hh:227: error: '::type' has not been declared
In file included from graph_generation.cc:21:
/usr/include/c++/4.2.1/tr1/random: At global scope:
/usr/include/c++/4.2.1/tr1/random: In instantiation of 'std::tr1::__detail::_Adaptor<graph_tool::rng_t&, std::tr1::uniform_real<double> >':
/usr/include/c++/4.2.1/tr1/random:256: instantiated from 'std::tr1::variate_generator<graph_tool::rng_t&, std::tr1::uniform_real<double> >'
graph_generation.hh:180: instantiated from here
/usr/include/c++/4.2.1/tr1/random:96: error: 'graph_tool::rng_t&' is not a class, struct, or union type
/usr/include/c++/4.2.1/tr1/random:100: error: forming reference to reference type 'graph_tool::rng_t&'
/usr/include/c++/4.2.1/tr1/random: In constructor 'std::tr1::variate_generator<_Engine, _Dist>::variate_generator(_Engine, _Dist) [with _Engine = graph_tool::rng_t&, _Dist = std::tr1::uniform_real<double>]':
graph_generation.hh:179: instantiated from 'ValueType graph_tool::Sampler<ValueType>::operator()(graph_tool::rng_t&, bool) [with ValueType = std::pair<long unsigned int, long unsigned int>]'
graph_generation.hh:538: instantiated from here
/usr/include/c++/4.2.1/tr1/random:194: error: no matching function for call to 'std::tr1::__detail::_Adaptor<graph_tool::rng_t&, std::tr1::uniform_real<double> >::_Adaptor(std::tr1::mersenne_twister<long unsigned int, 32, 624, 397, 31, 2567483615ul, 11, 7, 2636928640ul, 15, 4022730752ul, 18>&)'
/usr/include/c++/4.2.1/tr1/random:95: note: candidates are: std::tr1::__detail::_Adaptor<graph_tool::rng_t&, std::tr1::uniform_real<double> >::_Adaptor(const std::tr1::__detail::_Adaptor<graph_tool::rng_t&, std::tr1::uniform_real<double> >&)
/usr/include/c++/4.2.1/tr1/random: In member function 'typename std::tr1::__detail::_Adaptor<_Engine, _Distribution>::result_type std::tr1::__detail::_Adaptor<_Engine, _Distribution>::operator()() [with _Engine = graph_tool::rng_t&, _Distribution = std::tr1::uniform_real<double>]':
/usr/include/c++/4.2.1/tr1/random:2051: instantiated from '_RealType std::tr1::uniform_real<_RealType>::operator()(_UniformRandomNumberGenerator&) [with _UniformRandomNumberGenerator = std::tr1::__detail::_Adaptor<graph_tool::rng_t&, std::tr1::uniform_real<double> >, _RealType = double]'
/usr/include/c++/4.2.1/tr1/random:201: instantiated from 'typename _Dist::result_type std::tr1::variate_generator<_Engine, _Dist>::operator()() [with _Engine = graph_tool::rng_t&, _Dist = std::tr1::uniform_real<double>]'
graph_generation.hh:180: instantiated from 'ValueType graph_tool::Sampler<ValueType>::operator()(graph_tool::rng_t&, bool) [with ValueType = std::pair<long unsigned int, long unsigned int>]'
graph_generation.hh:538: instantiated from here
/usr/include/c++/4.2.1/tr1/random:147: error: 'graph_tool::rng_t&' is not a class, struct, or union type
/usr/include/c++/4.2.1/tr1/random:150: error: 'graph_tool::rng_t&' is not a class, struct, or union type
/usr/include/c++/4.2.1/tr1/random:2051: instantiated from '_RealType std::tr1::uniform_real<_RealType>::operator()(_UniformRandomNumberGenerator&) [with _UniformRandomNumberGenerator = std::tr1::__detail::_Adaptor<graph_tool::rng_t&, std::tr1::uniform_real<double> >, _RealType = double]'
/usr/include/c++/4.2.1/tr1/random:201: instantiated from 'typename _Dist::result_type std::tr1::variate_generator<_Engine, _Dist>::operator()() [with _Engine = graph_tool::rng_t&, _Dist = std::tr1::uniform_real<double>]'
graph_generation.hh:180: instantiated from 'ValueType graph_tool::Sampler<ValueType>::operator()(graph_tool::rng_t&, bool) [with ValueType = std::pair<long unsigned int, long unsigned int>]'
graph_generation.hh:538: instantiated from here
/usr/include/c++/4.2.1/tr1/random:154: error: 'graph_tool::rng_t&' is not a class, struct, or union type
make[4]: *** [graph_generation.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
Any ideas? Is this an osx issue, or something i'm doing wrong (except from deleting stuff from the makefile)
Henrik