Hi,
I need to build PHP-5.3.0 with "--with-imap-ssl" option in CentOS 5.4
environment. It gave me some errors at the "make" step. After googling, here
was what I did again.
1) Download and build openssl-0.9.8l. It completed successfully. The
/usr/local/ssl directory was created.
2) Generate imapd.pem, ipop3d.pem, and privkey.pem in /usr/local/ssl/certs
directory.
3) Download imap-2007e and build it with "make lr5" command. It gave me a lot
of errors. I just list a few of them here.
osdep.c:89:31: error: security/pam_appl.h: No such file or directory
osdep.c:106: warning: ‘struct pam_response’ declared inside parameter list
osdep.c:106: warning: its scope is only this definition or declaration, which
is probably not what you want
osdep.c:106: warning: ‘struct pam_message’ declared inside parameter list
osdep.c: In function ‘checkpw_conv’:
osdep.c:110: error: invalid application of ‘sizeof’ to incomplete type ‘struct
pam_response’
The complete error messages is shown in the attached file.
I searched again and couldn't find any clues. What steps did I miss? I need
to build imap with ssl successfully in order to build PHP. Please help!
Thanks a lot!
Franklin
[r...@localhost imap-2007e]# make lr5
make[1]: Entering directory `/usr/src/imap-2007e'
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Building in full compliance with RFC 3501 security
+ requirements:
++ TLS/SSL encryption is supported
++ Unencrypted plaintext passwords are prohibited
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
make[1]: Leaving directory `/usr/src/imap-2007e'
Applying an process to sources...
tools/an "ln -s" src/c-client c-client
tools/an "ln -s" src/ansilib c-client
tools/an "ln -s" src/charset c-client
tools/an "ln -s" src/osdep/unix c-client
tools/an "ln -s" src/mtest mtest
tools/an "ln -s" src/ipopd ipopd
tools/an "ln -s" src/imapd imapd
tools/an "ln -s" src/mailutil mailutil
tools/an "ln -s" src/mlock mlock
tools/an "ln -s" src/dmail dmail
tools/an "ln -s" src/tmail tmail
ln -s tools/an .
touch ip6
make build EXTRACFLAGS='-fPIC' EXTRALDFLAGS='' EXTRADRIVERS='mbox'
EXTRAAUTHENTICATORS='' PASSWDTYPE=std SSLTYPE=nopwd IP=4 EXTRASPECIALS=''
BUILDTYPE=lnp IP=6 \
SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib
SSLCERTS=/etc/pki/tls/certs SSLKEYS=/etc/pki/tls/private GSSDIR=/usr/kerberos"
make[1]: Entering directory `/usr/src/imap-2007e'
make[2]: Entering directory `/usr/src/imap-2007e'
make[2]: `ip6' is up to date.
make[2]: Leaving directory `/usr/src/imap-2007e'
Building c-client for lnp...
echo `cat SPECIALS` > c-client/SPECIALS
cd c-client;make lnp EXTRACFLAGS='-fPIC'\
EXTRALDFLAGS=''\
EXTRADRIVERS='mbox'\
EXTRAAUTHENTICATORS=''\
PASSWDTYPE=std SSLTYPE=nopwd IP=6\
SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib
SSLCERTS=/etc/pki/tls/certs SSLKEYS=/etc/pki/tls/private GSSDIR=/usr/kerberos
make[2]: Entering directory `/usr/src/imap-2007e/c-client'
make build EXTRACFLAGS='-fPIC' EXTRALDFLAGS='' EXTRADRIVERS='mbox'
EXTRAAUTHENTICATORS='' PASSWDTYPE=std SSLTYPE=nopwd IP=6 `cat SPECIALS` OS=slx \
SIGTYPE=psx CHECKPW=pam CRXTYPE=nfs \
SPOOLDIR=/var/spool \
ACTIVEFILE=/var/lib/news/active \
RSHPATH=/usr/bin/rsh \
BASECFLAGS="-g -O2 -pipe -fno-omit-frame-pointer" \
BASELDFLAGS="-lpam -ldl"
make[3]: Entering directory `/usr/src/imap-2007e/c-client'
sh -c 'rm -rf auths.c crexcl.c ip_unix.c linkage.[ch] siglocal.c osdep*.[ch]
*.o ARCHIVE *FLAGS *TYPE c-client.a || true'
Once-only environment setup...
echo cc > CCTYPE
echo -g -O2 -pipe -fno-omit-frame-pointer '-fPIC' -DCHUNKSIZE=65536 > CFLAGS
echo -DCREATEPROTO=unixproto -DEMPTYPROTO=unixproto \
-DMD5ENABLE=\"/etc/cram-md5.pwd\" -DMAILSPOOL=\"/var/spool/mail\" \
-DANONYMOUSHOME=\"/var/spool/mail/anonymous\" \
-DACTIVEFILE=\"/var/lib/news/active\" -DNEWSSPOOL=\"/var/spool/news\" \
-DRSHPATH=\"/usr/bin/rsh\" -DLOCKPGM=\"\" \
-DLOCKPGM1=\"/usr/libexec/mlock\" -DLOCKPGM2=\"/usr/sbin/mlock\" \
-DLOCKPGM3=\"/etc/mlock\" > OSCFLAGS
echo -lpam -ldl > LDFLAGS
echo "ar rc c-client.a osdep.o mail.o misc.o newsrc.o smanager.o utf8.o
utf8aux.o siglocal.o dummy.o pseudo.o netmsg.o flstring.o fdstring.o rfc822.o
nntp.o smtp.o imap4r1.o pop3.o unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o
mh.o mx.o mix.o;ranlib c-client.a" > ARCHIVE
echo slx > OSTYPE
./drivers mbox imap nntp pop3 mix mx mbx tenex mtx mh mmdf unix news phile dummy
./mkauths ext md5 pla log
echo " mail_versioncheck (CCLIENTVERSION);" >> linkage.c
ln -s os_slx.h osdep.h
ln -s os_slx.c osdepbas.c
ln -s log_std.c osdeplog.c
ln -s sig_psx.c siglocal.c
ln -s crx_nfs.c crexcl.c
ln -s ip6_unix.c ip_unix.c
sh -c '(test slx = sc5 -o slx = sco -o ! -f /usr/include/sys/statvfs.h) && echo
-DNOFSTATVFS >> OSCFLAGS || fgrep statvfs64 /usr/include/sys/statvfs.h >
/dev/null || echo -DNOFSTATVFS64 >> OSCFLAGS'
Standard password authentication
ln -s ckp_pam.c osdepckp.c
Building with SSL
ln -s ssl_unix.c osdepssl.c
echo -I/usr/include/openssl -I/usr/include/openssl/openssl
-DSSL_CERT_DIRECTORY=\"/etc/pki/tls/certs\"
-DSSL_KEY_DIRECTORY=\"/etc/pki/tls/private\" >> OSCFLAGS
echo " ssl_onceonlyinit ();" >> linkage.c
echo -L/usr/lib -lssl -lcrypto >> LDFLAGS
Building with SSL and plaintext passwords disabled unless SSL/TLS
echo " mail_parameters (NIL,SET_DISABLEPLAINTEXT,(void *) 2);" >> linkage.c
cat osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
Building OS-dependent module
If you get No such file error messages for files x509.h, ssl.h,
pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
is not installed on your system. Either install OpenSSL first
or build with command: make slx SSLTYPE=none
`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
osdep.c:89:31: error: security/pam_appl.h: No such file or directory
osdep.c:106: warning: âstruct pam_responseâ declared inside parameter list
osdep.c:106: warning: its scope is only this definition or declaration, which
is probably not what you want
osdep.c:106: warning: âstruct pam_messageâ declared inside parameter list
osdep.c: In function âcheckpw_convâ:
osdep.c:110: error: invalid application of âsizeofâ to incomplete type
âstruct pam_responseâ
osdep.c:111: error: dereferencing pointer to incomplete type
osdep.c:112: error: âPAM_PROMPT_ECHO_ONâ undeclared (first use in this
function)
osdep.c:112: error: (Each undeclared identifier is reported only once
osdep.c:112: error: for each function it appears in.)
osdep.c:113: error: invalid use of undefined type âstruct pam_responseâ
osdep.c:113: error: dereferencing pointer to incomplete type
osdep.c:113: error: âPAM_SUCCESSâ undeclared (first use in this function)
osdep.c:114: error: invalid use of undefined type âstruct pam_responseâ
osdep.c:114: error: dereferencing pointer to incomplete type
osdep.c:116: error: âPAM_PROMPT_ECHO_OFFâ undeclared (first use in this
function)
osdep.c:117: error: invalid use of undefined type âstruct pam_responseâ
osdep.c:117: error: dereferencing pointer to incomplete type
osdep.c:118: error: invalid use of undefined type âstruct pam_responseâ
osdep.c:118: error: dereferencing pointer to incomplete type
osdep.c:120: error: âPAM_TEXT_INFOâ undeclared (first use in this function)
osdep.c:121: error: âPAM_ERROR_MSGâ undeclared (first use in this function)
osdep.c:122: error: invalid use of undefined type âstruct pam_responseâ
osdep.c:122: error: dereferencing pointer to incomplete type
osdep.c:123: error: invalid use of undefined type âstruct pam_responseâ
osdep.c:123: error: dereferencing pointer to incomplete type
osdep.c:127: error: âPAM_CONV_ERRâ undeclared (first use in this function)
osdep.c: At top level:
osdep.c:138: error: expected â)â before â*â token
osdep.c: In function âcheckpwâ:
osdep.c:155: error: âpam_handle_tâ undeclared (first use in this function)
osdep.c:155: error: âhdlâ undeclared (first use in this function)
osdep.c:156: error: storage size of âconvâ isnât known
osdep.c:164: error: âPAM_SUCCESSâ undeclared (first use in this function)
osdep.c:165: error: âPAM_RHOSTâ undeclared (first use in this function)
osdep.c:168: error: âPAM_ESTABLISH_CREDâ undeclared (first use in this
function)
osdep.c:184: error: âcheckpw_cleanupâ undeclared (first use in this
function)
make[3]: *** [osdep.o] Error 1
make[3]: Leaving directory `/usr/src/imap-2007e/c-client'
make[2]: *** [lnp] Error 2
make[2]: Leaving directory `/usr/src/imap-2007e/c-client'
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/usr/src/imap-2007e'
make: *** [lr5] Error 2
[r...@localhost imap-2007e]#
_______________________________________________
Imap-uw mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw