Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jun 2011 13:32:51 -0500
From:      L Campbell <lcampbell@ironclad.mobi>
To:        ale@freebsd.org, ports@freebsd.org
Subject:   databases/mysql55-server, Error: shared library "mysqlclient.18" does not exist
Message-ID:  <BANLkTimMokGG3Qp-N_0JcHHnHfNHpj7Jeg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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
/usr/ports/databases/mysql55-client
===>   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/bsd.database.mk:

$ grep LIB_DEPENDS /usr/ports/Mk/bsd.database.mk | grep mysqlclient
LIB_DEPENDS+=	mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/${_MYSQL_CLIENT}

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

$ find /usr/local/lib -name libmysqlclient.so.18
/usr/local/lib/mysql/libmysqlclient.so.18

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/libmysqlclient.so.18
/usr/local/lib/libmysqlclient.so.18

Which fixes the problem.

Can we change it such that either

1) The LIB_DEPENDS in bsd.database.mk checks the appropriate install
directory for the MySQL client libs

or

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@.

Thanks!
L Campbell.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTimMokGG3Qp-N_0JcHHnHfNHpj7Jeg>