PHP 4.0 Bug #7941 Updated: mcrypt 2.2 detected when mcrypt 2.4 is installed
| From: | derick@php.net | Date: | Thu, 23 Nov 2000 13:45:08 +0000 |
| Subject: | PHP 4.0 Bug #7941 Updated: mcrypt 2.2 detected when mcrypt 2.4 is installed | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39008@lists.php.net to get a copy of this message | ||
ID: 7941
Updated by: derick
Reported By: astmail@yahoo.com
Status: Feedback
Bug Type: *Install and Config
Assigned To:
Comments:
Patches to configure are not useful at all... would you be so kind and make a patch for the
config.m4 file in php4/ext/mcrypt? BTW, I naver had any troubles with this. Are you sure the static
lib has version 2.4 of mcrypt?
Previous Comments:
---------------------------------------------------------------------------
[2000-11-23 08:24:06] astmail@yahoo.com
Patch to configure (beware, not configure.in) to show how to fix the problem:
--- cmp/php-4.0.3pl1/configure Sun Oct 15 13:47:10 2000
+++ src/php-4.0.3pl1/configure Sun Nov 12 20:30:17 2000
@@ -21675,12 +21675,7 @@
LIBS=$old_LIBS
LDFLAGS="$old_LDFLAGS"
- if test "$ac_cv_lib_mcrypt_init_mcrypt" = "yes"; then
- cat >> confdefs.h <<EOF
-#define HAVE_LIBMCRYPT22 1
-EOF
-
- elif test "$ac_cv_lib_mcrypt_mcrypt_module_open" = "yes"; then
+ if test "$ac_cv_lib_mcrypt_mcrypt_module_open" = "yes"; then
case "ltdl" in
c|c_r|pthread*) ;;
@@ -21695,6 +21690,11 @@
cat >> confdefs.h <<EOF
#define HAVE_LIBMCRYPT24 1
+EOF
+
+ elif test "$ac_cv_lib_mcrypt_init_mcrypt" = "yes"; then
+ cat >> confdefs.h <<EOF
+#define HAVE_LIBMCRYPT22 1
EOF
else
---------------------------------------------------------------------------
[2000-11-23 07:46:48] astmail@yahoo.com
When mcrypt 2.4 is installed as static and as dynamic library, e.g. /usr/lib/libmcrypt.a and
/usr/lib/libmcrypt.so, configure detects mcrypt_module_open *AND* init_mcrypt (the latter is
contained in the static lib). In this case HAVE_LIBMCRYPT22 gets defined instead of HAVE_LIBMCRYPT24
resulting in a build failure.
The solution is to define HAVE_LIBMCRYPT24 when mcrypt_module_open is detected prior to checking for
the results for init_mcrypt (change of sequence in configure script).
Note:
For linux the path to the mcrypt modules must be in ld.so.conf to prevent mcrypt failures in
general.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7941