php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54736 ext/openssl/xp_ssl.c:333: undefined reference to `SSLv2_client_method'
Submitted: 2011-05-15 01:08 UTC Modified: 2011-11-16 14:34 UTC
Votes:4
Avg. Score:4.5 ± 0.5
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:4 (100.0%)
From: bobvin at pillars dot net Assigned: felipe (profile)
Status: Closed Package: OpenSSL related
PHP Version: 5.3.6 OS: Linux
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: bobvin at pillars dot net
New email:
PHP Version: OS:

 

 [2011-05-15 01:08 UTC] bobvin at pillars dot net
Description:
------------
See Debian bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620776

Downloadable patch at http://tinyurl.com/3mrcary



Patches

compile-without-curl.txt (last revision 2011-05-17 12:57 UTC by bobvin at pillars dot net)
compile-with-curl.txt (last revision 2011-05-17 12:56 UTC by bobvin at pillars dot net)
debian_patches_disable_SSLv2_for_openssl_1_0_0.patch (last revision 2011-05-14 23:09 UTC by bobvin at pillars dot net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-15 14:21 UTC] bobvin at pillars dot net
Sorry; I must have cut-and-pasted the tinyurl link incorrectly.

The patch can be downloaded from http://tinyurl.com/5w3mnsl
which forwards to http://git.debian.org/?p=pkg-
php/php.git;a=blob_plain;f=debian/patches/disable_SSLv2_for_openssl_1_0_0.patch;h
b=HEAD
 [2011-05-15 14:26 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2011-05-15 14:26 UTC] pajoye@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2011-05-15 16:24 UTC] bobvin at pillars dot net
Got the following error when compiling the snapshot:

/usr/bin/ld.bfd.real: ext/openssl/openssl.o: undefined reference to symbol 
'SSL_free@@OPENSSL_1.0.0'
/usr/bin/ld.bfd.real: note: 'SSL_free@@OPENSSL_1.0.0' is defined in DSO 
/usr/lib/libssl.so.1.0.0 so try adding it to the linker command line
/usr/lib/libssl.so.1.0.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
 [2011-05-15 17:10 UTC] rasmus@php.net
I found and fixed this problem a couple of weeks ago with a patch very similar 
to the one you linked to. It builds fine on my Debian dev box which has the new 
libssl without SSLv2.

Do this for me:

8:09am new:~> dpkg -l | grep libssl
ii  libssl-dev                     1.0.0d-2                       SSL 
development libraries, header files and documentation
ii  libssl-doc                     1.0.0d-2                       SSL 
development documentation documentation
ii  libssl0.9.8                    0.9.8o-7                       SSL shared 
libraries
ii  libssl1.0.0                    1.0.0d-2                       SSL shared 
libraries

Let's see your installed ssl versions.
 [2011-05-15 20:25 UTC] bobvin at pillars dot net
root@www:~# dpkg -l | grep libssl
ii  libssl-dev                                      1.0.0d-2                       
SSL development libraries, header files and documentation
ii  libssl-doc                                      1.0.0d-2                       
SSL development documentation documentation
ii  libssl0.9.8                                     0.9.8o-7                       
SSL shared libraries
ii  libssl1.0.0                                     1.0.0d-2                       
SSL shared libraries
 [2011-05-15 20:28 UTC] bobvin at pillars dot net
Here's the config script I'm using:

#!/bin/sh
rm -rf cgi-build generated_lists autom4te.cache
touch *.in
./buildconf --force
mkdir cgi-build
cd cgi-build
CFLAGS="-Os -march=native -mtune=native -fno-strict-aliasing -fno-stack-
protector -U_FORTIFY_SOURCE -Wno-inline" \
CXXFLAGS="-Os -march=native -mtune=native -fno-strict-aliasing -fno-stack-
protector -U_FORTIFY_SOURCE -Wno-inline" \
LDFLAGS="-s" \
PROG_SENDMAIL="/usr/sbin/sendmail" \
../configure \
    --prefix=/usr \
    --enable-fd-setsize=1024 \
    --with-config-file-path=/etc/php5/cgi --with-config-file-scan-
dir=/etc/php5/cgi/conf.d \
    --sysconfdir=/etc \
    --mandir=/usr/share/man \
    --disable-debug \
    --disable-intl \
    --disable-ipv6 \
    --disable-magic-quotes \
    --disable-rpath \
    --disable-safe-mode \
    --disable-shmop \
    --disable-short-tags \
    --disable-wddx \
    --enable-apc --enable-apc-pthreadmutex --enable-apc-sem --disable-apc-mmap \
    --enable-bcmath \
    --enable-calendar \
    --enable-cgi \
    --enable-ctype \
    --enable-exif \
    --enable-fpm --with-libevent-dir=/usr --with-fpm-user=www-data --with-fpm-
group=www-data \
    --enable-ftp \
    --enable-gd-native-ttf --with-gd=/usr \
    --enable-igbinary \
    --enable-libxml --with-libxml-dir=/usr \
    --enable-mbstring \
    --enable-memcached --enable-memcached-igbinary \
    --enable-pdo \
    --enable-phar \
    --enable-posix \
    --enable-shmop \
    --enable-simplexml \
    --enable-soap \
    --enable-sockets \
    --enable-sysvmsg \
    --enable-sysvsem \
    --enable-sysvshm \
    --enable-xmlreader \
    --enable-xmlwriter \
    --enable-zend-multibyte \
    --enable-zip --with-zlib=/usr --with-zlib-dir=/usr \
    --with-curl=/usr \
    --with-freetype-dir=/usr \
    --with-gettext=/usr \
    --with-iconv \
    --with-imap=/usr --with-imap-ssl \
    --with-jpeg-dir=/usr \
    --with-layout=GNU \
    --with-mcrypt=/usr \
    --with-mhash=/usr \
    --with-mm=/usr \
    --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-
mysql-sock=/var/run/mysqld/mysqld.sock \
    --with-openssl=/usr --with-kerberos=/usr \
    --with-pcre-dir=/usr --with-pcre-regex=/usr \
    --with-pear=/usr/share/php \
    --with-pic \
    --with-png-dir=/usr \
    --with-pspell=/usr \
    --with-readline=/usr \
    --with-regex=php \
    --with-sqlite3 --with-pdo-sqlite \
    --with-t1lib=/usr \
    --with-xpm-dir=/usr/X11R6 \
    --with-xsl=/usr \
    --without-bz2 \
    --without-db4 --without-pdo-dblib \
    --without-enchant \
    --without-gdbm \
    --without-gmp \
    --without-ldap --without-ldap-sasl \
    --without-mssql \
    --without-onig \
    --without-pgsql --without-pdo-pgsql \
    --without-qdbm \
    --without-recode \
    --without-snmp \
    --without-sqlite \
    --without-sybase-ct \
    --without-tidy \
    --without-unixODBC --without-pdo-odbc \
    --without-xmlrpc \

make && sv stop php-fpm && make install
sv start php-fpm
 [2011-05-15 20:33 UTC] pajoye@php.net
Which linux distribution and which version of it do you use? Debian for what I can 
see, but which version?
 [2011-05-15 20:52 UTC] rasmus@php.net
I ran your configure script. The only difference is that it looks like you have 
hardwired some pecl extensions into your build tree. These flags were ignored in 
my build:

--enable-apc
--enable-apc-pthreadmutex
--enable-apc-sem
--disable-apc-mmap
--with-libevent-dir=/usr
--enable-igbinary
--enable-memcached
--enable-memcached-igbinary

and I was able to reproduce it. Note that with my configure options it works 
fine:


CFLAGS="-Os -march=native -mtune=native -fno-strict-aliasing
-fno-stack-
protector -U_FORTIFY_SOURCE -Wno-inline" \
CXXFLAGS="-Os -march=native -mtune=native -fno-strict-aliasing
-fno-stack-
protector -U_FORTIFY_SOURCE -Wno-inline" \
LDFLAGS="-s" \
PROG_SENDMAIL="/usr/sbin/sendmail" \
../configure \
    --prefix=/usr \
    --enable-fd-setsize=1024 \
    --with-config-file-path=/etc/php5/cgi --with-config-file-scan-
dir=/etc/php5/cgi/conf.d \
    --sysconfdir=/etc \
    --mandir=/usr/share/man \
    --disable-debug \
    --disable-intl \
    --disable-ipv6 \
    --disable-magic-quotes \
    --disable-rpath \
    --disable-safe-mode \
    --disable-shmop \
    --disable-short-tags \
    --disable-wddx \
    --enable-apc --enable-apc-pthreadmutex --enable-apc-sem
--disable-apc-mmap \
    --enable-bcmath \
    --enable-calendar \
    --enable-cgi \
    --enable-ctype \
    --enable-exif \
    --enable-fpm --with-libevent-dir=/usr --with-fpm-user=www-data
--with-fpm-
group=www-data \
    --enable-ftp \
    --enable-gd-native-ttf --with-gd=/usr \
    --enable-igbinary \
    --enable-libxml --with-libxml-dir=/usr \
    --enable-mbstring \
    --enable-memcached --enable-memcached-igbinary \
    --enable-pdo \
    --enable-phar \
    --enable-posix \
    --enable-shmop \
    --enable-simplexml \
    --enable-soap \
    --enable-sockets \
    --enable-sysvmsg \
    --enable-sysvsem \
    --enable-sysvshm \
    --enable-xmlreader \
    --enable-xmlwriter \
    --enable-zend-multibyte \
    --enable-zip --with-zlib=/usr --with-zlib-dir=/usr \
    --with-curl=/usr \
    --with-freetype-dir=/usr \
    --with-gettext=/usr \
    --with-iconv \
    --with-imap=/usr --with-imap-ssl \
    --with-jpeg-dir=/usr \
    --with-layout=GNU \
    --with-mcrypt=/usr \
    --with-mhash=/usr \
    --with-mm=/usr \
    --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd
--with-
mysql-sock=/var/run/mysqld/mysqld.sock \
    --with-openssl=/usr --with-kerberos=/usr \
    --with-pcre-dir=/usr --with-pcre-regex=/usr \
    --with-pear=/usr/share/php \
    --with-pic \
    --with-png-dir=/usr \
    --with-pspell=/usr \
    --with-readline=/usr \
    --with-regex=php \
    --with-sqlite3 --with-pdo-sqlite \
    --with-t1lib=/usr \
    --with-xpm-dir=/usr/X11R6 \
    --with-xsl=/usr \
    --without-bz2 \
    --without-db4 --without-pdo-dblib \
    --without-enchant \
    --without-gdbm \
    --without-gmp \
    --without-ldap --without-ldap-sasl \
    --without-mssql \
    --without-onig \
    --without-pgsql --without-pdo-pgsql \
    --without-qdbm \
    --without-recode \
    --without-snmp \
    --without-sqlite \
    --without-sybase-ct \
    --without-tidy \
    --without-unixODBC --without-pdo-odbc \
    --without-xmlrpc \

So, to save me some time, could you first verify that it builds fine on your box 
with my configure options, and second, could you go through the differences and 
figure out which one is causing this? I have already eliminated the pecl ones I 
listed initially since it still happens without those.
 [2011-05-15 20:56 UTC] rasmus@php.net
Damn, cut-and-paste casualty there. I pasted your options back in. Here are the 
working configure options that I use on my Debian box:

'./configure' \
'--with-apxs2=/usr/bin/apxs2' \
'--with-gd' \
'--enable-calendar' \
'--with-jpeg-dir=/usr' \
'--with-freetype-dir=/usr' \
'--enable-gd-native-ttf' \
'--with-freetype-dir=/usr' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--enable-exif' \
'--with-config-file-path=/etc' \
'--with-mysql=/usr' \
'--with-zlib' \
'--with-zlib-dir=/usr' \
'--with-gettext' \
'--with-kerberos' \
'--with-mcrypt=/usr/local' \
'--with-ldap' \
'--with-iconv' \
'--enable-sockets' \
'--with-openssl' \
'--with-imap' \
'--with-imap-ssl' \
'--with-pspell' \
'--with-pdo-mysql=/usr' \
'--with-pdo-sqlite' \
'--enable-soap' \
'--enable-xmlreader' \
'--with-xsl' \
'--enable-ftp' \
'--enable-cgi' \
'--with-curl=/usr' \
'--with-tidy' \
'--with-xmlrpc' \
'--enable-mbstring' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-shmop' \
'--with-readline' \
'--with-mysqli=/usr/bin/mysql_config' \
'--prefix=/usr/local' \
'--enable-zip' \
 [2011-05-17 12:58 UTC] bobvin at pillars dot net
-Status: Feedback +Status: Open
 [2011-05-17 12:58 UTC] bobvin at pillars dot net
To answer your question, I'm running Debian (squeeze/sid) with a few packages 
custom-compiled:

  runit
  nginx
  php
  memcached
  mariadb

Confirmed that your configuration compiles successfully on my server.

I'm trying to produce the smallest possible config script that reproduces the 
error on my server, but it will take some time, as each compile takes 20-30 min. 
to either succeed or fail.
 [2011-05-17 14:43 UTC] bobvin at pillars dot net
Okay; here's a minimal script that produces an error:


mkdir testbuild
cd testbuild
curl http://snaps.php.net/php5.3-latest.tar.gz | tar -zx
cd php*
./configure \
  --with-curl=/usr \
  --with-openssl=/usr \
  --without-ldap \
&& make

And here's the error it produces:


/usr/bin/ld.bfd.real: ext/openssl/openssl.o: undefined reference to symbol 
'SSL_free@@O\
PENSSL_1.0.0'
/usr/bin/ld.bfd.real: note: 'SSL_free@@OPENSSL_1.0.0' is defined in DSO 
/usr/lib/libssl\
.so.1.0.0 so try adding it to the linker command line
/usr/lib/libssl.so.1.0.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1


Here's another interesting one:


mkdir testbuild
cd testbuild
curl http://snaps.php.net/php5.3-latest.tar.gz | tar -zx
cd php*
./configure \
  --with-openssl=/usr \
  --without-ldap \
&& make

Taking away the "--with-curl" option produces a huge series of errors that are 
too volumnious to list.  I'll attach them separately.
 [2011-11-16 14:34 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2011-11-16 14:34 UTC] felipe@php.net
It seems already fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 16:01:29 2024 UTC