[Dovecot] v2.0.beta6 compilation problem under Solaris 9
Hello,
compiling dovecot-2.0.beta6 under Solaris 9 runs into an error. I use the following setup:
CC=cc
export CC
CPPFLAGS='-I/usr/local/include'
export CPPFLAGS
CFLAGS='-fast -xarch=v8plusa'
export CFLAGS
LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
export LDFLAGS
./configure --help
./configure --prefix=/opt/local
./gmake
......
Making all in lib-imap
gmake[3]: Entering directory `/net/fileserv/export/sunsrc/src/dovecot-2.0.beta6/src/lib-imap'
source='imap-match.c' object='imap-match.lo' libtool=yes
DEPDIR=.deps depmode=none /bin/bash ../../depcomp
/bin/bash ../../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test -I../../src/lib-charset -I../../src/lib-mail -I/usr/local/include -fast -xarch=v8plusa -c -o imap-match.lo imap-match.c
libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test -I../../src/lib-charset -I../../src/lib-mail -I/usr/local/include -fast -xarch=v8plusa -c imap-match.c -KPIC -DPIC -o .libs/imap-match.o
"imap-match.c", line 195: warning: syntax error: empty declaration
"imap-match.c", line 199: identifier redeclared: imap_match_dup
current : function(pointer to struct pool {pointer to const struct pool_vfuncs {..} v, unsigned int alloconly_pool :1, unsigned int datastack_pool :1}, pointer to const struct imap_match_glob {pointer to struct pool {..} pool, pointer to struct imap_match_pattern {..} patterns, char sep, array[-1] of char patterns_data}) returning pointer to struct imap_match_glob {pointer to struct pool {..} pool, pointer to struct imap_match_pattern {..} patterns, char sep, array[-1] of char patterns_data}
previous: function(pointer to struct pool {pointer to const struct pool_vfuncs {..} v, unsigned int alloconly_pool :1, unsigned int datastack_pool :1}, pointer to const struct imap_match_glob {pointer to struct pool {..} pool, pointer to struct imap_match_pattern {..} patterns, char sep, array[-1] of char patterns_data}) returning pointer to struct imap_match_glob {pointer to struct pool {..} pool, pointer to struct imap_match_pattern {..} patterns, char sep, array[-1] of char patterns_data} : "imap-match.h", line 33
"imap-match.c", line 210: warning: syntax error: empty declaration
"imap-match.c", line 214: identifier redeclared: imap_match_globs_equal
current : function(pointer to const struct imap_match_glob {pointer to struct pool {..} pool, pointer to struct imap_match_pattern {..} patterns, char sep, array[-1] of char patterns_data}, pointer to const struct imap_match_glob {pointer to struct pool {..} pool, pointer to struct imap_match_pattern {..} patterns, char sep, array[-1] of char patterns_data}) returning _Bool
previous: function(pointer to const struct imap_match_glob {pointer to struct pool {..} pool, pointer to struct imap_match_pattern {..} patterns, char sep, array[-1] of char patterns_data}, pointer to const struct imap_match_glob {pointer to struct pool {..} pool, pointer to struct imap_match_pattern {..} patterns, char sep, array[-1] of char patterns_data}) returning _Bool : "imap-match.h", line 36
cc: acomp failed for imap-match.c
gmake[3]: *** [imap-match.lo] Error 1
Thank you for help. Greetings, Jürgen Obermann
Hochschulrechenzentrum der | Mail: Juergen.Obermann@hrz.uni-giessen.de Justus-Liebig-Universitaet | WWW: http://www.uni-giessen.de/obermann Heinrich-Buff-Ring 44 | Tel: 0641-99-13054 (0641-99-13001) D-35392 Giessen, Germany | Fax: 0641-99-13009
On Mon, 2010-06-14 at 10:57 +0200, Juergen Obermann wrote:
"imap-match.c", line 195: warning: syntax error: empty declaration
http://hg.dovecot.org/dovecot-2.0/rev/88b6665b48da fixes this.
"imap-match.c", line 199: identifier redeclared: imap_match_dup
I don't really understand this. Maybe the above fix solves this too?
On Mon, Jun 14, 2010 at 03:56:06PM +0100, Timo Sirainen wrote:
On Mon, 2010-06-14 at 10:57 +0200, Juergen Obermann wrote:
"imap-match.c", line 195: warning: syntax error: empty declaration
http://hg.dovecot.org/dovecot-2.0/rev/88b6665b48da fixes this.
"imap-match.c", line 199: identifier redeclared: imap_match_dup
I don't really understand this. Maybe the above fix solves this too?
The above fix fixes only the syntax errors "empty declaration". The two errors "identifier redeclared" can be fixed by removing the redeclared identifiers from the header file imap-match.h:
*** ./src/lib-imap/imap-match.h.orig Wed Apr 28 16:47:31 2010 --- ./src/lib-imap/imap-match.h Tue Jun 15 14:43:01 2010
*** 29,40 **** bool inboxcase, char separator); void imap_match_deinit(struct imap_match_glob **glob);
! struct imap_match_glob * ! imap_match_dup(pool_t pool, const struct imap_match_glob *glob); /* Returns TRUE if two globs were created with same init() parameters (but inboxcase is ignored if no patterns can match INBOX) */ ! bool imap_match_globs_equal(const struct imap_match_glob *glob1, ! const struct imap_match_glob *glob2);
enum imap_match_result imap_match(struct imap_match_glob *glob, const char *data); --- 29,40 ---- bool inboxcase, char separator); void imap_match_deinit(struct imap_match_glob **glob);
! /* struct imap_match_glob * ! imap_match_dup(pool_t pool, const struct imap_match_glob *glob); */ /* Returns TRUE if two globs were created with same init() parameters (but inboxcase is ignored if no patterns can match INBOX) */ ! /* bool imap_match_globs_equal(const struct imap_match_glob *glob1, ! const struct imap_match_glob *glob2); */
enum imap_match_result imap_match(struct imap_match_glob *glob, const char *data);
The compilation then continues but finds one more error in expire plugin:
Making all in expire
gmake[4]: Entering directory `/net/fileserv/export/sunsrc/src/dovecot-2.0.beta6/src/plugins/expire'
source='doveadm-expire.c' object='doveadm-expire.lo' libtool=yes
DEPDIR=.deps depmode=none /bin/bash ../../../depcomp
/bin/bash ../../../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib-auth -I../../../src/lib-dict -I../../../src/lib-settings -I../../../src/lib-master -I../../../src/lib-mail -I../../../src/lib-imap -I../../../src/lib-index -I../../../src/lib-storage -I../../../src/lib-storage/index -I../../../src/doveadm -I/usr/local/include -fast -xarch=v8plusa -c -o doveadm-expire.lo doveadm-expire.c
libtool: compile: cc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib-auth -I../../../src/lib-dict -I../../../src/lib-settings -I../../../src/lib-master -I../../../src/lib-mail -I../../../src/lib-imap -I../../../src/lib-index -I../../../src/lib-storage -I../../../src/lib-storage/index -I../../../src/doveadm -I/usr/local/include -fast -xarch=v8plusa -c doveadm-expire.c -KPIC -DPIC -o .libs/doveadm-expire.o
"doveadm-expire.c", line 324: void function cannot return value
cc: acomp failed for doveadm-expire.c
Thanks, Jürgen
-- Hochschulrechenzentrum der | Mail: Juergen.Obermann@hrz.uni-giessen.de Justus-Liebig-Universitaet | WWW: http://www.uni-giessen.de/obermann Heinrich-Buff-Ring 44 | Tel: 0641-99-13054 (0641-99-13001) D-35392 Giessen, Germany | Fax: 0641-99-13009
On Tue, 2010-06-15 at 15:27 +0200, Juergen Obermann wrote:
The above fix fixes only the syntax errors "empty declaration". The two errors "identifier redeclared" can be fixed by removing the redeclared identifiers from the header file imap-match.h: .. ! struct imap_match_glob * ! imap_match_dup(pool_t pool, const struct imap_match_glob *glob); /* Returns TRUE if two globs were created with same init() parameters (but inboxcase is ignored if no patterns can match INBOX) */ ! bool imap_match_globs_equal(const struct imap_match_glob *glob1, ! const struct imap_match_glob *glob2);
In my imap-match.h these are the only declarations for these functions. I don't see them being redeclared anywhere.
The only special thing I see about those functions compared to others is that they use const struct, while others don't (but I use const structs in many other places).
"doveadm-expire.c", line 324: void function cannot return value cc: acomp failed for doveadm-expire.c
participants (2)
-
Juergen Obermann
-
Timo Sirainen