BenV's notes

PHP – Produces Horrible Problems

by on Oct.27, 2009, under Software

That IS what it stands for, right?
Or maybe the last P is for Programs….. oh no, silly me. It’s for PEOPLE. Now I get it.
Anyway, the quote of the day:

configure: error: There is something wrong. Please check config.log for more information.

But let’s not get angry yet, I’m sure it’ll throw more tantrums at us while we try to chunk it together.
In case you’re wondering, I’m trying to configure php so it has curl support. Apparently php’s configure has decided for me that in order to have curl support, it also requires ldap.

configure:26607: checking for curl_easy_perform in -lcurl
configure:26626: gcc -o conftest -g -O2 -lcurl -lidn -lssl -lcrypto -lldap -lrt -lssl -lcrypto -ldl -lz conftest.c -lcurl -lcurl -lbz2 -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl -lxm
l2 -lz -lm -lcurl -lidn -lssl -lcrypto -lldap -lrt -lssl -lcrypto -ldl -lz 1>&5 /usr/lib/gcc/i486-slackware-linux/4.3.3/../../../../i486-slackware-linux/bin/ld: cannot find -lldap
collect2: ld returned 1 exit status

Then don’t configure it with ldap support!
I didn’t. In fact, I explicity told it NOT to support ldap. –without-ldap. Doesn’t matter. Somehow it picked up the requirement to include ldap in the tests. After some searching I found out that the real source for this problem is the curl-config script:

# /usr/bin/curl-config --libs
-lcurl -lidn -lssl -lcrypto -lldap -lrt -lssl -lcrypto -ldl -lz

Note the -lldap there. So basically this is Slackware’s fault. Meh.

Solution 1:
* Get rid of ldap in curl. This involves recompiling curl from source.
Solution 2: Probably the easiest way is to hack curl-config
sed -ie 's/-lldap//' /usr/bin/curl-config
Solution 3:
* Install the openldap-client package. However, now you have ldap on your system which you probably don’t use on a webserver.

I went for solution 1, recompiling it myself from the slackware sources:

# cd /usr/src
# lftp
cd ok, cwd=/pub/os/Linux/distr/slackware/slackware-13.0/source/n
lftp> mirror curl
# cd curl
# sed -ie 's/configure/configure --disable-ldap --disable-ldaps/' curl.SlackBuild
# bash curl.Slackbuild

After upgrading the curl package with this build it worked for me without the ldap nonsense.

:, , ,

1 Comment for this entry

Leave a Reply

You must be logged in to post a comment.


  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)