php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31388 configure doesn't find MySQL libs
Submitted: 2005-01-03 14:18 UTC Modified: 2005-01-10 07:56 UTC
From: ruempler at topconcepts dot de Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.0.3 OS: Fedora Core 2
Private report: No CVE-ID: None
 [2005-01-03 14:18 UTC] ruempler at topconcepts dot de
Description:
------------
PHP 5.0.3 does not find the MySQL libraries in configure. PHP 5.0.1 on the same machine compiled without any problems. Adding zlib-dir as mentioned below does *not* help (same config.log errors)-

Reproduce code:
---------------
#! /bin/sh
#
# Created by configure

'./configure' \
'--prefix=/usr' \
'--with-mysql=/usr' \
'--with-apxs2=/usr/sbin/apxs' \
'--enable-soap' \
"$@"

Actual result:
--------------
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... no
checking for mysql_errno in -lmysqlclient... no
configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information.


config.log:

configure:53830: checking for MySQL support
configure:53876: checking for specified location of the MySQL UNIX socket
configure:53933: checking for MySQL UNIX socket location
configure:54089: checking for mysql_close in -lmysqlclient
configure:54108: gcc -o conftest -g -O2   conftest.c -lmysqlclient  -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 54097 "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:54470: checking for mysql_errno in -lmysqlclient
configure:54489: gcc -o conftest -g -O2   conftest.c -lmysqlclient  -lz -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 54478 "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_errno();

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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-03 23:02 UTC] iliaa@php.net
What does ls -l /usr/lib/*mysql* show?
 [2005-01-04 07:51 UTC] ruempler at topconcepts dot de
# l /usr/lib/mysql
total 5500
drwxr-xr-x   2 root root    4096 Nov 18 16:56 .
drwxr-xr-x  27 root root   16384 Jan  1 04:02 ..
-rw-r--r--   1 root root   11002 Oct 25 04:50 libdbug.a
-rw-r--r--   1 root root   43406 Oct 25 04:50 libheap.a
-rw-r--r--   1 root root   15254 Oct 25 04:50 libmerge.a
-rw-r--r--   1 root root  879270 Oct 25 04:42 libmygcc.a
-rw-r--r--   1 root root  318900 Oct 25 04:50 libmyisam.a
-rw-r--r--   1 root root   27522 Oct 25 04:50 libmyisammrg.a
-rw-r--r--   1 root root 1192676 Oct 25 04:50 libmysqlclient.a
-rwxr-xr-x   1 root root     849 Oct 25 04:50 libmysqlclient.la
-rw-r--r--   1 root root 1200478 Oct 25 04:50 libmysqlclient_r.a
-rwxr-xr-x   1 root root     871 Oct 25 04:50 libmysqlclient_r.la
-rw-r--r--   1 root root  958614 Oct 25 04:50 libmystrings.a
-rw-r--r--   1 root root  258032 Oct 25 04:50 libmysys.a
-rw-r--r--   1 root root  101604 Oct 25 04:50 libnisam.a
-rw-r--r--   1 root root    6038 Oct 25 04:50 libvio.a
-rw-r--r--   1 root root  530745 Oct 25 04:50 mysqld.sym


]# l /usr/include/mysql/
total 400
drwxr-xr-x   2 root root  4096 Nov 18 16:56 .
drwxr-xr-x  33 root root  4096 Dec 31 04:30 ..
-rw-r--r--   1 root root  4544 Oct 25 04:50 chardefs.h
-rw-r--r--   1 root root  3375 Oct 25 04:50 errmsg.h
-rw-r--r--   1 root root  9472 Oct 25 04:50 history.h
-rw-r--r--   1 root root  6612 Oct 25 04:50 keycache.h
-rw-r--r--   1 root root  3529 Oct 25 04:50 keymaps.h
-rw-r--r--   1 root root 17552 Oct 25 04:50 m_ctype.h
-rw-r--r--   1 root root  8073 Oct 25 04:50 m_string.h
-rw-r--r--   1 root root  1858 Oct 25 04:50 my_alloc.h
-rw-r--r--   1 root root 26975 Oct 25 04:50 my_config.h
-rw-r--r--   1 root root  3370 Oct 25 04:50 my_dbug.h
-rw-r--r--   1 root root  3509 Oct 25 04:50 my_dir.h
-rw-r--r--   1 root root  3000 Oct 25 04:50 my_getopt.h
-rw-r--r--   1 root root 38630 Oct 25 04:50 my_global.h
-rw-r--r--   1 root root  1518 Oct 25 04:50 my_list.h
-rw-r--r--   1 root root  3588 Oct 25 04:50 my_net.h
-rw-r--r--   1 root root  1245 Oct 25 04:50 my_no_pthread.h
-rw-r--r--   1 root root 24502 Oct 25 04:50 my_pthread.h
-rw-r--r--   1 root root  1784 Oct 25 04:50 my_semaphore.h
-rw-r--r--   1 root root 15042 Oct 25 04:50 mysql_com.h
-rw-r--r--   1 root root 11315 Oct 25 04:50 mysqld_error.h
-rw-r--r--   1 root root  1241 Oct 25 04:50 mysql_embed.h
-rw-r--r--   1 root root 27526 Oct 25 04:50 mysql.h
-rw-r--r--   1 root root  1559 Oct 25 04:50 mysql_time.h
-rw-r--r--   1 root root   798 Oct 25 04:50 mysql_version.h
-rw-r--r--   1 root root 31454 Oct 25 04:50 my_sys.h
-rw-r--r--   1 root root  2007 Oct 25 04:50 my_xml.h
-rw-r--r--   1 root root  5828 Oct 25 04:50 raid.h
-rw-r--r--   1 root root 32081 Oct 25 04:50 readline.h
-rw-r--r--   1 root root  3751 Oct 25 04:50 rlmbutil.h
-rw-r--r--   1 root root  9687 Oct 25 04:50 rlprivate.h
-rw-r--r--   1 root root  1385 Oct 25 04:50 rlshell.h
-rw-r--r--   1 root root  2789 Oct 25 04:50 rltypedefs.h
-rw-r--r--   1 root root  1751 Oct 25 04:50 sql_common.h
-rw-r--r--   1 root root  6401 Oct 25 04:50 sql_state.h
-rw-r--r--   1 root root  1055 Oct 25 04:50 sslopt-case.h
-rw-r--r--   1 root root  1883 Oct 25 04:50 sslopt-longopts.h
-rw-r--r--   1 root root   970 Oct 25 04:50 sslopt-vars.h
-rw-r--r--   1 root root  3022 Oct 25 04:50 tilde.h
-rw-r--r--   1 root root  1235 Oct 25 04:50 typelib.h
-rw-r--r--   1 root root  1439 Oct 25 04:50 xmalloc.h


The libs/incs are from MySQL 4.0.20 source installation.
 [2005-01-10 02:21 UTC] sniper@php.net
Badly installed mysql.

 [2005-01-10 07:56 UTC] ruempler at topconcepts dot de
And why then it worked with 5.0.1?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 05:01:29 2024 UTC