Update: DSO compiles, CGI does not
| From: | Lance Lovette | Date: | Thu, 09 Nov 2000 17:48:37 +0000 |
| Subject: | Update: DSO compiles, CGI does not | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-24520@lists.php.net to get a copy of this message | ||
Compiling PHP as a DSO module works but I run into trouble with mcrypt when
I remove the --with-apxs configure option to build the CGI version. The
problem most likely has something to do with the HAVE_LIBMCRYPT options in
php_config.h. Why is configure changing it's mind?
DSO php_config.h has #define HAVE_LIBMCRYPT24 1
CGI php_config.h has #define HAVE_LIBMCRYPT22 1
Has anyone successfully compiled libmcrypt 2.4.6 with php 4.0.3pl1?
I compared the output of configure when building the DSO module and CGI
module. Most of the differences make sense except the difference in
'checking for init_mcrypt'. When configuring the DSO the answer is YES and
for CGI it is NO. Why is configure being inconsistent?
The relevant archives I am using:
php-4.0.3pl1.tar.gz
libmcrypt-2.4.6.tar.gz
Configure options:
./configure \
--prefix=/usr \
--with-config-file-path=/etc/httpd/conf \
--with-mysql=/usr \
--with-imap=/usr \
--with-mcrypt=/usr \
--with-xml \
--with-java \
--with-gd=/usr \
--with-ttf=/usr \
--with-zlib=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--enable-wddx \
--enable-sysvsem \
--enable-sysvshm
The error messages:
mcrypt.c:222: warning: `MCRYPT_FAILED' redefined
/usr/include/mcrypt.h:30: warning: this is the location of the previous
definition
mcrypt.c: In function `php_minit_mcrypt':
mcrypt.c:260: `MCRYPT_BLOWFISH_448' undeclared (first use in this function)
mcrypt.c:260: (Each undeclared identifier is reported only once
mcrypt.c:260: for each function it appears in.)
mcrypt.c:261: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:262: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:263: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:264: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:265: `MCRYPT_SAFER_64' undeclared (first use in this function)
mcrypt.c:266: `MCRYPT_SAFER_128' undeclared (first use in this function)
mcrypt.c:267: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:268: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:269: `MCRYPT_RC2_1024' undeclared (first use in this function)
mcrypt.c:270: `MCRYPT_TWOFISH_128' undeclared (first use in this function)
mcrypt.c:271: `MCRYPT_TWOFISH_192' undeclared (first use in this function)
mcrypt.c:272: `MCRYPT_TWOFISH_256' undeclared (first use in this function)
mcrypt.c:273: `MCRYPT_BLOWFISH_128' undeclared (first use in this function)
mcrypt.c:274: `MCRYPT_BLOWFISH_192' undeclared (first use in this function)
mcrypt.c:275: `MCRYPT_BLOWFISH_256' undeclared (first use in this function)
mcrypt.c:276: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:277: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:278: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:279: `MCRYPT_SERPENT_128' undeclared (first use in this function)
mcrypt.c:280: `MCRYPT_SERPENT_192' undeclared (first use in this function)
mcrypt.c:281: `MCRYPT_SERPENT_256' undeclared (first use in this function)
mcrypt.c:282: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:283: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:284: warning: passing arg 3 of `zend_register_long_constant' makes
integer from pointer without a cast
mcrypt.c:285: `MCRYPT_RC2_256' undeclared (first use in this function)
mcrypt.c:286: `MCRYPT_RC2_128' undeclared (first use in this function)
mcrypt.c:287: `MCRYPT_RC6_256' undeclared (first use in this function)
mcrypt.c:288: `MCRYPT_IDEA' undeclared (first use in this function)
mcrypt.c:289: `MCRYPT_RC6_128' undeclared (first use in this function)
mcrypt.c:290: `MCRYPT_RC6_192' undeclared (first use in this function)
mcrypt.c:291: `MCRYPT_RC4' undeclared (first use in this function)
mcrypt.c: In function `php_if_mcrypt_get_cipher_name':
mcrypt.c:1500: warning: assignment makes pointer from integer without a cast
make[3]: *** [mcrypt.lo] Error 1
make[3]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext/mcrypt'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext/mcrypt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext'
make: *** [all-recursive] Error 1
Difference in configure output:
< DSO
> CGI
37c37,38
< checking for Apache module support via DSO through APXS... yes
---
> checking for Apache module support via DSO through APXS... no
> checking for Apache module support... no
38a40,41
> checking whether to force Apache CGI redirect... no
> checking whether to discard path_info + path_translated... no
47c50
< checking for chosen SAPI module... apache
---
> checking for chosen SAPI module... cgi
242c245
< checking for init_mcrypt in -lmcrypt... no
---
> checking for init_mcrypt in -lmcrypt... yes
377,378c380,381
< checking whether to build shared libraries... yes
< checking whether to build static libraries... no
---
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes
383a387,415
> Configuring shared libtool
> loading cache ./config.cache within ltconfig
> checking host system type... i686-pc-linux-gnu
> checking for ranlib... ranlib
> checking for gcc... gcc
> checking whether we are using GNU C... yes
> checking for object suffix... o
> checking for executable suffix... (cached) no
> checking for gcc option to produce PIC... -fPIC
> checking if gcc PIC flag -fPIC works... yes
> checking if gcc supports -c -o file.o... yes
> checking if gcc supports -c -o file.lo... yes
> checking if gcc supports -fno-rtti -fno-exceptions ... yes
> checking if gcc static flag -static works... -static
> checking whether ln -s works... yes
> checking for ld used by GCC... /usr/bin/ld
> checking if the linker (/usr/bin/ld) is GNU ld... yes
> checking whether the linker (/usr/bin/ld) supports shared libraries... yes
> checking for BSD-compatible nm... /usr/bin/nm -B
> checking command to parse /usr/bin/nm -B output... ok
> checking how to hardcode library paths into programs... immediate
> checking for /usr/bin/ld option to reload object files... -r
> checking dynamic linker characteristics... Linux ld.so
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... no
> checking for objdir... .libs
> creating shlibtool
>
421c453
< creating sapi/apache/Makefile
---
> creating sapi/cgi/Makefile
Differences in php_config.h:
< DSO
> CGI
709c709
< #define HAVE_AP_CONFIG_H 1
---
> /* #undef HAVE_AP_CONFIG_H */
712c712
< #define HAVE_AP_COMPAT_H 1
---
> /* #undef HAVE_AP_COMPAT_H */
715c715
< #define HAVE_AP_CONFIG_H 1
---
> /* #undef HAVE_AP_CONFIG_H */
718c718
< #define HAVE_AP_CONFIG_H 1
---
> /* #undef HAVE_AP_CONFIG_H */
721c721
< #define HAVE_AP_COMPAT_H 1
---
> /* #undef HAVE_AP_COMPAT_H */
727c727
< #define HAVE_AP_CONFIG_H 1
---
> /* #undef HAVE_AP_CONFIG_H */
730c730
< #define HAVE_AP_COMPAT_H 1
---
> /* #undef HAVE_AP_COMPAT_H */
736c736
< #define HAVE_AP_CONFIG_H 1
---
> /* #undef HAVE_AP_CONFIG_H */
739c739
< #define HAVE_AP_COMPAT_H 1
---
> /* #undef HAVE_AP_COMPAT_H */
745c745
< #define HAVE_AP_CONFIG_H 1
---
> /* #undef HAVE_AP_CONFIG_H */
748c748
< #define HAVE_AP_COMPAT_H 1
---
> /* #undef HAVE_AP_COMPAT_H */
757c757
< /* #undef FORCE_CGI_REDIRECT */
---
> #define FORCE_CGI_REDIRECT 0
760c760
< /* #undef DISCARD_PATH */
---
> #define DISCARD_PATH 0
1264c1264
< /* #undef HAVE_LIBMCRYPT22 */
---
> #define HAVE_LIBMCRYPT22 1
1267c1267
< #define HAVE_LIBMCRYPT24 1
---
> /* #undef HAVE_LIBMCRYPT24 */