php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21286 error while compile with IMAP
Submitted: 2002-12-30 05:30 UTC Modified: 2002-12-30 08:56 UTC
From: idban at avidaim dot com Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.3.0 OS: rh 7.3
Private report: No CVE-ID: None
 [2002-12-30 05:30 UTC] idban at avidaim dot com
i got error while compile with IMAP, 
they said my IMAP not working
...
checking for IMAP support... yes
checking for pam_start in -lpam... yes
checking for crypt in -lcrypt... (cached) yes
checking whether SSL libraries are needed for c-client... /usr/lib
checking whether IMAP works... no

this is not happen when i try configure with php4.2.3

i use imap-2002.RC7

and this is my configure option
./configure  --prefix=/usr --with-exec-dir=/usr/bin --with-apache=../apache_1.3.27 --with-config-file-path=/etc/httpd --with-4-bit-antialias-hack --with-gd --with-ttf --with-t1lib --with-jpeg --with-jpeg-dir=/usr/lib --with-tiff-dir=/usr/lib --with-png-dir=/usr/lib --enable-calendar --with-mm --with-mysql=/usr --with-pgsql --with-gettext --with-zlib --with-gnu-ld --with-pspell --enable-inline-optimization --enable-bcmath --with-imap-ssl --with-imap --enable-xslt --with-xslt-sablot --with-pdflib --with-iconv=/usr/local/lib

where is the problem? on my side? or php side?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-30 05:34 UTC] derick@php.net
What does config.log tell you about imap (should be in the last few lines)?

Derick
 [2002-12-30 05:41 UTC] idban at avidaim dot com
i put only imap log, or you need all config.log?
hope this help for tracking

...
configure:35446: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lcrypto -lssl -lc-client   -lcrypt -lpam -liconv -lt1 -lttf -lpng -lz -ljpeg -lz -lcrypt -lresolv -lm -ldl -lnsl  -lcrypt 1>&5
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_onceonlyinit':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:287: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:300: undefined reference to `RAND_seed'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:305: undefined reference to `SSL_library_init'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_start_work':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:405: undefined reference to `TLSv1_client_method'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:405: undefined reference to `SSLv23_client_method'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:405: undefined reference to `SSL_CTX_new'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:409: undefined reference to `SSL_CTX_ctrl'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:413: undefined reference to `SSL_CTX_set_verify'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:415: undefined reference to `SSL_CTX_set_default_verify_paths'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:417: undefined reference to `SSL_new'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:419: undefined reference to `BIO_new_socket'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:420: undefined reference to `SSL_set_bio'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:421: undefined reference to `SSL_set_connect_state'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:422: undefined reference to `SSL_state'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:422: undefined reference to `SSL_ctrl'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:424: undefined reference to `SSL_write'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:429: undefined reference to `SSL_get_peer_certificate'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_getdata':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:596: undefined reference to `SSL_get_fd'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:599: undefined reference to `SSL_pending'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:623: undefined reference to `SSL_read'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:623: undefined reference to `SSL_get_error'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_server_init':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:779: undefined reference to `ERR_load_crypto_strings'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:780: undefined reference to `SSL_load_error_strings'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:786: undefined reference to `TLSv1_server_method'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:786: undefined reference to `SSLv23_server_method'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:786: undefined reference to `SSL_CTX_new'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:792: undefined reference to `SSL_CTX_ctrl'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:794: undefined reference to `SSL_CTX_set_cipher_list'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:798: undefined reference to `SSL_CTX_use_certificate_chain_file'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:802: undefined reference to `SSL_CTX_use_RSAPrivateKey_file'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:808: undefined reference to `SSL_CTX_ctrl'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:809: undefined reference to `SSL_CTX_set_tmp_rsa_callback'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:811: undefined reference to `SSL_new'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:815: undefined reference to `SSL_set_fd'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:817: undefined reference to `SSL_accept'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:838: undefined reference to `ERR_error_string'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:838: undefined reference to `ERR_get_error'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_genkey':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:856: undefined reference to `RSA_generate_key'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:860: undefined reference to `ERR_error_string'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:860: undefined reference to `ERR_get_error'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_server_input_wait':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:880: undefined reference to `SSL_get_fd'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:883: undefined reference to `SSL_pending'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:883: undefined reference to `SSL_read'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `PFLUSH':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:660: undefined reference to `SSL_write'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_sout':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:660: undefined reference to `SSL_write'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_open_verify':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:460: undefined reference to `X509_STORE_CTX_get_error'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:460: undefined reference to `X509_verify_cert_error_string'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:462: undefined reference to `X509_STORE_CTX_get_current_cert'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:462: undefined reference to `X509_get_subject_name'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:462: undefined reference to `X509_NAME_oneline'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_abort':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:686: undefined reference to `SSL_shutdown'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:687: undefined reference to `SSL_free'
/usr/local/src/imap-2002.RC7/c-client/osdep.c:691: undefined reference to `SSL_CTX_free'
collect2: ld returned 1 exit status
configure: failed program was:
#line 35421 "configure"
#include "confdefs.h"

    void mm_log(void){}
    void mm_dlog(void){}
    void mm_flags(void){}
    void mm_fatal(void){}
    void mm_critical(void){}
    void mm_nocritical(void){}
    void mm_notify(void){}
    void mm_login(void){}
    void mm_diskerror(void){}
    void mm_status(void){}
    void mm_lsub(void){}
    void mm_list(void){}
    void mm_exists(void){}
    void mm_searched(void){}
    void mm_expunged(void){}
    char mail_open();
    int main() {
      mail_open(0,"",0);
      return 0;
    }
 [2002-12-30 05:44 UTC] derick@php.net
