Debian Codegraph @

doc/html/_sources/imap/reference/faqs/install-compilationerrors.rst.txt

raw
1 .. _compilationerrors:
2
3 Compilation errors about kssl.h and krb5.h on Red Hat Linux/Fedora
4 ------------------------------------------------------------------
5
6 When trying to compile Cyrus IMAPd on Red Hat Linux or Fedora, you may be encountering errors like these::
7
8 In file included from /usr/include/openssl/ssl.h:179,
9 from prot.h:56,
10 from prot.c:72:
11 /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
12 In file included from /usr/include/openssl/ssl.h:179,
13 from prot.h:56,
14 from prot.c:72:
15 /usr/include/openssl/kssl.h:134: syntax error before "krb5_enctype"
16 /usr/include/openssl/kssl.h:136: syntax error before '*' token
17 /usr/include/openssl/kssl.h:137: syntax error before '}' token
18 /usr/include/openssl/kssl.h:149: syntax error before "kssl_ctx_setstring"
19 /usr/include/openssl/kssl.h:149: syntax error before '*' token
20 /usr/include/openssl/kssl.h:150: syntax error before '*' token
21 /usr/include/openssl/kssl.h:151: syntax error before '*' token
22 /usr/include/openssl/kssl.h:151: syntax error before '*' token
23 /usr/include/openssl/kssl.h:152: syntax error before '*' token
24 /usr/include/openssl/kssl.h:153: syntax error before "kssl_ctx_setprinc"
25 /usr/include/openssl/kssl.h:153: syntax error before '*' token
26 /usr/include/openssl/kssl.h:155: syntax error before "kssl_cget_tkt"
27 /usr/include/openssl/kssl.h:155: syntax error before '*' token
28 /usr/include/openssl/kssl.h:157: syntax error before "kssl_sget_tkt"
29 /usr/include/openssl/kssl.h:157: syntax error before '*' token
30 /usr/include/openssl/kssl.h:159: syntax error before "kssl_ctx_setkey"
31 /usr/include/openssl/kssl.h:159: syntax error before '*' token
32 /usr/include/openssl/kssl.h:161: syntax error before "context"
33 /usr/include/openssl/kssl.h:162: syntax error before
34 "kssl_build_principal_2"
35 /usr/include/openssl/kssl.h:162: syntax error before "context"
36 /usr/include/openssl/kssl.h:165: syntax error before "kssl_validate_times"
37 /usr/include/openssl/kssl.h:165: syntax error before "atime"
38 /usr/include/openssl/kssl.h:167: syntax error before "kssl_check_authent"
39 /usr/include/openssl/kssl.h:167: syntax error before '*' token
40 /usr/include/openssl/kssl.h:169: syntax error before "enctype"
41 In file included from prot.h:56,
42 from prot.c:72:
43 /usr/include/openssl/ssl.h:909: syntax error before "KSSL_CTX"
44 /usr/include/openssl/ssl.h:931: syntax error before '}' token
45 make[1]: *** [prot.o] Error 1
46 make[1]: Leaving directory `/opt/cyrus-imapd-2.2.3/lib'
47 make: *** [all] Error 1
48
49 The key bit of this error is::
50
51 /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
52
53 Essentially, what is happening is that Cyrus is trying to use OpenSSL, and OpenSSL's headers include some Kerberos header files. Red Hat, in their infinite wisdom, chose to place the Kerberos headers outside the normal header search path, despite having built OpenSSL to require the Kerberos headers. As a result, even if your program is not using Kerberos, it may fail to compile if gcc can't find the Kerberos headers.
54
55 The solution is to either add the Kerberos headers to gcc's header search path, or prevent OpenSSL from trying to use the Kerberos includes in the first place. To tell OpenSSL you really don't want kerberos, just run::
56
57 export LOCALDEFS="-DOPENSSL_NO_KRB5"
58
59 (as suggested by Ken Murchison on info-cyrus) before you run ./configure. Alternately, you can tell gcc where to find the Kerberos includes so that it'll stop complaining::
60
61 export C_INCLUDE_PATH="/usr/kerberos/include"
62
63 If neither of these work, make sure you have the Kerberos development libraries installed ( you should have if you have openssl-devel, but one never does know ...). If you run ``rpm -q openssl-devel krb5-devel`` you should get a result like::
64
65 openssl-devel-0.9.7a-23
66 krb5-devel-1.3.1-6