php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55521 configure error, cannot find -lmysqlclient, with MySQL-shared-compat 5.5
Submitted: 2011-08-27 22:07 UTC Modified: 2011-08-29 23:17 UTC
From: fuxa_kos at unihost dot cz Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.3.8 OS: CentOS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fuxa_kos at unihost dot cz
New email:
PHP Version: OS:

 

 [2011-08-27 22:07 UTC] fuxa_kos at unihost dot cz
Description:
------------
'./configure' \
'--prefix=/usr/local/php538' \
'--with-config-file-path=/etc' \
'--with-apxs2=/usr/local/apache/bin/apxs' \
'--with-libdir=lib64' \
'--disable-all' \
'--enable-bcmath' \
'--enable-ctype' \
'--enable-filter' \
'--with-iconv' \
'--enable-intl' \
'--enable-mbstring' \
'--enable-mbregex' \
'--with-mysql=/usr' \
'--with-mysqli=/usr/bin/mysql_config' \
'--with-pcre-regex' \
'--with-regex' \
'--enable-session' \
'--with-zlib' \
"$@"


rpm -qa |grep MySQL
MySQL-client-community-5.1.58-1.rhel5
MySQL-server-community-5.1.58-1.rhel5
MySQL-shared-compat-5.5.15-1.rhel5
MySQL-devel-community-5.1.58-1.rhel5



ls /usr/lib64/*mysql*
/usr/lib64/libmysqlclient_r.so.12      /usr/lib64/libmysqlclient_r.so.16      /usr/lib64/libmysqlclient.so.15
/usr/lib64/libmysqlclient_r.so.12.0.0  /usr/lib64/libmysqlclient_r.so.16.0.0  /usr/lib64/libmysqlclient.so.15.0.0
/usr/lib64/libmysqlclient_r.so.14      /usr/lib64/libmysqlclient.so.12        /usr/lib64/libmysqlclient.so.16
/usr/lib64/libmysqlclient_r.so.14.0.0  /usr/lib64/libmysqlclient.so.12.0.0    /usr/lib64/libmysqlclient.so.16.0.0
/usr/lib64/libmysqlclient_r.so.15      /usr/lib64/libmysqlclient.so.14
/usr/lib64/libmysqlclient_r.so.15.0.0  /usr/lib64/libmysqlclient.so.14.0.0

/usr/lib64/mysql:
libdbug.a  libmygcc.a   libmyisammrg.a    libmysqlclient.la   libmysqlclient_r.la  libmysys.a  libz.a   mysqld-debug.sym  plugin
libheap.a  libmyisam.a  libmysqlclient.a  libmysqlclient_r.a  libmystrings.a       libvio.a    libz.la  mysqld.sym



checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.


tail ... config.log
configure:59800: checking for MySQL support
configure:59844: checking for specified location of the MySQL UNIX socket
configure:60042: checking for mysql_close in -lmysqlclient
configure:60061: gcc -o conftest -I/usr/include -g -O2 -fvisibility=hidden  -L/usr/lib64  conftest.c -lmysqlclient  -lz -lrt -lm -ldl -lnsl  -licui18n -licuuc -licudata -lm -licuio 1>&5
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 60050 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_close();

int main() {
mysql_close()
; return 0; }
configure:60284: checking for mysql_error in -lmysqlclient
configure:60303: gcc -o conftest -I/usr/include -g -O2 -fvisibility=hidden  -L/usr/lib64  -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient  -lz -lz -lrt -lm -ldl -lnsl  -licui18n -licuuc -licudata -lm -licuio 1>&5
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 60292 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_error();

int main() {
mysql_error()
; return 0; }

Test script:
---------------
see Description

Expected result:
----------------
configure without error

Actual result:
--------------
configure exit with error

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-29 08:23 UTC] johannes@php.net
-Status: Open +Status: Bogus
 [2011-08-29 08:23 UTC] johannes@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Hi, you seem not to have the symlink /usr/lib64/libmysqlclient.so which should be contained in MySQL-shared. If not this seems to be an issue by your rpm vendor. (Oracle's version has it)
Please also mind that you have MySQL-devel (which contains headers and static lib files) in version 5.1 but MySQL-shared (which contains dynamic libraries) in version 5.5 -- this can cause incompatibilities.
 [2011-08-29 21:10 UTC] fuxa_kos at unihost dot cz
Hi, you are right, I know /usr/lib64/libmysqlclient.so doesn't exists.

But this is !!! standard Mysql from Oracle
Vendor: Oracle and/or its affiliates

Incompatibilities - but this is MySQL-shared-__compat__ ... and some description from rpm -qi MySQL-shared-compat
Summary     : MySQL shared client libraries for MySQL 5.1.58-1, 5.0.94-1, 4.1.23-0, 4.0.27-0, 3.23.58-1

But in Percona Mysql this link exists
rpm -qf /usr/lib64/libmysqlclient.so
Percona-Server-shared-55-5.5.14-rel20.5.149.rhel5

It's bad when doesn't work with standard Mysql RPM's for RHEL, but it is primarily Mysql bug.
 [2011-08-29 23:17 UTC] johannes@php.net
You said "Summary: MySQL shared client libraries for MySQL 5.1.58-1, 5.0.94-1, 4.1.23-0, 4.0.27-0, 3.23.58-1" - There is 5.5 missing. You need the shared client libraries for MySQL 5.5. Those ones are there for compatibility with applications linked against older versions.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon May 23 09:05:45 2022 UTC