Issue while icinga2 core build

Hi

Could you please help us with below issue?

We are facing the below error while building(make) Icinga2 (core) with source code.
pgsql has already been installed still we are getting this error

/bin/ld: cannot find -lpq
collect2: error: ld returned 1 exit status
make[2]: *** [Bin/Release/libpgsql_shim.so.2.11.2] Error 1
make[1]: *** [lib/pgsql_shim/CMakeFiles/pgsql_shim.dir/all] Error 2
make: *** [all] Error 2

Thanks&Regards
Srinivas

That means you’re missing a dependent library. What operating system/distribution is this?

1 Like

You can find more information on how to build icinga2 in the development chapter from the documentation.

https://icinga.com/docs/icinga2/latest/doc/21-development/

hi
Thanks you for your response. It is Linux and RHEL 7x.
We could see that lib files are available under pgsql folder /pgsql/lib/libpq.a, /pgsql/lib/libpq.so, /pgsql/lib/libpq.so.5.

Thanks&Regards
Srinivas

Hi

We could resolve the above issue by manually providing the libpq.so file path during compilation

Thanks&Regards
Srinivas