Hi, I recently compiled dovecot-2.1.1 on Solaris 10 with Sun Studio, but when I want to compile Sieve for this version (dovecot-2.1-pigeonhole-0.3.0) I get an error:
"sieve.c", line 578: identifier redeclared: sieve_multiscript_run and I see that declaration in sieve.h is different from definition in sieve.c, so compilation process fails with SunStudio cc compiler. I have done a quick hack to correct this, and then compiled successfully. Patch is included as attachment. Full output, OS and compiler versions below: libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -I/home/soft/dovecot/dovecot-2.1.1 -I/home/soft/dovecot/dovecot-2.1.1/src/lib -I/home/soft/dovecot/dovecot-2.1.1/src/lib-dict -I/home/soft/dovecot/dovecot-2.1.1/src/lib-dns -I/home/soft/dovecot/dovecot-2.1.1/src/lib-mail -I/home/soft/dovecot/dovecot-2.1.1/src/lib-imap -I/home/soft/dovecot/dovecot-2.1.1/src/lib-fs -I/home/soft/dovecot/dovecot-2.1.1/src/lib-charset -I/home/soft/dovecot/dovecot-2.1.1/src/lib-index -I/home/soft/dovecot/dovecot-2.1.1/src/lib-storage -I/home/soft/dovecot/dovecot-2.1.1/src/lib-storage/index -I/home/soft/dovecot/dovecot-2.1.1/src/lib-storage/index/raw -I/home/soft/dovecot/dovecot-2.1.1/src/lib-lda -I/home/soft/dovecot/dovecot-2.1.1/src/lda -I/home/soft/dovecot/dovecot-2.1.1/src/lib-master -I/home/soft/dovecot/dovecot-2.1.1/src/lib-settings -DMODULEDIR=\"/usr/local/dovecot-2.1.1/lib/dovecot\" -I/usr/local/openldap/include -I/usr/local/ssl/include -I/usr/local/include -xO3 -xautopar -c sieve.c -KPIC -DPIC -o .libs/sieve.o "sieve-common.h", line 33: warning: useless declaration "/home/soft/dovecot/dovecot-2.1.1/src/lib-storage/mailbox-list.h", line 13: warning: useless declaration "sieve.c", line 578: identifier redeclared: sieve_multiscript_run current : function(pointer to struct sieve_multiscript {pointer to struct sieve_instance {..} svinst, pointer to struct sieve_result {..} result, pointer to const struct sieve_message_data {..} msgdata, pointer to const struct sieve_script_env {..} scriptenv, int status, _Bool active, _Bool keep, pointer to struct ostream {..} teststream}, pointer to struct sieve_binary {}, pointer to struct sieve_error_handler {pointer to struct pool {..} pool, int refcount, pointer to struct sieve_instance {..} svinst, pointer to struct sieve_error_handler {..} parent, unsigned int max_errors, unsigned int errors, unsigned int warnings, _Bool log_info, _Bool log_debug, pointer to function(..) returning void verror, pointer to function(..) returning void vwarning, pointer to function(..) returning void vinfo, pointer to function(..) returning void vdebug, pointer to function(..) returning void free}, unsigned int, _Bool) returning _Bool previous: function(pointer to struct sieve_multiscript {pointer to struct sieve_instance {..} svinst, pointer to struct sieve_result {..} result, pointer to const struct sieve_message_data {..} msgdata, pointer to const struct sieve_script_env {..} scriptenv, int status, _Bool active, _Bool keep, pointer to struct ostream {..} teststream}, pointer to struct sieve_binary {}, pointer to struct sieve_error_handler {pointer to struct pool {..} pool, int refcount, pointer to struct sieve_instance {..} svinst, pointer to struct sieve_error_handler {..} parent, unsigned int max_errors, unsigned int errors, unsigned int warnings, _Bool log_info, _Bool log_debug, pointer to function(..) returning void verror, pointer to function(..) returning void vwarning, pointer to function(..) returning void vinfo, pointer to function(..) returning void vdebug, pointer to function(..) returning void free}, enum sieve_runtime_flags {SIEVE_RUNTIME_FLAG_NOGLOBAL(1)}, _Bool) returning _Bool : "sieve.h", line 168 cc: acomp failed for sieve.c *** Error code 1 dmake: Fatal error: Command failed for target `sieve.lo' Current working directory /home/soft/dovecot/dovecot-2.1-pigeonhole-0.3.0/src/lib-sieve *** Error code 1 The following command caused the error: fail= failcom='exit 1'; \ for f in x $MAKEFLAGS; do \ case $f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo all-recursive | sed s/-recursive//`; \ list='plugins'; for subdir in $list; do \ echo "Making $target in $subdir"; \ if test "$subdir" = "."; then \ dot_seen=yes; \ local_target="$target-am"; \ else \ local_target="$target"; \ fi; \ (cd $subdir && dmake $local_target) \ || eval $failcom; \ done; \ if test "$dot_seen" = "no"; then \ dmake "$target-am" || exit 1; \ fi; test -z "$fail" dmake: Fatal error: Command failed for target `all-recursive' % uname -a SunOS soft 5.10 Generic_142909-17 sun4u sparc SUNW,Sun-Fire-V890 Solaris % version Machine hardware: sun4u OS version: 5.10 Processor type: sparc Hardware: SUNW,Sun-Fire-V890 The following components are installed on your system: Sun Studio 12 update 1 Sun Studio 12 update 1 C Compiler Sun Studio 12 update 1 C++ Compiler Sun Studio 12 update 1 Tools.h++ 7.1 Sun Studio 12 update 1 C++ Standard 64-bit Class Library Sun Studio 12 update 1 Garbage Collector Sun Studio 12 update 1 Fortran 95 Sun Studio 12 update 1 Debugging Tools (including dbx) Sun Studio 12 update 1 IDE Sun Studio 12 update 1 Performance Analyzer (including collect, ...) Sun Studio 12 update 1 Performance Library Sun Studio 12 update 1 Scalapack Sun Studio 12 update 1 LockLint Sun Studio 12 update 1 Building Software (including dmake) Sun Studio 12 update 1 Documentation Set Sun Studio 12 update 1 /usr symbolic links and GNOME menu item version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/cc": Sun C 5.10 SunOS_sparc 2009/06/03 version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/CC": Sun C++ 5.10 SunOS_sparc 2009/06/03 version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.4 SunOS_sparc 2009/06/03 version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dbx": Sun DBX Debugger 7.7 SunOS_sparc 2009/06/03 version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/analyzer": Sun Analyzer 7.7 SunOS_sparc 2009/06/03 version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.9 SunOS_sparc 2009/06/03 Regards -- [ Piotr Tarnowski piotr.tarnow...@us.edu.pl ] [ Unix Administrator at University of Silesia, Katowice, Poland ]
--- src/lib-sieve/sieve.h.orig 2012-02-29 13:07:45.809439400 +0100 +++ src/lib-sieve/sieve.h 2012-02-29 13:10:33.874018500 +0100 @@ -167,8 +167,7 @@ bool sieve_multiscript_run (struct sieve_multiscript *mscript, struct sieve_binary *sbin, - struct sieve_error_handler *ehandler, enum sieve_runtime_flags flags, - bool final); + struct sieve_error_handler *ehandler, unsigned int flags, bool final); int sieve_multiscript_status(struct sieve_multiscript *mscript);
smime.p7s
Description: S/MIME Cryptographic Signature