Ticket #209 (new bug report)

Opened 5 months ago

Last modified 5 months ago

Issue with 'make' - POSTGRESQL not found + other errors

Reported by: roydon Owned by: somebody
Priority: major Milestone:
Component: pgRouting package Version:
Keywords: Cc:

Description

We are running Ubuntu 10.04 and we have installed POSTGRESQL (8.4) and POSTGIS (1.5.1) manually. Both are working as Mapnik is working 100%, so there are no errors with their installation.

When first trying to run 'cmake -DWITH_TSP=ON -DWITH_DD=ON .' we got the following error (note that all info from the terminal window is shown between '------------------'):


-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Warning (dev) at CMakeLists.txt:12 (add_subdirectory):

The source directory

/home/administrator/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.

-- PostgreSQL not found. FATALERROR Please check your PostgreSQL installation. -- Boost version: 1.40.0 -- Found the following Boost libraries: Boost headers were found here: /usr/include Output directory for libraries is set to /usr/lib/postgresql/8.4/lib -- Found PGROUTING_CORE core: /home/administrator/pgrouting/core/src Installation directory for libraries is set to /usr/lib/postgresql/8.4/lib and for SQL files is set to /usr/share/postlbs -- Found GAUL: /usr/local/lib/libgaul.so, /usr/local/lib/libgaul_util.so Installation directory for libraries is set to /usr/lib/postgresql/8.4/lib -- Found CGAL: /usr/include, /usr/lib/libCGAL.so CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: POSTGRESQL_INCLUDE_DIR (ADVANCED)

used as include directory in directory /home/administrator/pgrouting used as include directory in directory /home/administrator/pgrouting/core used as include directory in directory /home/administrator/pgrouting/extra/tsp used as include directory in directory /home/administrator/pgrouting/extra/tsp/src used as include directory in directory /home/administrator/pgrouting/extra/tsp/sql used as include directory in directory /home/administrator/pgrouting/extra/driving_distance used as include directory in directory /home/administrator/pgrouting/extra/driving_distance/src used as include directory in directory /home/administrator/pgrouting/extra/driving_distance/sql used as include directory in directory /home/administrator/pgrouting/core/src used as include directory in directory /home/administrator/pgrouting/core/sql

-- Configuring incomplete, errors occurred!


We edited the file /pgrouting/CMakeCache.txt as follows:

POSTGRESQL_INCLUDE_DIR:PATH=POSTGRESQL_INCLUDE_DIR-NOTFOUND ==> POSTGRESQL_INCLUDE_DIR:PATH=/usr/include

We then ran the 'cmake -DWITH_TSP=ON -DWITH_DD=ON .' command again and got the following (which we assumed meant it was a success):


CMake Warning (dev) at CMakeLists.txt:12 (add_subdirectory):

The source directory

/home/administrator/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/include Output directory for libraries is set to /usr/lib/postgresql/8.4/lib Installation directory for libraries is set to /usr/lib/postgresql/8.4/lib and for SQL files is set to /usr/share/postlbs Installation directory for libraries is set to /usr/lib/postgresql/8.4/lib -- Configuring done -- Generating done -- Build files have been written to: /home/administrator/pgrouting


The next step was to run 'make' and then we got the following error:


Scanning dependencies of target routing_tsp [ 8%] Building C object extra/tsp/src/CMakeFiles/routing_tsp.dir/tsp.o In file included from /home/administrator/pgrouting/extra/tsp/src/tsp.c:22: /home/administrator/pgrouting/extra/tsp/src/tsp.h:25:22: error: postgres.h: No such file or directory In file included from /home/administrator/pgrouting/extra/tsp/src/tsp.h:26,

from /home/administrator/pgrouting/extra/tsp/src/tsp.c:22:

