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

Build errors.. #309

Open
cyboy22 opened this issue Jun 1, 2023 · 2 comments
Open

Build errors.. #309

cyboy22 opened this issue Jun 1, 2023 · 2 comments

Comments

@cyboy22
Copy link

cyboy22 commented Jun 1, 2023

Hi,

I have just downloaded the code and tried to build it using the instructions. However, I get:

CMake Error at /usr/local/Cellar/cmake/3.26.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY
PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.26.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindPostgreSQL.cmake:225 (find_package_handle_standard_args)
CMakeLists.txt:11 (find_package)

I work on Mac and did the following:

export PostgreSQL_LIBRARY=/Library/PostgreSQL/13/lib/libpq.dylib
export PostgreSQL_INCLUDE_DIR=/Library/PostgreSQL/13/include
export PostgreSQL_TYPE_INCLUDE_DIR=/Library/PostgreSQL/13/include

but got the same message.
Could you suggest where I am going wrong?

Finallly, I attempted to include <ozo/connection_pool.h> but get the following message needing another include which I cannot find on my system:

Screenshot 2023-06-02 at 00 02 01

@JonasProgrammer
Copy link
Contributor

Hi,

not an 'official' author of the library, but I have done some stuff regarding packaging and CMake.

export PostgreSQL_LIBRARY=/Library/PostgreSQL/13/lib/libpq.dylib
export PostgreSQL_INCLUDE_DIR=/Library/PostgreSQL/13/include
export PostgreSQL_TYPE_INCLUDE_DIR=/Library/PostgreSQL/13/include

but got the same message. Could you suggest where I am going wrong?

Due to some changes in how PostgreSQL targets are provided by the package config, while still trying to support old CMake versions, the project is using a vendored FindPostgreSQL.cmake, that may not automatically recognize PG 13 installations (ll. 89-90). Manually specifying the library paths should work, but you'd need to declare them as CMake variables -- i.e. pass them via -DPostgreSQL_LIBRARY etc. during configuration. Providing an environment variable PostgreSQL_ROOT pointing to the installation base directory may also work.

Finallly, I attempted to include <ozo/connection_pool.h> but get the following message needing another include which I cannot find on my system:

Screenshot 2023-06-02 at 00 02 01

Did you perform a proper recursive clone? elsid/resource_pool should be checked out in contrib then and be picked up automatically.

@cyboy22
Copy link
Author

cyboy22 commented Jun 3, 2023

Hi - thanks it works now and my apologies for not following your documentation carefully.
The linker is still giving issues but that is not really a problem right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants