Subject: UW IMAP 2002d install/compile on Redhat 9

From: AWC List <[email-masked]>
Date: Tue, 03 Jun 2003 19:07:33 -0400

Hi,
I am trying to compile UW Imap on a fresh Redhat 9.0 system.

When I run:   make lnp

I get error messages.  Just the last few lines of the output are:
---------------
sslstdio.c: In function `PFLUSH':
sslstdio.c:155: request for member `sslstream' in something not a 
structure or union
sslstdio.c:155: request for member `obuf' in something not a structure 
or union
sslstdio.c:156: request for member `octr' in something not a structure 
or union
sslstdio.c:158: request for member `optr' in something not a structure 
or union
sslstdio.c:158: request for member `obuf' in something not a structure 
or union
sslstdio.c:159: request for member `octr' in something not a structure 
or union
sslstdio.c: At top level:
osdep.c:257: storage size of `ssldriver' isn't known
make[3]: *** [osdep.o] Error 1
make[3]: Leaving directory `/root/imap-2002d/c-client'
make[2]: *** [lnp] Error 2
make[2]: Leaving directory `/root/imap-2002d/c-client'
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/root/imap-2002d'
make: *** [lnp] Error 2
-----------------

I was wondering if anyone on this list has successfully installed UW 
IMAP on Redhat 9?  If you know of where I could download RH 9 RPMs I 
could also try those...

I can also attach the entire "make" output if that will help in matters.

Any tips or pointers are appreciated!  Thanks in advance.

--- Charles

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: "Abraham Backus" <[email-masked]>
Date: Tue, 3 Jun 2003 16:13:34 -0700

I successfully built on a brand new RH9 today as a matter of fact :)  The
following make invokation worked for me:

make lrh EXTRAAUTHENTICATORS=gss

-Abe

---

From: AWC List <[email-masked]>
Date: Tue, 03 Jun 2003 19:28:40 -0400

Abraham Backus wrote:
> .
Thank you for the quick reply.

Unfortunately... your make invocation generate the same error messages 
for me.  I did a lean install of RH9 so perhaps something required to 
compile is missing...

Argh.

--- Charles

---

From: Mark Crispin <[email-masked]>
Date: Tue, 3 Jun 2003 16:47:37 -0700 (Pacific Daylight Time)

> for me.  I did a lean install of RH9 so perhaps something required to

What is the COMPLETE text of the build transcript?

In particular, look for text which reads:

	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.

Do your errors start right after that text?  Do you get "No such file"
error messages which mention those files?

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

---

From: AWC List <[email-masked]>
Date: Wed, 04 Jun 2003 00:17:41 -0400

> Si vis pacem, para bellum.
Mark,
Thank you for your offer of help!

I also thought that I did not have OpenSSL installed.  But:
rpm -q openssl says openssl-0.9.7a-5 is installed
rpm -q openssl-devel says openssl-devel-0.9.7a-5 is installed.

Here is the complete output (The output is the same when I use make lnp 
as well.)

--- Charles

======================
make lrh
make build EXTRACFLAGS='' EXTRALDFLAGS='' EXTRADRIVERS='mbox' 
EXTRAAUTHENTICATORS='' PASSWDTYPE=std SSLTYPE=nopwd EXTRASPECIALS='' 
BUILDTYPE=lnp \
SPECIALS="GSSDIR=/usr/kerberos SSLDIR=/usr/share/ssl 
SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib"
make[1]: Entering directory `/root/imap-2002d'
Building c-client for lnp...
echo `cat SPECIALS`  > c-client/SPECIALS
cd c-client;make lnp EXTRACFLAGS=''\
  EXTRALDFLAGS=''\
  EXTRADRIVERS='mbox'\
  EXTRAAUTHENTICATORS=''\
  PASSWDTYPE=std SSLTYPE=nopwd\
  GSSDIR=/usr/kerberos SSLDIR=/usr/share/ssl 
SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib
make[2]: Entering directory `/root/imap-2002d/c-client'
make build EXTRACFLAGS='' EXTRALDFLAGS='' EXTRADRIVERS='mbox' 
EXTRAAUTHENTICATORS='' PASSWDTYPE=std SSLTYPE=nopwd `cat SPECIALS` OS=lnx \
  SIGTYPE=psx CHECKPW=pam CRXTYPE=nfs \
  SPOOLDIR=/var/spool \
  ACTIVEFILE=/var/lib/news/active \
  RSHPATH=/usr/bin/rsh \
  BASECFLAGS="-g -fno-omit-frame-pointer -O6" \
  BASELDFLAGS="-lpam -ldl"
make[3]: Entering directory `/root/imap-2002d/c-client'
sh -c 'rm -rf auths.c crexcl.c nfstest.c linkage.[ch] siglocal.c 
osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE c-client.a || true'
Once-only environment setup...
echo cc > CCTYPE
echo -g -fno-omit-frame-pointer -O6 '' > CFLAGS
echo -DCREATEPROTO=unixproto -DEMPTYPROTO=unixproto \
  -DMAILSPOOL=\"/var/spool/mail\" \
  -DANONYMOUSHOME=\"/var/spool/mail/anonymous\" \
  -DACTIVEFILE=\"/var/lib/news/active\" -DNEWSSPOOL=\"/var/spool/news\" \
  -DRSHPATH=\"/usr/bin/rsh\" -DLOCKPGM=\"/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 
siglocal.o dummy.o pseudo.o netmsg.o flstring.o fdstring.o rfc822.o 
nntp.o smtp.o imap4r1.o pop3.o unix.o mbox.o mbx.o mmdf.o tenex.o mtx.o 
news.o phile.o mh.o mx.o;ranlib c-client.a" > ARCHIVE
echo lnx > OSTYPE
./drivers mbox imap nntp pop3 mh mx mbx tenex mtx mmdf unix news phile dummy
./mkauths  md5 pla log
make[4]: Entering directory `/root/imap-2002d/c-client'
echo -DMD5ENABLE=\"/etc/cram-md5.pwd\" >> OSCFLAGS
make[4]: Leaving directory `/root/imap-2002d/c-client'
ln -s os_lnx.h osdep.h
ln -s os_lnx.c osdepbas.c
ln -s log_std.c osdeplog.c
ln -s sig_psx.c siglocal.c
ln -s crx_nfs.c crexcl.c
sh -c '(test -f /usr/include/sys/statvfs.h -a lnx != sc5 -a lnx != sco) 
&& ln -s nfstnew.c nfstest.c || ln -s nfstold.c nfstest.c'
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=\"/usr/share/ssl/certs\" >> 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 lnx SSLTYPE=none
`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
In file included from /usr/include/openssl/ssl.h:179,
                  from osdep.c:218:
/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
In file included from /usr/include/openssl/ssl.h:179,
                  from osdep.c:218:
/usr/include/openssl/kssl.h:132: parse error before "krb5_enctype"
/usr/include/openssl/kssl.h:134: parse error before "FAR"
/usr/include/openssl/kssl.h:135: parse error before '}' token
/usr/include/openssl/kssl.h:147: parse error before "kssl_ctx_setstring"
/usr/include/openssl/kssl.h:147: parse error before '*' token
/usr/include/openssl/kssl.h:148: parse error before '*' token
/usr/include/openssl/kssl.h:149: parse error before '*' token
/usr/include/openssl/kssl.h:149: parse error before '*' token
/usr/include/openssl/kssl.h:150: parse error before '*' token
/usr/include/openssl/kssl.h:151: parse error before "kssl_ctx_setprinc"
/usr/include/openssl/kssl.h:151: parse error before '*' token
/usr/include/openssl/kssl.h:153: parse error before "kssl_cget_tkt"
/usr/include/openssl/kssl.h:153: parse error before '*' token
/usr/include/openssl/kssl.h:155: parse error before "kssl_sget_tkt"
/usr/include/openssl/kssl.h:155: parse error before '*' token
/usr/include/openssl/kssl.h:157: parse error before "kssl_ctx_setkey"
/usr/include/openssl/kssl.h:157: parse error before '*' token
/usr/include/openssl/kssl.h:159: parse error before "context"
/usr/include/openssl/kssl.h:160: parse error before "kssl_build_principal_2"
/usr/include/openssl/kssl.h:160: parse error before "context"
/usr/include/openssl/kssl.h:163: parse error before "kssl_validate_times"
/usr/include/openssl/kssl.h:163: parse error before "atime"
/usr/include/openssl/kssl.h:165: parse error before "kssl_check_authent"
/usr/include/openssl/kssl.h:165: parse error before '*' token
/usr/include/openssl/kssl.h:167: parse error before "enctype"
In file included from osdep.c:218:
/usr/include/openssl/ssl.h:909: parse error before "KSSL_CTX"
/usr/include/openssl/ssl.h:909: warning: no semicolon at end of struct 
or union
/usr/include/openssl/ssl.h:931: parse error before '}' token
make[3]: *** [osdep.o] Error 1
make[3]: Leaving directory `/root/imap-2002d/c-client'
make[2]: *** [lnp] Error 2
make[2]: Leaving directory `/root/imap-2002d/c-client'
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/root/imap-2002d'
make: *** [lrh] Error 2

---

From: Mark Crispin <[email-masked]>
Date: Tue, 3 Jun 2003 21:48:09 -0700 (PDT)

> rpm -q openssl-devel says openssl-devel-0.9.7a-5 is installed.

Regardless of what those RPMs say, OpenSSL is not properly installed.  It
appears that /usr/include/ssl.h includes a file called kssl.h, which in
turn includes a file called krb5.h which is missing.

It looks like those RPMs are built assuming that Kerberos is installed,
and you don't have Kerberos installed.

I suggest getting rid of the stupid RPMs, get a copy of OpenSSL directly
from openssl.org, and build that.  It should recognize that you don't have
Kerberos, and build it properly.

-- Mark --

---

From: David Carter <[email-masked]>
Date: Wed, 4 Jun 2003 09:36:42 +0100 (BST)

> turn includes a file called krb5.h which is missing.

I suspect that krb5.h is installed. Redhat 9 just puts it in an odd place.

I find that I have to add "-I/usr/kerberos/include" to anything that I
build which incorporates OpenSSL (even though I don't typically need to
link against the Kerberos libraries). This looks like a bad dependency
within /usr/include/ssl.h.

-- 
David Carter                             Email: [email-masked]
University Computing Service,            Phone: (01223) 334502
New Museums Site, Pembroke Street,       Fax:   (01223) 334679
Cambridge UK. CB2 3QH.

---

From: "Michael H. Martel" <[email-masked]>
Date: Wed, 04 Jun 2003 05:52:41 -0400

> I suspect that krb5.h is installed. Redhat 9 just puts it in an odd place.

Yes, I reported this before. The best way I've found to build imapd on 
RedHat 8 or 9 (or YDL 3.0) is this :

make lrh \
EXTRACFLAGS=-I/usr/kerberos/include EXTRALDFLAGS=-I/usr/kerberos/lib

Where the above is all one line.  RedHat did move the Kerberos files so 
that they're not found by the compiler by default.

Michael

--

  --------------------------------o---------------------------------
   Michael H. Martel              | Systems Administrator
   [email-masked]          | Vermont State Colleges
   http://probe.vsc.edu/~michael  | PH:802-241-2544 FX:802-241-3363

---

From: AWC List <[email-masked]>
Date: Wed, 04 Jun 2003 12:04:26 -0400

Thank you to everyone for the various tips to try. I will be able
connect to the "trouble" machine late tonight or tomorrow morning.  I
will report back on how each suggestion went.

Cheers.

--- Charles