dovecot-2.2.16 compilation problems under Solaris Studio 11
Hello
here are two problems I get when I compile dovecot 2.2.16 under
Solaris 10 with Studio 11 Compiler:
gmake[4]: Entering directory
/net/fileserv/export/sunsrc/src/dovecot-2.2.16/src/lib' source='test-array.c' object='test_lib-test-array.o' libtool=no \ DEPDIR=.deps depmode=none /bin/bash ../../depcomp \ cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib-test -I/opt/local/include -I/usr/local/include -fast -xarch=v8plusa -I/opt/local/include -c -o test_lib-test-array.o
test -f
'test-array.c' || echo './'`test-array.c
"test-array.c", line 129: warning: initializer does not fit or is out
of range: -32768
"test-array.c", line 129: warning: initializer does not fit or is out
of range: -16384
"test-array.c", line 129: warning: initializer does not fit or is out
of range: -512
"test-array.c", line 129: warning: initializer does not fit or is out
of range: -256
"test-array.c", line 129: warning: initializer does not fit or is out
of range: -128
"test-array.c", line 129: warning: initializer does not fit or is out
of range: -64
"test-array.c", line 129: warning: initializer does not fit or is out
of range: -2
"test-array.c", line 129: warning: initializer does not fit or is out
of range: -1
"test-array.c", line 154: operand cannot have void type: op "="
"test-array.c", line 154: assignment type mismatch:
unsigned short "=" const void
"test-array.c", line 206: operand cannot have void type: op "="
"test-array.c", line 206: assignment type mismatch:
pointer to const char "=" const void
cc: acomp failed for test-array.c
gmake[4]: [test_lib-test-array.o] Fehler 2 (ignoriert)
gmake[3]: Entering directory
`/net/fileserv/export/sunsrc/src/dovecot-2.2.16/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/opt/local/include
-I/usr/local/include -fast -xarch=v8plusa -I/opt/local/include -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/opt/local/include -I/usr/local/include -fast -xarch=v8plusa
-I/opt/local/include -c imap-match.c -KPIC -DPIC -o .libs/imap-match.o
"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 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] Fehler 1 (ignoriert)
Greetings 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 08/04/2015 15:24, Jürgen Obermann wrote:
Hello Jürgen,
here are two problems I get when I compile dovecot 2.2.16 under Solaris 10 with Studio 11 Compiler:
Is there a reason to use a 10 year old compiler? Try 12.4:
http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/ind...
I am using Solaris 10 and dovecot compiled with SS12.4.
James.
On 08 Apr 2015, at 19:25, James <lista@xdrv.co.uk> wrote:
On 08/04/2015 15:24, Jürgen Obermann wrote:
Hello Jürgen,
here are two problems I get when I compile dovecot 2.2.16 under Solaris 10 with Studio 11 Compiler:
Is there a reason to use a 10 year old compiler? Try 12.4:
http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/ind...
I am using Solaris 10 and dovecot compiled with SS12.4.
I’m using Solaris 11 and SS 12.4, but I can still replicate the issue. It’s seems not to be compiler version or operating system version tied. Dovecot does compile but I can see the error during the compile.
Sami
On 10/04/2015 15:27, Sami Ketola wrote:
I’m using Solaris 11 and SS 12.4, but I can still replicate the issue. It’s seems not to be compiler version or operating system version tied. Dovecot does compile but I can see the error during the compile.
Which issue, what error? The warning about sloppy programming (putting a negative number in an unsigned value) can be ignored. I see no compile error.
James.
On Fri, Apr 10, 2015 at 06:52:16PM +0100, James wrote:
On 10/04/2015 15:27, Sami Ketola wrote:
I???m using Solaris 11 and SS 12.4, but I can still replicate the issue. It???s seems not to be compiler version or operating system version tied. Dovecot does compile but I can see the error during the compile.
Which issue, what error? The warning about sloppy programming (putting a negative number in an unsigned value) can be ignored. I see no compile error.
Some people like -Werror, or whatever the local equivalent is, and therefore we strive to not have any compiler warnings.
I'll note that the "sloppy" code has perfectly well defined semantics in N1570 (6.7.9p11, 6.5.16.1p2, and 6.3.1.3p2). It's as idiomatic as ``unsigned int foo = -1;'', which doesn't cause me to bat an eyelid.
However, for the sake of -Werror and other static code analysis tools, a patch will very soon be in the dovecot.org tree.
Phil
participants (4)
-
James
-
Jürgen Obermann
-
Phil Carmody
-
Sami Ketola