Closed koji-k closed 4 years ago
I don't think this indicates lack of support for PostgreSQL, since the PQresultMemorySize
function is still present in that version according to the documentation. Some possible explanation could be that the postgresql
package was compiled for a different version of the library than what is loaded by utop. You can try ldd
on the .cmxs
files to see what will be linked in, though this does not tell which libraries they were originally compiled against. Note that LD_LIBRARY_PATH
if set will determine runtime linking, while compile-time linking may be determined by other mechanisms like pkg-config
and ad-hoc environment variables.
Another explanation could be that libpq
is not linked in at all, and the shown symbol just happens to be the one to trigger the error. Listing caqti-driver-postgresql
in the dune libraries should be sufficient, but try to also add postgresql
in case there is an issue with some of the META
files involved.
Thank you for your reply! This problem has resolved.
I had not set LD_LIBRARY_PATH. This was a reason of this problem. I compiled and installed PostgreSQL into a directory that is under the user home directory.
./configure --prefix=$HOME/opt/postgresql/12.1
make
make install
Then set $PGDATA
, and install caqti
via opam.
PostgreSQL 11 and 9 had no problem. But a problem occurred by 12 as i described in this issue.
Then i have set LD_LIBRARY_PATH
LD_LIBRARY_PATH=$HOME/opt/postgresql/12.1/lib
export LD_LIBRARY_PATH
dune utop
Now it is working all correct! Sorry. this problem was reasoned my PostgreSQL's environment.
Good you got it sorted out!
I try to use PostgreSQL Driver with PostgreSQL
12.1
There is no problem to install the libraries. But when i executedune utop
, appear following error.When it use PostgreSQL
11.6
, there is no problem. Does not yet this library support PostgreSQL12
?My denends entry on opam file is following.