Ticket #215 (new bug report)
Undefined symbols on OSX
Reported by: | hamannj | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | pgRouting package | Version: | |
Keywords: | undefined symbols | Cc: |
Description
I can configure and build the dependencies, but when I attempt to cmake
sudo /usr/local/bin/cmake DPOSTGRESQL_INCLUDE_DIR=/usr/local/pgsql/include/server DPOSTGRESQL_LIBRARIES=/usr/local/pgsql/lib .
I get the following message:
Jeff-Hamanns-MacBook-Pro:pgrouting hamannj$ /usr/local/bin/cmake -DPOSTGRESQL_INCLUDE_DIR=/usr/local/pgsql/include/server -DPOSTGRESQL_LIBRARIES=/usr/local/pgsql/lib . CMake Warning (dev) at CMakeLists.txt:12 (add_subdirectory):
The source directory
/Users/hamannj/Documents/temp-lamo/pgrouting/cmake
does not contain a CMakeLists.txt file.
CMake does not support this case but it used to work accidentally and is being allowed for compatibility.
Policy CMP0014 is not set: Input directories must have CMakeLists.txt. Run "cmake --help-policy CMP0014" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
Boost headers were found here: /usr/local/include Output directory for libraries is set to /usr/local/pgsql/lib Installation directory for libraries is set to /usr/local/pgsql/lib and for SQL files is set to /usr/share/postlbs -- Configuring done -- Generating done -- Build files have been written to: /Users/hamannj/Documents/temp-lamo/pgrouting
Which, looks daunting, but ignor-able.
Then, when I attempt to run make, I get a bunch of Undefined symbols:
Jeff-Hamanns-MacBook-Pro:pgrouting hamannj$ 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 [ 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 In file included from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/shooting_star_boost_wrapper.cpp:26: /usr/local/include/boost/vector_property_map.hpp:15:4: warning: #warning "This header is deprecated. Please use: boost/property_map/vector_property_map.hpp" In file included from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/shooting_star_relax.hpp:18,
from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/shooting_star_search.hpp:22, from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/shooting_star_boost_wrapper.cpp:27:
/usr/local/include/boost/property_map.hpp:15:4: warning: #warning "This header is deprecated. Please use: boost/property_map/property_map.hpp" In file included from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/edge_visitors.hpp:6,
from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/shooting_star_search.hpp:28, from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/shooting_star_boost_wrapper.cpp:27:
/usr/local/include/boost/property_map.hpp:15:4: warning: #warning "This header is deprecated. Please use: boost/property_map/property_map.hpp" In file included from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/edge_visitors.hpp:9,
from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/shooting_star_search.hpp:28, from /Users/hamannj/Documents/temp-lamo/pgrouting/core/src/shooting_star_boost_wrapper.cpp:27:
/usr/local/include/boost/graph/detail/is_same.hpp:17:4: warning: #warning "This header is deprecated. Please use: boost/type_traits/is_same.hpp" 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
"_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 Jeff-Hamanns-MacBook-Pro:pgrouting hamannj$
I'm trying to build the results using GCC (not XCode) or anything specific to the Mac, and have little experience with cmake.
Jeff-Hamanns-MacBook-Pro:pgrouting hamannj$ uname -a Darwin Jeff-Hamanns-MacBook?-Pro.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 Jeff-Hamanns-MacBook-Pro:pgrouting hamannj$ pg_config BINDIR = /usr/local/pgsql/bin DOCDIR = /usr/local/pgsql/share/doc HTMLDIR = /usr/local/pgsql/share/doc INCLUDEDIR = /usr/local/pgsql/include PKGINCLUDEDIR = /usr/local/pgsql/include INCLUDEDIR-SERVER = /usr/local/pgsql/include/server LIBDIR = /usr/local/pgsql/lib PKGLIBDIR = /usr/local/pgsql/lib LOCALEDIR = /usr/local/pgsql/share/locale MANDIR = /usr/local/pgsql/share/man SHAREDIR = /usr/local/pgsql/share SYSCONFDIR = /usr/local/pgsql/etc PGXS = /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = 'CC=gcc -arch i386 -O1 -g3' 'CXX=g++ -arch i386 -O1 -g3' 'OBJC=gcc -arch i386 -O1 -g3' 'F77=gfortran -arch i386 -O1 -g3' 'FC=gfortran -arch i386 -O1 -g3' '--with-python' '--with-openssl' '--enable-debug' '--enable-cassert' 'CFLAGS=-O1 -g3' CC = gcc -arch i386 -O1 -g3 -no-cpp-precomp CPPFLAGS = CFLAGS = -O1 -g3 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -g CFLAGS_SL = LDFLAGS = -Wl,-dead_strip_dylibs LDFLAGS_SL = LIBS = -lpgport -lssl -lcrypto -lz -lreadline -lm VERSION = PostgreSQL 8.4.4 Jeff-Hamanns-MacBook-Pro:pgrouting hamannj$