Hello everyone,

Ive fixed this problem with cyrus-imapd version 2.2.12

include -DHAVE_CONFIG_H -g -O2 \
libconfig.c
In file included from libconfig.h:47,
from libconfig.c:57:
imapopts.h:181: error: array type has incomplete element type
make[1]: *** [libconfig.o] Error 1
make[1]: Leaving directory `/root/cyrus-imapd-2.2.12/lib'
make: *** [all] Error 1

Apparantly its a problem with gcc 4.0. I was reading that 4.0 doesnt like it when people define arrays in the older way. Id go into it more but im sure thats beyond this topic. Now how did i fix it...

Micheal, Thanks for your very quick reply and unfortunately it still didnt work since the problem lies in gcc 4.0. I found a patch someone wrote to fix the arrays defined in the cyrus-imapd code. Here is the patch:
you apply the patch with this command: patch -p0 < dpatch-run
You will need to edit the code below if you use it!!! The only part you must edit is the location of where you un-tarred cyrus-imap. I untarred mine in /root/cyrus-imapd-2.2.12 as you can see. So change it and make sure you put the patch in /usr/share/dpatch/ and call it dpatch-run.
If the patch applys you should get this output:
Hunk #2 succeeded at 260 with fuzz 1.

Here is the patch:

#! /bin/sh /usr/share/dpatch/dpatch-run
## 50-FTBFS-gcc-4.0-fix.dpatch by Ondřej Surý <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix FTBFS when compiling with gcc-4.0, there is imapopts is used before declared

@DPATCH@
diff -urN /root/cyrus-imapd-2.2.12~/tools/config2header /root/cyrus-imapd-2.2.12/tools/config2header --- /root/cyrus-imapd-2.2.12~/tools/config2header 2004-06-22 21:02:31.000000000 +0200 +++ /root/cyrus-imapd-2.2.12/tools/config2header 2005-06-22 07:56:17.180293688 +0200
@@ -214,7 +214,6 @@
print HFILE <<EOF
IMAPOPT_LAST
};
-extern struct imapopt_s imapopts[];

enum enum_value {
IMAP_ENUM_ZERO = 0,
@@ -260,6 +259,8 @@

print HFILE <<EOF
};
+extern struct imapopt_s imapopts[];
+
#endif /* INCLUDED_IMAPOPTIONS_H */
EOF
;sh: /usr/share/dpatch/dpatch-run: No such file or directory

Just copy and paste that into a folder and be sure to thank ondrej!
Also, thank you Micheal Muenz for your help, you are a valuable person to this community!!!

-andy
_______________________________________________
This mailing list is hosted and supported
by bit-heads GmbH | http://www.bit-heads.ch

_______________________________________________
Web-cyradm mailing list
Web-cyradm@web-cyradm.org
http://www.web-cyradm.org/mailman/listinfo/web-cyradm

Reply via email to