Ubuntu

FTBFS on natty: SASL LDAP check fails (and other DSO problems)

Reported by Clint Byrum on 2010-11-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: php5

php5 fails to build from source on natty right now, needs several patches to build linking system to get it building.

checking for sasl_version in -lldap... no
configure: error: LDAP SASL check failed. Please check config.log for more information.
make: *** [configure-apache2-stamp] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2

ext/zip/lib/.libs/zip_dirent.o: In function `_zip_dirent_read':
/home/clint/pkg/php5/bzr/build-area/php5-5.3.3/ext/zip/lib/zip_dirent.c:478: warning: memset used with constant zero length parameter; this could be due to transposed parameters
/home/clint/pkg/php5/bzr/build-area/php5-5.3.3/ext/zip/lib/zip_dirent.c:478: warning: memset used with constant zero length parameter; this could be due to transposed parameters
/usr/bin/ld.bfd.real: ext/openssl/.libs/openssl.o: undefined reference to symbol 'X509_free@@OPENSSL_0.9.8'
/usr/bin/ld.bfd.real: note: 'X509_free@@OPENSSL_0.9.8' is defined in DSO /lib64/libcrypto.so.0.9.8 so try adding it to the linker command line
/lib64/libcrypto.so.0.9.8: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

Changed in php5 (Ubuntu):
assignee: nobody → Clint Byrum (clint-fewbar)
status: New → In Progress
Matthias Klose (doko) wrote :

the patch may be wrong.

the original problem is:

configure:56654: checking for sasl_version in -lldap
configure:56679: powerpc64-linux-gnu-gcc -o conftest -I/usr/include -g -O2 -O2 -Wall -fsigned-char -fno-strict-aliasing -g -fvisibility=hidden -I/usr/include -L/usr/lib -Wl,-Bsymbolic-functions -lldap -llber -lsasl2 conftest.c -lldap -lssl -ldb -lbz2 -lz -lpcre -lssl -lm -ldl -lnsl -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lxml2 -lldap -llber >&5
/tmp/ccN9qAWO.o: In function `main':
/home/doko/packages/php5-5.3.3/apache2-build/conftest.c:332: undefined reference to `sasl_version'
collect2: ld returned 1 exit status

here "-lldap -llber -lsasl2" are added *before* the object. There seems to be something wrong with the configure macro(s).

Clint Byrum (clint-fewbar) wrote :

Right, that was the original fail message. The problem is the ldap module's configuration checks for sasl_version *in libldap* but it is a function that should only be in libsasl2. Right after that, the extension adds sasl2, not ldap:

  PHP_CHECK_LIBRARY(ldap, sasl_version,
  [
    PHP_ADD_INCLUDE($LDAP_SASL_INCDIR)
    PHP_ADD_LIBRARY_WITH_PATH(sasl2, $LDAP_SASL_LIBDIR, LDAP_SHARED_LIBADD)
    AC_DEFINE(HAVE_LDAP_SASL, 1, [LDAP SASL support])
  ], [
    AC_MSG_ERROR([LDAP SASL check failed. Please check config.log for more information.])

Hence changing it to check against libsasl2... before adding.. libsasl2.

Changed in php5 (Ubuntu):
status: In Progress → Fix Released
assignee: Clint Byrum (clint-fewbar) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.