/home/administrator/pgrouting/core/src/dijkstra.h:32: error: expected specifier-qualifier-list before ‘float8’ /home/administrator/pgrouting/core/src/dijkstra.h:40: error: expected specifier-qualifier-list before ‘float8’ /home/administrator/pgrouting/core/src/dijkstra.h:47: error: expected declaration specifiers or ‘...’ before ‘bool’ /home/administrator/pgrouting/core/src/dijkstra.h:47: error: expected declaration specifiers or ‘...’ before ‘bool’ In file included from /home/administrator/pgrouting/extra/tsp/src/tsp.c:22: /home/administrator/pgrouting/extra/tsp/src/tsp.h:31: error: expected specifier-qualifier-list before ‘float8’ /home/administrator/pgrouting/extra/tsp/src/tsp.c:25:26: error: executor/spi.h: No such file or directory /home/administrator/pgrouting/extra/tsp/src/tsp.c:26:21: error: funcapi.h: No such file or directory /home/administrator/pgrouting/extra/tsp/src/tsp.c:27:29: error: catalog/pg_type.h: No such file or directory /home/administrator/pgrouting/extra/tsp/src/tsp.c:32:18: error: fmgr.h: No such file or directory /home/administrator/pgrouting/extra/tsp/src/tsp.c:73: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘tsp’ /home/administrator/pgrouting/extra/tsp/src/tsp.c:98: error: expected ‘)’ before ‘*’ token /home/administrator/pgrouting/extra/tsp/src/tsp.c: In function ‘finish’: /home/administrator/pgrouting/extra/tsp/src/tsp.c:111: error: ‘SPI_OK_FINISH’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:111: error: (Each undeclared identifier is reported only once /home/administrator/pgrouting/extra/tsp/src/tsp.c:111: error: for each function it appears in.) /home/administrator/pgrouting/extra/tsp/src/tsp.c:113: error: ‘ERROR’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c: At top level: /home/administrator/pgrouting/extra/tsp/src/tsp.c:123: error: expected specifier-qualifier-list before ‘float8’ /home/administrator/pgrouting/extra/tsp/src/tsp.c:129: error: expected ‘)’ before ‘*’ token /home/administrator/pgrouting/extra/tsp/src/tsp.c:152: error: expected ‘)’ before ‘*’ token /home/administrator/pgrouting/extra/tsp/src/tsp.c: In function ‘solve_tsp’: /home/administrator/pgrouting/extra/tsp/src/tsp.c:194: error: ‘Portal’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:194: error: expected ‘;’ before ‘SPIportal’ /home/administrator/pgrouting/extra/tsp/src/tsp.c:195: error: ‘bool’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:195: error: expected ‘;’ before ‘moredata’ /home/administrator/pgrouting/extra/tsp/src/tsp.c:202: error: unknown field ‘x’ specified in initializer /home/administrator/pgrouting/extra/tsp/src/tsp.c:202: warning: excess elements in struct initializer /home/administrator/pgrouting/extra/tsp/src/tsp.c:202: warning: (near initialization for ‘point_columns’) /home/administrator/pgrouting/extra/tsp/src/tsp.c:202: error: unknown field ‘y’ specified in initializer /home/administrator/pgrouting/extra/tsp/src/tsp.c:202: warning: excess elements in struct initializer /home/administrator/pgrouting/extra/tsp/src/tsp.c:202: warning: (near initialization for ‘point_columns’) /home/administrator/pgrouting/extra/tsp/src/tsp.c:228: error: ‘ERROR’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:238: error: ‘SPI_OK_CONNECT’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:244: warning: assignment makes pointer from integer without a cast /home/administrator/pgrouting/extra/tsp/src/tsp.c:252: error: ‘SPIportal’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:252: error: ‘true’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:261: error: ‘moredata’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:261: error: ‘TRUE’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:267: error: ‘SPI_tuptable’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:271: error: ‘SPI_processed’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:278: warning: assignment makes pointer from integer without a cast /home/administrator/pgrouting/extra/tsp/src/tsp.c:280: warning: assignment makes pointer from integer without a cast /home/administrator/pgrouting/extra/tsp/src/tsp.c:291: error: ‘SPITupleTable’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:291: error: ‘tuptable’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:292: error: ‘TupleDesc?’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:292: error: expected ‘;’ before ‘tupdesc’ /home/administrator/pgrouting/extra/tsp/src/tsp.c:298: error: ‘HeapTuple?’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:298: error: expected ‘;’ before ‘tuple’ /home/administrator/pgrouting/extra/tsp/src/tsp.c:300: error: ‘tuple’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:300: error: ‘tupdesc’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:309: error: ‘FALSE’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c:325: error: ‘point_t’ has no member named ‘x’ /home/administrator/pgrouting/extra/tsp/src/tsp.c:326: error: ‘point_t’ has no member named ‘y’ /home/administrator/pgrouting/extra/tsp/src/tsp.c:364: error: ‘ERRCODE_E_R_E_CONTAINING_SQL_NOT_PERMITTED’ undeclared (first use in this function) /home/administrator/pgrouting/extra/tsp/src/tsp.c: At top level: /home/administrator/pgrouting/extra/tsp/src/tsp.c:370: warning: data definition has no type or storage class /home/administrator/pgrouting/extra/tsp/src/tsp.c:370: warning: parameter names (without types) in function declaration /home/administrator/pgrouting/extra/tsp/src/tsp.c:372: ting_tsp.dir/all] Error 2 make: *** [all] Error 2


If anyone knows where we are going wrong, please let us know !

Change History

Changed 5 months ago by daniel

  • component changed from A* to pgRouting package

I made pgRouting packages with 10.04 and I took PostgreSQL, PostGIS and CMake as it comes through repositories. I didn't have any problems with CMake (did you take the repository version?) as you described.

For TSP and Driving Distance support you need to care about other dependencies, though I don't think there is the problem.
Nevertheless you could try to first only compile pgRouting without TSP and Driving Distance support not reduce possibilities for errors. You can add then later.

Note: See TracTickets for help on using tickets.