Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to create a Homebrew formula to let anybody install pgrouting on his or her mac.

I've seen this question: How to fix pgRouting librouting_dd.so: undefined symbol error?

I'm also following this documentation: http://www.pgrouting.org/docs/1.x/install_freebsd.html

I'm copy-pasting the whole message here:

==> Installing pgrouting
==> Downloading http://download.osgeo.org/pgrouting/source/pgrouting-1.05.tar.gz
File already downloaded in /Users/ca/Library/Caches/Homebrew
/usr/bin/tar xf /Users/ca/Library/Caches/Homebrew/pgrouting-1.05.tar.gz
==> Downloading patches
/usr/bin/curl -f#LA Homebrew 0.8 (Ruby 1.8.7-174; Mac OS X 10.6.8) https://gist.github.com/raw/1271301/d3c4db0d2ed68b2e9dd72289b73eecabbc2429b5/pgrouting-mac-os-x.patch -o 001-homebrew.diff
######################################################################## 100.0%
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
patching file core/src/edge_visitors.hpp
patching file core/src/shooting_star_boost_wrapper.cpp
patching file core/src/shooting_star_relax.hpp
==> cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/pgrouting/1.05' -DCMAKE_BUILD_TYPE=None -Wno-dev -DPOSTGRESQL_INCLUDE_DIR='/usr/local/Cellar/postgresql/9.0.4/include/server/' -DBoost_INCLUDE_DIR='/usr/local/Cellar/boost/1.47.0/include/boost/'
cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/pgrouting/1.05' -DCMAKE_BUILD_TYPE=None -Wno-dev -DPOSTGRESQL_INCLUDE_DIR='/usr/local/Cellar/postgresql/9.0.4/include/server/' -DBoost_INCLUDE_DIR='/usr/local/Cellar/boost/1.47.0/include/boost/' 
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc-4.2
-- Check for working C compiler: /usr/bin/gcc-4.2 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/g++-4.2
-- Check for working CXX compiler: /usr/bin/g++-4.2 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PostgreSQL: /usr/local/Cellar/postgresql/9.0.4/include/server, /usr/local/lib/libpq.dylib
Boost headers were found here: /usr/local/Cellar/boost/1.47.0/include/boost/
Output directory for libraries is set to /usr/local/Cellar/postgresql/9.0.4/lib
-- Found PGROUTING_CORE core: /tmp/homebrew-pgrouting-1.05-OhBx/pgrouting-1.05/core/src
Installation directory for libraries is set to /usr/local/Cellar/postgresql/9.0.4/lib and for SQL files is set to /usr/share/postlbs
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/homebrew-pgrouting-1.05-OhBx/pgrouting-1.05
==> make
make 
Scanning dependencies of target routing
[ 16%] [ 33%] Building C object core/src/CMakeFiles/routing.dir/astar.o
Building C object core/src/CMakeFiles/routing.dir/dijkstra.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
[ 83%] Building CXX object core/src/CMakeFiles/routing.dir/astar_boost_wrapper.o
[100%] Building CXX object core/src/CMakeFiles/routing.dir/shooting_star_boost_wrapper.o
Linking CXX shared library ../../lib/librouting.dylib
Undefined symbols:
  "_SPI_freetuptable", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_heap_formtuple", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_elog_start", referenced from:
      _finish in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _finish in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _finish in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_pfree", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_Float8GetDatum", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_init_MultiFuncCall", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_BlessTupleDesc", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_prepare", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_fnumber", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_MemoryContextAlloc", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_errmsg", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_repalloc", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_end_MultiFuncCall", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_getvalue", referenced from:
      _shortest_path_shooting_star in shooting_star.o
  "_per_MultiFuncCall", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_errstart", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_cursor_fetch", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_gettypeid", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_cursor_open", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_getbinval", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_errfinish", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_finish", referenced from:
      _finish in dijkstra.o
      _finish in astar.o
      _finish in shooting_star.o
  "_RelationNameGetTupleDesc", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_CurrentMemoryContext", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_connect", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_elog_finish", referenced from:
      _finish in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _finish in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _finish in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_errcode", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_DatumGetFloat8", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_tuptable", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
      _shortest_path_shooting_star in shooting_star.o
  "_pg_detoast_datum", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
  "_SPI_processed", referenced from:
      _shortest_path in dijkstra.o
      _shortest_path_astar in astar.o
      _shortest_path_shooting_star in shooting_star.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [lib/librouting.dylib] Error 1
make[1]: *** [core/src/CMakeFiles/routing.dir/all] Error 2
make: *** [all] Error 2
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/pgrouting.rb#L18
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: f2acf83b0e0f344b89411fb884af5dfaacf890eb
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.6.8
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.2.6
GCC-4.0: build 5494 
GCC-4.2: build 5666 
LLVM: build 2335 
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/gcc-4.2
CXX: /usr/bin/g++-4.2
LD: /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/include
LDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib
MAKEFLAGS: -j2
PKG_CONFIG_PATH: /usr/local/Cellar/readline/6.2.1/lib/pkgconfig

Error: Failed executing: make 
If `brew doctor' does not help diagnose the issue, please report the bug:
    https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue

Thanks for your help!


For those interested, you can checkout my Homebrew fork here: https://github.com/charlax/homebrew

I have added two formulas: pgrouting and gaul. Hope that helps!

If everything's right, you should be able to install pgrouting like this (you need to add my two formulas before):

$ brew install pgrouting
share|improve this question
add comment

1 Answer 1

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.