willbryant/kitchen_sync

/usr/bin/ld: cannot find -lpq

Closed this issue · 2 comments

denji commented
cmake -DCMAKE_BUILD_TYPE=Release \
  -DPostgreSQL_VERSION_STRING=11 \
  -DPostgreSQL_INCLUDE_DIR=/opt/pgpro/std-11/include/ \
  -DPostgreSQL_LIBRARY_DIR=/opt/pgpro/std-11/lib/ .. && \
 make -j4 && \
 make install

Built target ks_bench
Built target yaml-cpp
Built target ks_unit_tests
Linking CXX executable ks_postgresql
[ 88%] Built target ks_mysql
/usr/bin/ld: cannot find -lpq

# ls -1 /opt/pgpro/std-11/lib/libpq*
/opt/pgpro/std-11/lib/libpq.a
/opt/pgpro/std-11/lib/libpq.so
/opt/pgpro/std-11/lib/libpq.so.5
/opt/pgpro/std-11/lib/libpq.so.5.11
/opt/pgpro/std-11/lib/libpqwalreceiver.so

# rpm -qa | grep postgrespro
postgrespro-std-11-libs-11.4.1-1.el7.x86_64
postgrespro-std-11-server-11.4.1-1.el7.x86_64
postgrespro-std-11.centos.yum-11-0.2.noarch
postgrespro-std-11-client-11.4.1-1.el7.x86_64
postgrespro-std-11-contrib-11.4.1-1.el7.x86_64
postgrespro-std-11-jit-11.4.1-1.el7.x86_64
postgrespro-std-11-pgprobackup-11.4.1-1.el7.noarch
postgrespro-std-11-devel-11.4.1-1.el7.x86_64
postgrespro-std-11-11.4.1-1.el7.x86_64

# rpm -qa | grep -v mongo | grep percona-server
percona-server-devel-8.0.15-6.1.el7.x86_64
percona-server-rocksdb-8.0.15-6.1.el7.x86_64
percona-server-shared-8.0.15-6.1.el7.x86_64
percona-server-server-8.0.15-6.1.el7.x86_64
percona-server-shared-compat-8.0.15-6.1.el7.x86_64
percona-server-client-8.0.15-6.1.el7.x86_64
denji commented
# ln -s /opt/pgpro/std-11/lib/libpq.so /usr/lib64/libpq.so
# cmake -DCMAKE_BUILD_TYPE=Release \
  -DPostgreSQL_VERSION_STRING=11 \
  -DPostgreSQL_INCLUDE_DIR=/opt/pgpro/std-11/include/ \
  -DPostgreSQL_LIBRARY_DIR=/opt/pgpro/std-11/lib/ .. && \
 make -j4 && \
 rm -f /usr/lib64/libpq.so && \
 make install

No idea what's going on there. What version of cmake?