libmcrypt install probs (Quite long - sorry)
| From: | Alan Lord | Date: | Fri, 01 Dec 2000 10:18:24 +0000 |
| Subject: | libmcrypt install probs (Quite long - sorry) | ||
| Groups: | php.general php.install | ||
| Request: | Send a blank email to php-general+get-28183@lists.php.net to get a copy of this message | ||
Hi Gang(s),
I'm installing a brand new system with php-4.0.3pl1, apache-1.3.14, and other libraries.... on a Linux 2.2.17 LFS (Linux From Scratch) system. All works except libmcrypt....
I've got and tried libmcrypt 2.2.x and 2.4.4, 2.4.5, 2.4.7.
Can't get any of them to work. I get through the ./configure O.K. and there isn't anything problematic in the config.log.
When I do my "make" however, I get messages very similar to these copied from an old mailing list entry from Rasmus (See, I have searched for other stuff before posting ;-))
===============================old posting===========================
List: php-generalSubject: Re: [PHP3] mcrypt problems (functions/mcrypt.c outdated?)
From: Rasmus Lerdorf <rasmus@lerdorf.on.ca>Date: 1999-11-25 12:37:31[Download message RAW]
gcc -g -O2 -O2 -I. -I. -I../apache_1.3.9/src/include==============================snip==================================== Now, I have found that Lance (below) seems to have worked out what the problem is. Only problem is, I am not knowledgeable enough about C and the like to make the changes (read: I really haven't got a clue what he is talking about!) I think he is suggesting: ============================Lance's Post===============================-I../apache_1.3.9/src/os/unix -I/usr/local/imap/include -I/web2/mysql/include/mysql -I/usr/local/include -c functions/mcrypt.c -o functions/mcrypt.ofunctions/mcrypt.c: In function `php_minit_mcrypt': functions/mcrypt.c:151: `RC2' undeclared (first use this function) functions/mcrypt.c:151: (Each undeclared identifier is reported only once functions/mcrypt.c:151: for each function it appears in.) make: *** [functions/mcrypt.o] Error 1 This is fixed in CVS and will be in the upcoming 3.0.13 version.-Rasmus
List: php-installSubject: [PHP-INST] Solution: warning: `MCRYPT_FAILED' redefined
From: "Lance Lovette" <lance-php@dailyrating.com> Date: 2000-11-10 0:57:33[Download message RAW] I have determined the cause of this problem. The algorithm that ext/mcrypt/config.m4 uses to determine if libmcrypt version 2.2 or 2.4 is installed is flawed. I'm fairly sure this problem only occurs when you configure --with-java.When building PHP DSO module: configure says: checking for init_mcrypt in -lmcrypt... no configure says: checking for mcrypt_module_open in -lmcrypt... yes init_mcrypt is incorrectly assumed to not exist because conftest fails to compile:/usr/lib/libmcrypt.so: undefined reference to `lt_dlerror' /usr/lib/libmcrypt.so: undefined reference to `lt_dlclose' /usr/lib/libmcrypt.so: undefined reference to `lt_dlexit' /usr/lib/libmcrypt.so: undefined reference to `lt_dlopen' /usr/lib/libmcrypt.so: undefined reference to `lt_dlsetsearchpath' /usr/lib/libmcrypt.so: undefined reference to `lt_dlopenext' /usr/lib/libmcrypt.so: undefined reference to `lt_dlsym' /usr/lib/libmcrypt.so: undefined reference to `lt_dlinit' mcrypt_module_open is found because for this test conftest is linked against -lltdl. When building PHP CGI module: configure says: checking for init_mcrypt in -lmcrypt... yes configure says: checking for mcrypt_module_open in -lmcrypt... yes init_mcrypt is found this time because conftest is linked against -lkaffevm. mcrypt_module_open is found again because conftest is linked against -lkaffevm and -lltdl. To get conftest to build in both cases you must always link against -lltdl when compiling with -lmcrypt. This solves the first problem of determining when init_mcrypt and mcrypt_module_open are available. The second problem is with the algorithm. The algorithm assumes that if init_mcrypt exists, you must have 2.2 installed and thus defines HAVE_LIBMCRYPT22. This will keep PHP from building if you are using 2.4. My solution was to change configure to always link against -lltdl for the mcrypt tests and to decide that you have 2.2 only when init_mcrypt is found and mcrypt_module_open is not. I did not do enough work to determine why -lkaffevm is not linked when compiling PHP DSO module.Lance ==================================SNIP=========================== Now. I am not using --with-java, but I am trying to compile PHP as a DSO. I am not at my Linux box whilst writing this email but the gist of my ./configure line is along the lines of: EAPI_MM=/usr/local ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=DIR --with-pgsql=DIR --enable-bcmath --enable-trans-sid --enable-magic-quotes --with-gd=DIR (tried =shared) --with-mcal=shared --with-imap --with-jpeg-dir=DIR --with-xpm-dir=DIR --with-pdflib --with-xml --with-swf [...and a few others...] --with-mcrypt=/usr/local (tried =shared) (DIR is really a directory path and not actually "DIR") I've been through this ./configure step-by-step building and adding a new switch each time. I've done a "make distclean" after each build to clean up the src dir. The only one I can't get to work is libmcrypt. I've tried 2.4.4, 2.4.7 & 2.2.X(forgot version but it's the latest from download site) Interestingly, to get libmcrypt-2.4.7 to build, I have had to use ./configure --disable-posix-threads AND --disable-libltdl. This library ltdl seems to have something to do with all this. Any one got any bright ideas? TIA Alan _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com