Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake fails to find postgres on Debian. #4292

Closed
Megaf opened this issue Jul 6, 2016 · 5 comments
Closed

cmake fails to find postgres on Debian. #4292

Megaf opened this issue Jul 6, 2016 · 5 comments
Labels
Bug Issues that were confirmed to be a bug @ Build CMake, build scripts, official builds, compiler and linker errors Upstream issue This bug is the fault of a library, the OS or an external service we use.

Comments

@Megaf
Copy link
Contributor

Megaf commented Jul 6, 2016

Hi, cmake fails to find postgresql on debian.

-DPOSTGRESQL_LIBRARY=/usr/lib/x86_64-linux-gnu/libpq.so.5.7
-- Could NOT find PostgreSQL (missing:  PostgreSQL_TYPE_INCLUDE_DIR) (found version "9.4.8")
-- PostgreSQL not found!
@est31 est31 added Bug Issues that were confirmed to be a bug @ Build CMake, build scripts, official builds, compiler and linker errors labels Jul 6, 2016
@est31
Copy link
Contributor

est31 commented Jul 6, 2016

Seems to be two bugs here :)

@Megaf
Copy link
Contributor Author

Megaf commented Jul 6, 2016

@est31 Agreed
#4293

@est31
Copy link
Contributor

est31 commented Jul 6, 2016

Okay the one where autodetection fails is an usptream bug: https://cmake.org/pipermail/cmake/2012-December/053027.html

The other one where specifying the path manually fails is connected to that bug as well.

@Megaf you can work around by specifying the PostgreSQL_TYPE_INCLUDE_DIR variable instead:

-DPOSTGRESQL_LIBRARY=/usr/lib/x86_64-linux-gnu/libpq.so.5.7 -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/

@est31 est31 added the Upstream issue This bug is the fault of a library, the OS or an external service we use. label Jul 6, 2016
@Megaf
Copy link
Contributor Author

Megaf commented Jul 6, 2016

Ok, it seems like cmake ignores totally the -DPOSTGRESQL_LIBRARY because when using

-DPOSTGRESQL_LIBRARY=/usr/lib/x86_64-linux-gnu/libpq.so.5.7 -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/

It says...

-- Found PostgreSQL: /usr/lib/x86_64-linux-gnu/libpq.so (found version "9.4.8")

And it finds it anyway without using -DPOSTGRESQL_LIBRARY

@Megaf Megaf changed the title cmake fails to find postgre on Debian. Missing option to add include library. cmake fails to find postgre on Debian. Jul 6, 2016
@est31 est31 changed the title cmake fails to find postgre on Debian. cmake fails to find postgres on Debian. Jul 8, 2016
@Megaf
Copy link
Contributor Author

Megaf commented Sep 24, 2017

I believe this has been fixed. Haven't encountered this bug anymore, therefore I'm closing this issue.

@Megaf Megaf closed this as completed Sep 24, 2017
@Megaf Megaf reopened this Sep 24, 2017
@Megaf Megaf closed this as completed Sep 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug @ Build CMake, build scripts, official builds, compiler and linker errors Upstream issue This bug is the fault of a library, the OS or an external service we use.
Projects
None yet
Development

No branches or pull requests

2 participants