php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6476 configure cannot seem to find libmcrypt 2.4.4
Submitted: 2000-08-31 16:44 UTC Modified: 2000-08-31 22:24 UTC
From: carl at five-ten-sg dot com Assigned: derick (profile)
Status: Closed Package: Compile Failure
PHP Version: 4.0.2 OS: linux RH 5.0
Private report: No CVE-ID: None
 [2000-08-31 16:44 UTC] carl at five-ten-sg dot com
Using essentially the same scripts, php4.0.1pl2 builds nicely with libmcrypt 2.2.7. Let me know if there is anything else you need.

My script is here, see below for the config.log extract.

---------------
echo "build libmcrypt"
cd libmcrypt-2.4.4
    ./configure --prefix=/usr  \
                --disable-posix-threads
    make
    make check
    make install
cd ..


echo "config apache since we may have just unpacked it"
cd apache_1.3.12
./configure --prefix=/usr                \
            --sysconfdir=/etc/httpd      \
            --runtimedir=/var/run/httpd  \
            --logfiledir=/var/log/httpd  \
            --enable-module=all          \
            --enable-shared=max          \
            --disable-shared=frontpage   \
            --disable-shared=apache_ssl  \
            --activate-module=src/modules/php4/libphp4.a
cd ..

echo " "
echo "build php"
cd php-4.0.2
    rm -f config.cache
    ./configure --with-apache=/usr/src/apache_1.3.12\
                --enable-debug=no                   \
                --enable-track-vars=yes             \
                --enable-bcmath=yes                 \
                --enable-memory-limit=yes           \
                --with-imap                         \
                --with-ldap=/usr/src/openldap-1.2.11\
                --with-mysql=/usr                   \
                --with-mcrypt=/usr
    make install
cd ..



--------------
config.log extract:
configure:21153: checking for mcrypt support
configure:21240: checking for init_mcrypt in -lmcrypt
configure:21259: gcc -o conftest -g -O2  -Wl,-rpath,/usr/lib -L/usr/lib conftest.c -lmcrypt  -lldap -llber -lresolv -lm -ldl -lcrypt -lnsl  -lresolv 1>&5
ld: cannot open -lldap: No such file or directory
configure: failed program was:
#line 21248 "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 init_mcrypt();

int main() {
init_mcrypt()
; return 0; }
configure:21289: checking for mcrypt_module_open in -lmcrypt
configure:21308: gcc -o conftest -g -O2  -Wl,-rpath,/usr/lib -L/usr/lib conftest.c -lmcrypt  -lldap -llber -lresolv -lm -ldl -lcrypt -lnsl  -lresolv -lltdl 1>&5
ld: cannot open -lldap: No such file or directory
configure: failed program was:
#line 21297 "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 mcrypt_module_open();

int main() {
mcrypt_module_open()
; return 0; }

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-31 16:53 UTC] derick@php.net
Could you cut 'n paste the appriopriate piece of config.log?

 [2000-08-31 16:56 UTC] derick@php.net
Sorry, missed it in the report.

It seems that configure cannot find the ldap library. Please correct this, and try again.
 [2000-08-31 17:00 UTC] derick@php.net
And set it to feedback
 [2000-08-31 19:05 UTC] carl at five-ten-sg dot com
Note the with-ldap line on the ./configure statement.

Also, my system has:

ls -ald /usr/src/openldap-1.2.11/lib*
lrwxrwxrwx   1 root     root            9 Aug 28 13:33 lib -> libraries
drwxr-xr-x   9 root     root         1024 Aug 31 14:30 libraries
-rwxr-xr-x   1 root     root       117559 Aug 31 14:26 libtool


ls -al /usr/src/openldap-1.2.11/libraries
drwxr-xr-x   9 root     root         1024 Aug 31 14:30 .
drwxr-xr-x  10 root     root         1024 Aug 31 14:29 ..
-rw-r--r--   1 root     root         5645 Aug 31 14:28 Makefile
-rw-r--r--   1 root     root          222 Jan 13  1999 Makefile.in
drwxr-xr-x   3 root     root         1024 Aug 31 14:29 libavl
lrwxrwxrwx   1 root     root           15 Aug 28 13:25 libavl.a -> libavl/libavl.a
drwxr-xr-x   3 root     root         1024 Aug 31 14:29 liblber
lrwxrwxrwx   1 root     root           23 Aug 28 13:25 liblber.a -> liblber/.libs/liblber.a
lrwxrwxrwx   1 root     root           18 Aug 28 13:25 liblber.la -> liblber/liblber.la
drwxr-xr-x   3 root     root         3072 Aug 31 14:30 libldap
lrwxrwxrwx   1 root     root           23 Aug 31 14:30 libldap.a -> libldap/.libs/libldap.a
lrwxrwxrwx   1 root     root           18 Aug 31 14:30 libldap.la -> libldap/libldap.la
drwxr-xr-x   2 root     root         1024 Aug 31 14:29 libldbm
lrwxrwxrwx   1 root     root           17 Aug 28 13:27 libldbm.a -> libldbm/libldbm.a
drwxr-xr-x   2 root     root         1024 Aug 31 14:29 libldif
lrwxrwxrwx   1 root     root           17 Aug 28 13:25 libldif.a -> libldif/libldif.a
drwxr-xr-x   2 root     root         1024 Aug 31 14:29 liblthread
lrwxrwxrwx   1 root     root           23 Aug 28 13:27 liblthread.a -> liblthread/liblthread.a
drwxr-xr-x   2 root     root         1024 Aug 31 14:29 liblutil
lrwxrwxrwx   1 root     root           19 Aug 28 13:25 liblutil.a -> liblutil/liblutil.a
lrwxrwxrwx   1 root     root            9 Aug 31 11:56 libraries -> libraries

 [2000-08-31 20:00 UTC] carl at five-ten-sg dot com
Am I supposed to set the status back to open after adding my feedback?
 [2000-08-31 20:59 UTC] sniper@php.net
Why don't you do 'make install' in openldap-directory and change
--with-ldap=/usr/src.. to --with-ldap=/usr 
(or whatever the install dir is set for openldap) ???

I had similar problems when I tried to use the openldap-source directory 
in --with-ldap. But problems were gone after I changed it to point to where 
openldap libs and header files got installed.

--Jani


 [2000-08-31 22:24 UTC] carl at five-ten-sg dot com
Ah, that worked. I probably did not do the 'make install' in openldap, since I think in the earlier versions it was overwriting my config files. So my open ldap script manually moved the binaries into the proper places, but I did not move the libraries, just pointed directly at them with the 'with-ldap' in the php config. That worked just fine up until php 4.0.2.

With php 4.0.2, it works nicely to use 'with-ldap=/usr' and run the 'make install' in openldap.

Thanks for all your help!
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Jun 26 21:00:02 2026 UTC