Public bug reported:

It looks like FindPostgreSQL.cmake needs to be updated for postgres 9.3.4, 
since this is the default postgres version for Ubuntu 14.04.
I tried using
set(PostgreSQL_ADDITIONAL_VERSIONS "9.3.4")
as recommended in FindPostgreSQL.cmake, but I get

CMake Error at 
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found
  version "9.3.4")
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 
(_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindPostgreSQL.cmake:151 
(find_package_handle_standard_args)
  CMakeLists.txt:11 (find_package)

Packages installed:
cmake (2.8.12.2-0ubuntu3)
postgresql (9.3+154)
libpq-dev (9.3.4-1)
libpqxx-dev (4.0.1+dfsg-3ubuntu1)

I got around it by installing postgresql-server-dev-9.3 and adding this to my 
CMakeLists.txt
set(PostgreSQL_ADDITIONAL_SEARCH_PATHS "/usr/include/postgresql/9.3/server")
However:
- Given that I got everything through the package manager, these should 
probably work out of the box.
- I'm not sure that postgresql-server-dev should be a prerequisite for C 
programming with postgres.

$ lsb_release -rd
Description:    Ubuntu 14.04 LTS
Release:        14.04

** Affects: cmake (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1317135

Title:
  find_package fails on PostgreSQL in 14.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/1317135/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to