While trying to build PHP 5.3.3 on Debian jessie (save yourself some sanity by not asking why) with OpenSSL extension enabled, I encountered undefined reference to symbol 'X509_free@@OPENSSL_1.0.0'
in the linking step of the Makefile and couldn't figure out why (libssl-dev
is present and libssl.so
contains the requested symbol). I tried to build the official Debian package that was included in Debian squeeze, using a pbuilder
-based chroot-environment that contains a Debian jessie and therefore newer libraries (like OpenSSL 1.0.1 instead of 0.9.8). I confirmed that PHP 5.3.3 is compatible with OpenSSL 1.0.1 by building it outside the chroot-environment using ./configure --disable-all --with-openssl=/usr; make
. The resulting CGI- and CLI-binaries are indeed linked against OpenSSL, which can be confirmed via ldd sapi/cli/php
. And yet inside the chroot-environment, it failed.
Don't bother anwering, I already figured out most of the reason and a workaround/hack to enable a successful build.