find_package fails on PostgreSQL in 14.04

Bug #1317135 reported by Per Parker
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cmake (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

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

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cmake (Ubuntu):
status: New → Confirmed
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hi, this is fixed in xenial with cmake 3.5.1, feel free to open an SRU if you want a backport of the patch.

Changed in cmake (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.