I am having trouble getting started with pgRouting.
1) from binary The Kyngchaos binary just won't install and says it requires PostgreSQL 9.1. I do have it, but probably not where the binary expects it:
herve:pgrouting-master hsenot$ psql --version
psql (PostgreSQL) 9.1.4
herve:pgrouting-master hsenot$ which psql
/opt/opengeo/pgsql/9.1/bin/psql
Any advice on making it available to the installer, by tweaking the path maybe?
herve:~ hsenot$ echo $PATH
/opt/boost_1_52_0:/Library/Frameworks/GDAL.framework/Programs:/Library/Frameworks/UnixImageIO.framework/Programs:/Library/Frameworks/PROJ.framework/Programs:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/opengeo/pgsql/9.1/bin:/opt/opengeo/opengeosuite-2.5-sdk/bin:/usr/X11/bin:/opt/local/include:/opt/local/bin:/opt/local/sbin
2) from source I've tried with the pgRouting 1.05 (tar) and the lastest GitHub version. In both case, it throws the same error.
After "cmake .", I had to manually set the PostgreSQL directories in CMakeCache.txt:
//Path to a file.
POSTGRESQL_INCLUDE_DIR:PATH=/opt/opengeo/pgsql/9.1/include/postgresql/server
//Path to a library.
POSTGRESQL_LIBRARIES:FILEPATH=/opt/opengeo/pgsql/9.1/lib
Without this, cmake (at the next step) says it can't find postgresql.h
The 'cmake' trace is:
herve:pgrouting-master hsenot$ cmake .
-- Boost version: 1.52.0
Boost headers were found here: /opt/boost_1_52_0
Output directory for libraries is set to sh: /opt/opengeo/pgsql/9.1/bin/postgres/pg_config: Not a directory
Installation directory for libraries is set to sh: /opt/opengeo/pgsql/9.1/bin/postgres/pg_config: Not a directory and for SQL files is set to /usr/share/pgrouting
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pgrouting-master
So there is already something fishy here with the "Not a directory" messages.
The 'make' error trace is:
herve:pgrouting-master hsenot$ make
Scanning dependencies of target routing
[ 16%] Building C object core/src/CMakeFiles/routing.dir/dijkstra.o
[ 33%] Building C object core/src/CMakeFiles/routing.dir/astar.o
[ 50%] Building C object core/src/CMakeFiles/routing.dir/shooting_star.o
[ 66%] Building CXX object core/src/CMakeFiles/routing.dir/boost_wrapper.o
/opt/boost_1_52_0/boost/graph/detail/adjacency_list.hpp: In instantiation of ‘boost::detail::adj_list_any_edge_pmap::bind_<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex, boost::no_property, boost::listS>, Vertex, boost::edge_weight_t>’:
/opt/boost_1_52_0/boost/graph/detail/adjacency_list.hpp:2687: instantiated from ‘boost::detail::adj_list_choose_edge_pmap<boost::edge_weight_t, boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex, boost::no_property, boost::listS>, Vertex>’
/opt/boost_1_52_0/boost/graph/detail/adjacency_list.hpp:2690: instantiated from ‘boost::detail::adj_list_edge_property_selector::bind_<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex, boost::no_property, boost::listS>, Vertex, boost::edge_weight_t>’
/opt/boost_1_52_0/boost/graph/properties.hpp:215: instantiated from ‘boost::detail::edge_property_map<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex, boost::no_property, boost::listS>, boost::edge_weight_t>’
/opt/boost_1_52_0/boost/graph/properties.hpp:233: instantiated from ‘boost::property_map<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex, boost::no_property, boost::listS>, boost::edge_weight_t>’
/tmp/pgrouting-master/core/src/boost_wrapper.cpp:77: instantiated from here
/opt/boost_1_52_0/boost/graph/detail/adjacency_list.hpp:2653: error: forming reference to void
/opt/boost_1_52_0/boost/graph/detail/adjacency_list.hpp:2654: error: forming reference to void
/opt/boost_1_52_0/boost/graph/detail/adjacency_list.hpp:2658: error: forming reference to void
/opt/boost_1_52_0/boost/graph/detail/adjacency_list.hpp:2661: error: forming reference to void
/tmp/pgrouting-master/core/src/boost_wrapper.cpp: In function ‘int boost_dijkstra(edge_t*, unsigned int, int, int, bool, bool, path_element_t**, int*, char**)’:
/tmp/pgrouting-master/core/src/boost_wrapper.cpp:77: error: no matching function for call to ‘get(boost::edge_weight_t, boost_dijkstra(edge_t*, unsigned int, int, int, bool, bool, path_element_t**, int*, char**)::graph_t&)’
make[2]: *** [core/src/CMakeFiles/routing.dir/boost_wrapper.o] Error 1
make[1]: *** [core/src/CMakeFiles/routing.dir/all] Error 2
make: *** [all] Error 2
Has anyone encountered this one before?
More generally, has anyone compiled pgRouting on Mac recently?