Problem compiling libmcrypt

Hi everyone. Still working on a custom php build, I have been having problems getting it to build with mcrypt. I downloaded libmcrypt and built it localls (since it does not appear to be installed). The build seems to be all right, but it throws and error when trying to compile the libmcrypt test program at the end. I think that it was just trying to check in /usr/lib instead of my ~/local/lib location.

Anyway, when I try to build php with “–with-mctypr=/home/imsarese/local/” it will ./configure fine then it throws the following error when it gets to that part of the make process

/home/imsarese/packages/php-4.3.9/ext/mcrypt/mcrypt.c:310: MCRYPT_TWOFISH_256' undeclared (first use in this function) /home/imsarese/packages/php-4.3.9/ext/mcrypt/mcrypt.c:311: warning: passing arg 3 ofzend_register_long_constant’ makes integer from pointer without a cast
/home/imsarese/packages/php-4.3.9/ext/mcrypt/mcrypt.c: In function `zif_mcrypt_get_cipher_name’:
/home/imsarese/packages/php-4.3.9/ext/mcrypt/mcrypt.c:1505: warning: assignment makes pointer from integer without a cast
make: *** [ext/mcrypt/mcrypt.lo] Error 1

Note that the “passing without a case” bit appears a couple of times in the moment before it exits, all related to mcrypt. I am not enough of a C programmer to really know what is going on here, but if anyone has a suggestion on getting mcrypt to build better of getting php to build with it I would be very appreciative.



Without looking at the source, it looks as though MCRYPT_TWOFISH_256 is undefined, causing the next line to fail. I would use grep to find where MCRYPT_TWOFISH_256 is defined, my guess is that it should be in a #define statement in a header file. This sometimes happens if you have an older header file laying around somewhere and being used before the newer version. If you e-mail me some of the files (mcrypt.c and mcrypt.h) I can get a better idea.