databases/mysql55-server, Error: shared library "mysqlclient.18" does not exist

L Campbell lcampbell at
Thu Jun 9 19:03:15 UTC 2011

For some reason, I can't compile databases/mysql55-server on a fresh
install; it errors out with

$ cd /usr/ports/databases/mysql55-server && make
===>   mysql-server-5.5.12 depends on file: /usr/local/bin/cmake - found
===>   mysql-server-5.5.12 depends on shared library: mysqlclient.18 - not found
===>    Verifying install for mysqlclient.18 in
===>   Returning to build of mysql-server-5.5.12
Error: shared library "mysqlclient.18" does not exist
*** Error code 1

The dependency on the library is set in Mk/

$ grep LIB_DEPENDS /usr/ports/Mk/ | grep mysqlclient

Checking, the library is installed, except in ${LOCALBASE}/lib/mysql --

$ find /usr/local/lib -name

For some reason, LIB_DEPENDS isn't checking any subdirectories of
${LOCALBASE}/lib; I'm not sure if it's meant to check in any
subdirectories. The quick fix I came up with is to symlink the library
in /usr/local/lib/mysql to /usr/local/lib, e.g.,

$ ln -s /usr/local/lib/mysql/

Which fixes the problem.

Can we change it such that either

1) The LIB_DEPENDS in checks the appropriate install
directory for the MySQL client libs


2) databases/mysqlX-client automatically symlinks the libraries into
/usr/local/lib so that the install scripts pick them up properly.

I can submit a PR and patches if necessary. Please CC me, as I am not
subscribed to ports at .

L Campbell.

More information about the freebsd-ports mailing list