|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-11-23 07:46 UTC] astmail at yahoo dot 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 16:00:01 2026 UTC |
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 elseOK, here's the config.m4 patch though I didn't test it (it should be reasonable enough): ================ --- cmp/php-4.0.3pl1/ext/mcrypt/config.m4 Sat Sep 9 14:24:20 2000 +++ src/php-4.0.3pl1/ext/mcrypt/config.m4 Thu Nov 23 23:48:01 2000 @@ -27,11 +27,11 @@ AC_CHECK_LIB(mcrypt, mcrypt_module_open, [LIBS="$LIBS -lltdl"],[ ],) LIBS=$old_LIBS LDFLAGS="$old_LDFLAGS" - if test "$ac_cv_lib_mcrypt_init_mcrypt" = "yes"; then - AC_DEFINE(HAVE_LIBMCRYPT22,1,[ ]) - elif test "$ac_cv_lib_mcrypt_mcrypt_module_open" = "yes"; then + if test "$ac_cv_lib_mcrypt_mcrypt_module_open" = "yes"; then AC_ADD_LIBRARY(ltdl) AC_DEFINE(HAVE_LIBMCRYPT24,1,[ ]) + elif test "$ac_cv_lib_mcrypt_init_mcrypt" = "yes"; then + AC_DEFINE(HAVE_LIBMCRYPT22,1,[ ]) else AC_MSG_ERROR(Sorry, I was not able to diagnose which libmcrypt version you have installed.) fi ================ Yes, I'm sure it is mcrypt 2.4: I detected the problem when I did build a system from scratch against glibc 2.2 so there never was a mcrypt version earlier than 2.4.7 on this system. Doing a grep against this version shows up init_mcrypt() and nm against libmcrypt.a shows, that init_mcrypt is exported in the static library whereas it is not in the dynamic one (libmcrypt.so).