[Dovecot] libsieve compilation error on AIX 5.3
Dovecot revision: 9186:f70192e7ff3c libsieve revision: 958:e86a81f4bf28 Using IBM c compiler version 8.
Trying to compile libsieve(64 bit mode if it matters):
"sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier last.
"sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier result.
"sieve-ast.c", line 320.9: 1506-275 (S) Unexpected text node
encountered.
"sieve-ast.c", line 320.9: 1506-045 (S) Undeclared identifier node.
"sieve-ast.c", line 324.9: 1506-045 (S) Undeclared identifier last.
"sieve-ast.c", line 324.9: 1506-045 (S) Undeclared identifier result.
gmake[4]: *** [sieve-ast.lo] Error 1
Thanks, Jonathan
Jonathan Siegle wrote:
Dovecot revision: 9186:f70192e7ff3c libsieve revision: 958:e86a81f4bf28 Using IBM c compiler version 8.
Trying to compile libsieve(64 bit mode if it matters):
"sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier last. "sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier result. "sieve-ast.c", line 320.9: 1506-275 (S) Unexpected text node encountered. "sieve-ast.c", line 320.9: 1506-045 (S) Undeclared identifier node. "sieve-ast.c", line 324.9: 1506-045 (S) Undeclared identifier last. "sieve-ast.c", line 324.9: 1506-045 (S) Undeclared identifier result.
Apparently, the typeof() operator is not supported by your C compiler. Having relatively little experience with cross-platform programming, I did not notice that the typeof operator is not part of the main ANSI C standard. I've removed it from the sources entirely (making things somewhat more ugly), so your problem should be resolved with the following changes:
http://hg.rename-it.nl/dovecot-libsieve/rev/bd106aa05040
I browsed the web a little and found that IBM C should at least support __typeof__(e), and, with the appropriate command line options, typeof as well. Timo, do you know how this works and other systems that may be affected? Or is it a better idea to avoid typeof() in general?
Regards,
Stephan.
On Jul 6, 2009, at 9:13 AM, Stephan Bosch wrote:
Jonathan Siegle wrote:
Dovecot revision: 9186:f70192e7ff3c libsieve revision: 958:e86a81f4bf28 Using IBM c compiler version 8. Trying to compile libsieve(64 bit mode if it matters): "sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier last. "sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier result. "sieve-ast.c", line 320.9: 1506-275 (S) Unexpected text node
encountered. "sieve-ast.c", line 320.9: 1506-045 (S) Undeclared identifier node. "sieve-ast.c", line 324.9: 1506-045 (S) Undeclared identifier last. "sieve-ast.c", line 324.9: 1506-045 (S) Undeclared identifier result.Apparently, the typeof() operator is not supported by your C
compiler. Having relatively little experience with cross-platform
programming, I did not notice that the typeof operator is not part
of the main ANSI C standard. I've removed it from the sources
entirely (making things somewhat more ugly), so your problem should
be resolved with the following changes:
Ok. I added -qkeyword=typeof to my CFLAGS and the errors go away and
no further issues on compilation.
I didn't have to update to this to make it compile. I don't know if
you need to keep that patch set around.
Thanks! Jonathan
I browsed the web a little and found that IBM C should at least
support __typeof__(e), and, with the appropriate command line
options, typeof as well. Timo, do you know how this works and other
systems that may be affected? Or is it a better idea to avoid
typeof() in general?Regards,
Stephan.
Jonathan Siegle wrote:
Ok. I added -qkeyword=typeof to my CFLAGS and the errors go away and no further issues on compilation.
Ok. Now why does autoconf not automatically handle this CFLAG? Timo?
I didn't have to update to this to make it compile. I don't know if you need to keep that patch set around.
That depends on whether there are any other Dovecot-supported compilers out there that would fail on this code.
Regards,
Stephan.
On Mon, 2009-07-06 at 15:54 +0200, Stephan Bosch wrote:
Jonathan Siegle wrote:
Ok. I added -qkeyword=typeof to my CFLAGS and the errors go away and no further issues on compilation.
Ok. Now why does autoconf not automatically handle this CFLAG? Timo?
I don't think autoconf tries to enable random C extensions to compilers.
I didn't have to update to this to make it compile. I don't know if you need to keep that patch set around. That depends on whether there are any other Dovecot-supported compilers out there that would fail on this code.
typeof() isn't in any C standard, so I've used it only optionally with #ifdef __GNUC__ to get better type checking.
participants (3)
-
Jonathan Siegle
-
Stephan Bosch
-
Timo Sirainen