It's actually a RedHat problem, add --with-openssl to your configure line and it should work fine.

Derick
 [2002-12-30 05:49 UTC] idban at avidaim dot com
yeah! work, thanks for your help Derick.
i love this answered fast as hell :)
 [2002-12-30 08:55 UTC] idban at avidaim dot com
i follow your instruction with --with-openssl, configuring now no error, but... i got an error while compile ( make ) it :(
i try using from http://snaps.php.net/php4-latest.tar.gz ( php4-200212301430 )they procude same error 

error given on 4.3.0 and php4-200212301430 :
/usr/local/src/imap-2002.RC7/c-client/osdep.c:287: the use of `tmpnam' is dangerous, better use `mkstemp'
then prompt to shell

config.log from php-4.3.0:
....
configure:35413: checking whether IMAP works
configure:35446: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lcrypto -lssl -lc-client   -l
crypt -lpam -liconv -lt1 -lttf -lpng -lz -ljpeg -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lcrypt 1>&5
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_onceonlyinit':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:287: the use of `tmpnam' is dangerous, better use `mkstemp'
configure:35476: checking for Informix support
....

config.log from php4-200212301430:
....
configure:37927: checking whether IMAP works
configure:37960: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lc-client -lssl -lcrypto   -l
crypt -lpam -liconv -lt1 -lttf -lpng -lz -ljpeg -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lcrypt 1>&5
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_onceonlyinit':
/usr/local/src/imap-2002.RC7/c-client/osdep.c:287: the use of `tmpnam' is dangerous, better use `mkstemp'
configure:37990: checking for Informix support
configure:38577: checking for Ingres II support
....
 [2002-12-30 08:56 UTC] derick@php.net
That's not an error but a warning, ignore it.
 [2002-12-30 09:36 UTC] idban at avidaim dot com
ok, installation done, but now apache produce segfault, this is not happen on 4.2.3, i downgrade again to 4.2.3 :(

[Mon Dec 30 16:22:43 2002] [notice] Apache/1.3.27 (Unix) AuthMySQL/2.20 mod_perl/1.27 DAV/1.0.3 PHP/4.3.0 mod_ssl/2.8.11 OpenSSL/0.9.6h configured -- resuming normal operations
[Mon Dec 30 16:22:43 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Mon Dec 30 16:23:15 2002] [notice] child pid 12517 exit signal Segmentation fault (11)
[Mon Dec 30 16:23:15 2002] [notice] child pid 12516 exit signal Segmentation fault (11)
 [2003-01-03 07:24 UTC] idban at avidaim dot com
i try install with apache2, GOD!! they working. 
thanks for all help, perhaps i decide to use apache2
 [2003-07-15 00:59 UTC] support at atlex dot ru
php-4.2.3 and php4-STABLE-200307150330
Also while compiling PHP with IMAP support, with an option - with-openssl, I receive the error:
 checking whether IMAP works... no
 configure: error: build test failed. Please 
check the config.log for details.
 make: *** No targets specified and no makefile found.  Stop.
 make: *** No rule to make target `install'.  Stop.



config.log

 configure:35376: checking for IMAP support
 configure:35734: checking for pam_start in -lpam

 configure:35753: gcc -o conftest -g -O2 &nbs
p;

 -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -lpam
 

 -lX11 -lXpm -lpng -lz -ljpeg -lexslt -lxsltb
reakpoint -lxml2

 -lxslt -lz -lcurl -lz -lresolv
 -lm -ldl -lnsl  -lcurl -lz -lssl -lcryp
to -ldl -lz -lxml2

 -lz -liconv -lm 1>&5
 configure:35781: checking for crypt in -lcrypt
 configure:35800: gcc -o conftest -g -O2 &nbs
p;

 -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -lcry
pt 

 -lpam -lX11 -lXpm -lpng -lz -ljpeg -lexslt&n
bsp;-lxsltbreakpoint

 -lxml2 -lxslt -lz -lcurl -lz
 -lresolv -lm -ldl -lnsl  -lcurl -lz -ls
sl -lcrypto -ldl -lz

 -lxml2 -lz -liconv -lm 1>&5
 configure:36206: checking whether SSL libraries a
re needed

 for c-client
 configure:36336: gcc -o conftest -g -O2 &nbs
p;

 -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib
 -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib conftest.c
 -lc-client  -lssl -lcrypto  -lcrypt -lpam&nb
sp;-lX11

 -lXpm -lpng -lz -ljpeg -lexslt -lxsltbreakpoint&n
bsp;-lxml2

 -lxslt -lz -lcurl -lz -lresolv -lm -ldl 
;-lnsl  -lcurl -lz -lssl

 -lcrypto -ldl -lz -lxml2 -lz -liconv -lm&nbs
p;-lgssapi_krb5 -lkrb5

 -lk5crypto
 -lcom_err 1>&5
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
 In function `ssl_onceonlyinit':
 /usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:286:
 the use of `tmpnam' is dangerous, better&nbs
p;use `mkstemp'

 configure: failed program was:
 #line 36311 "configure"
 #include "confdefs.h"

     void mm_log(void){}
     void mm_dlog(void){}
     void mm_flags(void){}
     void mm_fatal(void){}
     void mm_critical(void){}
     void mm_nocritical(void){}
     void mm_notify(void){}
     void mm_login(void){}
     void mm_diskerror(void){}
     void mm_status(void){}
     void mm_lsub(void){}
     void mm_list(void){}
     void mm_exists(void){}
     void mm_searched(void){}
     void mm_expunged(void){}
     char auth_gssapi_valid();
     int main() {
       auth_gssapi_valid();
       return 0;
     }
  
 configure:36362: checking whether IMAP works
 configure:36395: gcc -o conftest -g -O2 &nbs
p;

 -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib
 -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib conftest.c
 -lc-client  -lssl -lcrypto  -lcrypt -lpam&nb
sp;-lX11

 -lXpm -lpng -lz -ljpeg -lexslt -lxsltbreakpoint&n
bsp;-lxml2

 -lxslt -lz -lcurl -lz -lresolv -lm -ldl 
;-lnsl  -lcurl -lz -lssl

 -lcrypto -ldl -lz -lxml2 -lz -liconv -lm&nbs
p;-lgssapi_krb5 -lkrb5

 -lk5crypto
 -lcom_err 1>&5
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
 In function `ssl_onceonlyinit':
 /usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:286:
 the use of `tmpnam' is dangerous, better&nbs
p;use `mkstemp'

 configure: failed program was:
 #line 36370 "configure"
 #include "confdefs.h"

     void mm_log(void){}
     void mm_dlog(void){}
     void mm_flags(void){}
     void mm_fatal(void){}
     void mm_critical(void){}
     void mm_nocritical(void){}
     void mm_notify(void){}
     void mm_login(void){}
     void mm_diskerror(void){}
     void mm_status(void){}
     void mm_lsub(void){}
     void mm_list(void){}
     void mm_exists(void){}
     void mm_searched(void){}
     void mm_expunged(void){}
     char mail_newbody();
     int main() {
       mail_newbody();
       return 0;
     }
  
Why and what should I do to resolve the problem? I do need php with imap support.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC