[GRASS5] configure mysql

Glynn Clements glynn.clements at virgin.net
Wed Jan 15 21:04:29 EST 2003

Radim Blazek wrote:

> I cannot configure grass51 for mysql:
> ./configure 
> -with-mysql-libs=/amd/ssi0/ssi/blazek/janacek0/mysql/mysql-3.23.54a-pc-linux-i686/lib/
> =>
> checking for location of MySQL library... 
> /amd/ssi0/ssi/blazek/janacek0/mysql/mysql-3.23.54a-pc-linux-i686/lib/
> checking for mysql_query in -lmysqlclient... no
> configure: error: *** Unable to locate MySQL library.
> I have 
> /amd/ssi0/ssi/blazek/janacek0/mysql/mysql-3.23.54a-pc-linux-i686/lib/libmysqlclient.a
> nm libmysqlclient.a | grep mysql_query   
> 000021d8 T mysql_query
> only, no shared libraries in binary distribution of mysql.
> What is the correct solution for this situation?

Examine config.log to find out exactly why the check failed.

The most common reason for a library check failing is that the library
(in this case, libmysqlclient) requires symbols from some other
library, but that library isn't being included in the link command.

Similarly, the most common reason for a header check failing is that
the header includes some other header, but that header can't be found.

Ultimately, configure runs a command (preprocess, compile or link),
and checks whether the command succeeds or fails (for preprocessing,
it checks whether the command generates any output; if it does, this
is deemed to be a failure). It doesn't attempt to determine the
precise cause of the failure, so there's no difference between a
missing library and any other link failure, or a missing header and
any other preprocessor failure.

In the case of libraries which don't have dependency information
(static libraries never have dependency information, shared libraries
may or may not), the only solution is to try all of the "likely"
dependencies. This depends upon feedback as to exactly which
dependencies are likely.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list