-
Notifications
You must be signed in to change notification settings - Fork 3k
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 does not find PostgreSQL anymore #4243
Comments
Hi @d-frey! |
I do not require any specific version, I just use If PostgreSQL version 14 is installed correctly, it should be found just like version 13 before, right? (Again, CMake fails before it even tries to compile my code) |
We haven't changed the installation process. Is there a possibility that |
I don't know. I just use this one line |
Short googling bring this documentation of find_package |
OK, but do you expect me to do anything about it? Both PostgreSQL and CMake are part of the image. Previously, CMake was able to find the installed PostgreSQL libraries, now it is not. Whoever is building the image needs to fix that. Note that I am not a Windows user myself, so I can't really test/debug anything when it comes to the Windows images. I need CMake to "just work", otherwise I won't be able to support Windows for my open-source libraries. |
BTW: What looks really weird to me is the part of the error message where it seems to find an older version of PostgreSQL:
It looks like the first and the last line belong together, so it is effectively trying to say
Which is a bit self-contradictory. If it found version "11.3", then why does it say it could NOT find PostgreSQL? Maybe that might help someone to debug the issue. |
@d-frey I'm not CMake expert - maybe this will help virtual environments people to help you. |
|
There is a bug in the The workaround would be the following workflow:
I've tested it on a pretty primitive
|
Thank you for investigating! You mentioned that you have found a bug. What is the bug and did you report it upstream? I tried the workaround, but it does not seem to be compatible with the old installation, as now some other error comes up. I would appreciate any hint. |
This reverts commit 1bebcfe.
For the record: This commit taocpp/taopq@ae5171f from @uilianries is a much easier workaround that allows to use PostgreSQL 14 with CMake. |
I've reported this upstream anyway. As the entire situation looks weird to me |
As the bug has been reported I am going to close the issue right now (as we have no idea by which time the cmake developers are going to fix the problem). Feel free to file a new issue if you have additional questions. |
Description
About 2 days ago, CMake stopped finding PostgreSQL in the system. I have changed some source code, then reverted it back. But the build fails before even trying to compile my code, so from my perspective it has to be some change in the virtual environment.
Virtual environments affected
Image version and build link
Failing builds
Windows Server 2019
https://github.com/taocpp/taopq/runs/3842056429?check_suite_focus=true
Version: 20211003.2
Windows Server 2016
https://github.com/taocpp/taopq/runs/3842056518?check_suite_focus=true
Version: 20211003.1
Working builds, 2 days ago
Windows Server 2019
https://github.com/taocpp/taopq/runs/3820206113?check_suite_focus=true
Version: 20210928.2
Windows Server 2016
https://github.com/taocpp/taopq/runs/3820205739?check_suite_focus=true
Version: 20210927.1
Is it regression?
Yes.
Working 2 days ago: https://github.com/taocpp/taopq/actions/runs/1313629530
Expected behavior
Just like 2 days ago, PostgreSQL should be found by CMake.
Actual behavior
CMake fails to find PostgreSQL with
Repro steps
Run the CI jobs.
The text was updated successfully, but these errors were encountered: