Problem Compiling 1.1.1 on AIX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem Compiling 1.1.1 on AIX

Jackie Hunt
Hi all,

We've been running Dovecot since December '07 with with no glitches.
It's a great solid piece of software, thanks so much Timo!!

I thought I'd try out 1.1.1, so I brought it down and tried compiling
it on AIX, using the IBM compiler, xlc.  It's what I've used all along.
The error I'm seeing on the make is:

        source='array.c' object='array.o' libtool=no  DEPDIR=.deps depmode=aix /
bin/sh ../../depcomp  xlc -DHAVE_CONFIG_H -I. -I../..    -I/usr/local/openssl_0.
9.7e/include  -g -qcpluscmt  -c array.c
"macros.h", line 149.68: 1506-211 (S) Parameter list must be empty, or consist o
f one or more identifiers separated by commas.
make: 1254-004 The error code from the last command is 1.


Looking at macros.h, the section it is erroring on is:

#ifdef CONTEXT_TYPE_SAFETY
#  define CONTEXT_CALLBACK(name, callback_type, callback, context, ...) \
        ({(void)(1 ? 0 : callback(context)); \
        name(__VA_ARGS__, (callback_type *)callback, context); })
#else
#  define CONTEXT_CALLBACK(name, callback_type, callback, context, ...) \
        name(__VA_ARGS__, (callback_type *)callback, context)
#endif

The second define is the line the error occurs on.  Has anyone seen this
before.  I'm assuming xlc can't handle the '...' parameter, and an hoping
there is an option I can enable.  Just thought I might see if anyone else
has already solved this issue.

Thanks much!
Jackie
----
Jackie Hunt                                                      
ACNS                    
Colorado State University
Fort Collins, CO  80523
Reply | Threaded
Open this post in threaded view
|

Re: Problem Compiling 1.1.1 on AIX

Woonsan Ko
Hi Jackie,

I compiled dovecot-1.1.1 on AIX 5.3 with xlc, "IBM(R) XL C/C++ Enterprise Edition V8.0 for AIX(R)", but I didn't see that error. Which version of xlc are you using?

In my case, I succeeded in making it after modification of two generated sources:

(1) src/plugins/quota/rquota.h
  I added `#include <rpc/rpc.h>' on the top.
(2) src/plugins/quota/rquota_xdr.c
  I modified it like the following:
    #include "/usr/include/rpcsvc/rquota.h"
    ==>
    #include "rquota.h"

Regards,

Woonsan

--- On Wed, 6/25/08, Jackie Hunt <[hidden email]> wrote:

> From: Jackie Hunt <[hidden email]>
> Subject: [Dovecot] Problem Compiling 1.1.1 on AIX
> To: [hidden email]
> Date: Wednesday, June 25, 2008, 6:35 AM
> Hi all,
>
> We've been running Dovecot since December '07 with
> with no glitches.
> It's a great solid piece of software, thanks so much
> Timo!!
>
> I thought I'd try out 1.1.1, so I brought it down and
> tried compiling
> it on AIX, using the IBM compiler, xlc.  It's what
> I've used all along.
> The error I'm seeing on the make is:
>
>         source='array.c' object='array.o'
> libtool=no  DEPDIR=.deps depmode=aix /
> bin/sh ../../depcomp  xlc -DHAVE_CONFIG_H -I. -I../..  
> -I/usr/local/openssl_0.
> 9.7e/include  -g -qcpluscmt  -c array.c
> "macros.h", line 149.68: 1506-211 (S) Parameter
> list must be empty, or consist o
> f one or more identifiers separated by commas.
> make: 1254-004 The error code from the last command is 1.
>
>
> Looking at macros.h, the section it is erroring on is:
>
> #ifdef CONTEXT_TYPE_SAFETY
> #  define CONTEXT_CALLBACK(name, callback_type, callback,
> context, ...) \
>         ({(void)(1 ? 0 : callback(context)); \
>         name(__VA_ARGS__, (callback_type *)callback,
> context); })
> #else
> #  define CONTEXT_CALLBACK(name, callback_type, callback,
> context, ...) \
>         name(__VA_ARGS__, (callback_type *)callback,
> context)
> #endif
>
> The second define is the line the error occurs on.  Has
> anyone seen this
> before.  I'm assuming xlc can't handle the
> '...' parameter, and an hoping
> there is an option I can enable.  Just thought I might see
> if anyone else
> has already solved this issue.
>
> Thanks much!
> Jackie
> ----
> Jackie Hunt                                                
>      
> ACNS                    
> Colorado State University
> Fort Collins, CO  80523


     
Reply | Threaded
Open this post in threaded view
|

Re: Problem Compiling 1.1.1 on AIX

Jackie Hunt
>
> Hi Jackie,
>
> I compiled dovecot-1.1.1 on AIX 5.3 with xlc, "IBM(R) XL C/C++ Enterprise
> Edition V8.0 for AIX(R)", but I didn't see that error. Which version of
> xlc are you using?

Thanks for the feedback, Woonsan.  Good to know it works for you.  
We do have a very old copy of the compiler:  

C for AIX Compiler Version 5.0.1.0

I'm sure that is my issue.  I think it is a "variadic macro extension"
feature that isn't supported by our version.

>
> In my case, I succeeded in making it after modification of two generated sources:
>
> (1) src/plugins/quota/rquota.h
>   I added `#include <rpc/rpc.h>' on the top.
> (2) src/plugins/quota/rquota_xdr.c
>   I modified it like the following:
>     #include "/usr/include/rpcsvc/rquota.h"
>     ==>
>     #include "rquota.h"


Thanks for this as well.  I may need it, once I get my compiler issue
fixed!

Jackie
---
Jackie Hunt                                                      
ACNS                      
Colorado State University
Fort Collins, CO  80523  
Reply | Threaded
Open this post in threaded view
|

Re: Problem Compiling 1.1.1 on AIX

Timo Sirainen
In reply to this post by Jackie Hunt
On Tue, 2008-06-24 at 15:35 -0600, Jackie Hunt wrote:

> Looking at macros.h, the section it is erroring on is:
>
> #ifdef CONTEXT_TYPE_SAFETY
> #  define CONTEXT_CALLBACK(name, callback_type, callback, context, ...) \
>         ({(void)(1 ? 0 : callback(context)); \
>         name(__VA_ARGS__, (callback_type *)callback, context); })
> #else
> #  define CONTEXT_CALLBACK(name, callback_type, callback, context, ...) \
>         name(__VA_ARGS__, (callback_type *)callback, context)
> #endif
>
> The second define is the line the error occurs on.  Has anyone seen this
> before.  I'm assuming xlc can't handle the '...' parameter, and an hoping
> there is an option I can enable.  Just thought I might see if anyone else
> has already solved this issue.
Can you somehow enable C99 support for xlc? Is there something like a
-c99 parameter?


signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem Compiling 1.1.1 on AIX

Asheesh Laroia
On Wed, 25 Jun 2008, Timo Sirainen wrote:

> Can you somehow enable C99 support for xlc? Is there something like a
> -c99 parameter?

P.S. Is it possible to just try installing the GNU Compiler
Collection, and then compiling with GCC on your platform?

-- Asheesh.

--
Hiccuping & trembling into the WASTE DUMPS of New Jersey like some
drunken CABBAGE PATCH DOLL, coughing in line at FIORUCCI'S!!
Reply | Threaded
Open this post in threaded view
|

Re: Problem Compiling 1.1.1 on AIX

Jackie Hunt
In reply to this post by Timo Sirainen
> Can you somehow enable C99 support for xlc? Is there something like a
> -c99 parameter?

Thank Timo, Woosan and Asheesh for your help.  I did see a parameter for
xlc (-qlanglvl=extc99), but our compiler is too old, and it doesn't recognize
it.  I then tried gcc, we had version 4.0.0 installed, and it does compile.
I did have to do the changes Woonsan recommended (below).  

> In my case, I succeeded in making it after modification of two
> generated sources:
>
> (1) src/plugins/quota/rquota.h
>     I added `#include <rpc/rpc.h>' on the top.
> (2) src/plugins/quota/rquota_xdr.c
>     I modified it like the following:
>       #include "/usr/include/rpcsvc/rquota.h"
>       ==>
>       #include "rquota.h"

My compiliation method wasn't very elegant.  I did the make, saw an error,
and rquota.h was created.  I edited rquota.h as shown above.  I ran make
a second time which errored, but generated rquota_xdr.c.  I edited
rquota_xdr.c, and the third make succeeded.  Is there a cleaner method
to use?

Thanks again, it's very comforting to know I can compile it!

Jackie
---
Jackie Hunt                                                      
ACNS                            
Colorado State University      
Fort Collins, CO  80523