php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37388 Missing SSL support
Submitted: 2006-05-09 20:52 UTC Modified: 2006-07-27 00:00 UTC
Votes:9
Avg. Score:4.7 ± 0.5
Reproduced:9 of 9 (100.0%)
Same Version:7 (77.8%)
Same OS:3 (33.3%)
From: s dot s at terra dot com dot br Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.1.4 OS: Slackware Linux 10.2
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: s dot s at terra dot com dot br
New email:
PHP Version: OS:

 

 [2006-05-09 20:52 UTC] s dot s at terra dot com dot br
Description:
------------
Configure step stops when check for mysqlcli lib usability.

I think its missing the SSL support on mysqli or the configure check is gessing something wrong (like link to the system libs) or its a mysql issue (if so, Im posting it on the wrong place ;)

p.s. The problem only occurs before MySQL 5.0.20 (in this version was included SSL support for the cli)

Reproduce code:
---------------
./configure --prefix=/usr \
  --sysconfdir=/etc \
  --with-apxs2 \
  --with-config-file-path=/etc/apache \
  --disable-ipv6 \
  --enable-sockets \
  --with-zlib \
  --with-bz2 \
  --with-openssl \
  --enable-calendar \
  --enable-dba \
  --enable-ftp \
  --with-dom \
  --with-dom-xslt \
  --with-dom-exslt \
  --with-gdbm \
  --with-db3 \
  --with-inifile \
  --enable-soup \
  --enable-gd-native-ttf \
  --with-gettext \
  --with-mime-magic \
  --with-mysql-sock \
  --with-mysql=/usr/local/mysql \
  --with-pdo-mysql=/usr/local/mysql \
  --with-mysqli=/usr/local/mysql/bin/mysql_config \
  --with-xmlrpc \
  --with-xslt \
  --with-iconv \
  --enable-memory-limit \
  --enable-zend-multibyte


Expected result:
----------------
No compilation errors ;)

Actual result:
--------------
From config.log:

[Many messages like]
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-algebra.o)(.gnu.linkonce.d.__vt_Q28TaoCrypt23AbstractEuclideanDomain+0x40): more undefined references to `__pure_virtual' follow
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-file.o)(.text+0x64): In function `TaoCrypt::FileSource::~FileSource(void)':
: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-file.o)(.text+0x200): In function `TaoCrypt::FileSink::~FileSink(void)':
: undefined reference to `__builtin_delete'
collect2: ld returned 1 exit status
configure: failed program was:
#line 58781 "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; }

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-15 21:55 UTC] tony2001@php.net
Can't reproduce it.
Please put the whole error output in the net, not just the end of it.
Though, it looks like a misconfiguration/miscompilation. At least these "undefined references to `__pure_virtual'" clearly show that you have a problem in your system.
 [2006-05-16 01:17 UTC] s dot s at terra dot com dot br
Hi, you can see the full config.log file on:
http://lhotian.no-ip.org:8000/php/config.log

Machine setup to reproduce the error:

Apache 2.2.2 (untested on other versions, but thats not the point)
PHP 5.1.4 (tested with 5.1.3 and got the same error)
MySQL 5.0.21 (binary standard) (tested with 5.0.20 and 5.0.20a and got the same error)

It compiles clearly with MySQL 5.0.19 (binary standard), using the same setup.
 [2006-05-16 06:28 UTC] tony2001@php.net
Please remove libmysqlclient.a and try again.
See http://bugs.mysql.com/bug.php?id=4921 for details.
 [2006-05-17 00:56 UTC] s dot s at terra dot com dot br
Step 1: Remove the libmysqlclient.a
Step 2: Try to run configure again on PHP 5.1.4 source tree

-------------------------------------------------------
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... yes
checking for MySQL UNIX socket location... /tmp/mysql.sock
configure: error: Cannot find libmysqlclient under /usr/local/mysql.
Note that the MySQL client library is not bundled anymore!
-------------------------------------------------------
 [2006-05-17 01:02 UTC] s dot s at terra dot com dot br
Partial fix:

Reading better the suggested bug http://bugs.mysql.com/bug.php?id=4921 I start trying to compile the mysql_error() check by hand.

conftest.c
-------------
#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; }
-------------

Compilation commandline (configure generated): gcc -o conftest conftest.c -I/usr/include -g -O2 -pthread  -D_REENTRANT -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/lib -L/usr/lib  -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr -L/usr -lmysqlclient  -lz -lgd -lfreetype -lpng -lz -ljpeg -ldb-3.3 -ldb-3.3 -lgdbm -lbz2 -lz -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lssl -lcrypto -ldl -lxml2 -lz -lm -lssl -lcrypto -ldl

Working compilation line: gcc -o conftest conftest.c -I/usr/include -g -O2 -pthread  -D_REENTRANT -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/lib -L/usr/lib  -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr -L/usr -lmysqlclient  -lz -lgd -lfreetype -lpng -lz -ljpeg -ldb-3.3 -ldb-3.3 -lgdbm -lbz2 -lz -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lssl -lcrypto -ldl -lxml2 -lz -lm -lssl -lcrypto -ldl -lmygcc

Note the -lmygcc to link with this library on the working compilation line. I gess we need to change the configure to check its presence for MySQL versions over 5.0.20

Compilation status: UNTESTED

I will try to change the configure (Im not familiar with configure/Makefile scripts) to use the mygcc library on linking process.
 [2006-05-17 01:37 UTC] s dot s at terra dot com dot br
I have try to change the configure script, but it dont work. May its becose my poor skills on sh scripting :\

Digging the mysql bug database I have found the same bug reported, if it can help...
http://bugs.mysql.com/bug.php?id=19817
 [2006-05-26 02:30 UTC] sfm_home at yahoo dot com
Thanks for the -lmygcc workaround.  It did the trick for me on RedHat 8 (gcc-3.2-7) with MySQL 5.0.21 and PHP 5.1.4, but I had to edit the Makefile to append -lmygcc to both EXTRA_LIBS and MYSQL_LIBS.  If I did not append it to MYSQL_LIBS, the make completed; but I got a runtime error starting Apache (1.3.32) and needed to start over with make clean first and then make.  The runtime error I saw is

Syntax error on line 205 of /www/conf/httpd.conf:
Cannot load /www/libexec/libphp5.so into server: /www/libexec/libphp5.so: undefined symbol: __builtin_delete
 [2006-06-29 04:53 UTC] helpdesk at oakbrookwalk dot com
I have the nearly same issue with php 5.1.4 and mysql 5.0.20 and above. I can get it to configure just fine now, but when I  attempt to "make" I get failures with "undefined references".  These are related to libmysqlclient.a...

collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

Any ideas?
 [2006-07-27 00:00 UTC] sniper@php.net
This is not any PHP bug, please report to Mysql.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 08 06:05:52 2022 UTC