Closed mikeshultz closed 7 years ago
@mikeshultz You need to add -DCMAKE_PREFIX_PATH=/usr/pgsql-9.4.
cmake -DCMAKE_PREFIX_PATH=/usr/pgsql-9.4 .
In RHEL, pg_config isn't in the PATH. I should add a prefix explicitly. I'll improve the docs to cover the popular Linux distros.
Build worked against HEAD with that option.
install postgresqlxx-devel where xx is version ,it worked for me to over come below issue.
[osm@localhost build]$ cmake .. -- Building osm2pgsql 0.95.0-dev -- Boost version: 1.57.0 -- Found the following Boost libraries: -- system -- filesystem CMake Warning at /usr/share/cmake/Modules/FindPostgreSQL.cmake:109 (message): Couldn't determine PostgreSQL configuration. Call Stack (most recent call first): /usr/share/cmake/Modules/FindPostgreSQL.cmake:133 (fail_if) CMakeLists.txt:101 (find_package)
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY_DIRS PostgreSQL_INCLUDE_DIRS PostgreSQL_LIBRARIES) (found version "9.4.15") Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindPostgreSQL.cmake:173 (find_package_handle_standard_args) CMakeLists.txt:101 (find_package)
-- Configuring incomplete, errors occurred! See also "/home/osm/osm/osm2pgsql/build/CMakeFiles/CMakeOutput.log". See also "/home/osm/osm/osm2pgsql/build/CMakeFiles/CMakeError.log".
Attempting to install on RHEL 7.2 with a postgresql install from pgdg.
Might be as simple as explorting a couple environmental variables, but nothing is mentioned in the docs.
Was able to fix that with a symlink:
ln -s /usr/pgsql-9.4/bin/pg_config /bin/pg_config
which then returned the following:I tried setting
PostgreSQL_LIBRARY_DIRS
to paths I thought was acceptable with no joy.