TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [TCLUG:6991] acapd compile errors



I'll take a crack at that.  Without looking at the source code, here are
some pointers.

Firstly, the syntax looks a bit strange.  If data->db->cursor is a function
pointer the correct syntax should be like this

result = (*data->db->cursor)(data->db, trx_DB_TXN(trx), (*stream)->cursor,
0);

But assuming the syntax is right, you need to find where data->db->cursor is
being initialized prior to this call.  It should be initialized by a
function name (pointer actually).  If not, keep cascading backwards till you
find the function.  Next compare the count and type of arguments of that
function with the ones being passed here.  The compile error indicates, i
think, that there is a mismatch in the number of arguments (probably that
last '0'). (This could of course be the symptom of a different problem like
your #includes are pulling in the wrong function prototypes)

Hope this helps.  I just couldn't resist debugging a compile error.

:)

-Unni


> -----Original Message-----
> From: Ben Luey [mailto:lueyb@carleton.edu]
> Sent: Thursday, July 15, 1999 2:43 PM
> To: tclug-list@listserv.real-time.com
> Subject: [TCLUG:6991] acapd compile errors
> 
> 
> I'm trying to compile cyrus's acapd daemon. Anyone have an experiences
> with it or a binary? I have a pretty normal mandrake 6.0 
> install. I rpmed
> yacc and flex and ran configure on acapd and then make. Here 
> is my error.
> Any ideas? Thanks,
> 
> Ben
> 
> 
> In file included from /usr/include/stdlib.h:339,
>                  from dataset_data.c:31:
> /usr/include/sys/types.h:174: warning: redefinition of `u_int8_t'
> ../util/util.h:39: warning: `u_int8_t' previously declared here
> /usr/include/sys/types.h:175: warning: redefinition of `u_int16_t'
> ../util/util.h:40: warning: `u_int16_t' previously declared here
> /usr/include/sys/types.h:176: warning: redefinition of `u_int32_t'
> ../util/util.h:41: warning: `u_int32_t' previously declared here
> dataset_data.c: In function `dataset_data_stream_alloc':
> dataset_data.c:406: too many arguments to function
> make[2]: *** [dataset_data.o] Error 1
> make[2]: Leaving directory 
> `/home/lueyb/install/cyrus-acapd-v2.2a2/acapd'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/lueyb/install/cyrus-acapd-v2.2a2'
> make: *** [all-recursive-am] Error 2
> 
> 
> around line 406 in dataset_data is:
> 
>   if (!data->db) {
>     (*stream)->cursor = NULL;
>   } else {
>     result = data->db->cursor(data->db,
>                               trx_DB_TXN(trx),
>                               &(*stream)->cursor, 0);    --line 406
>     if (result < 0)
>       result = ACAP_ERR_DB;
>     if (result) {
>       free(*stream);
>       *stream = NULL;
>       return result;
>     }
>   }
> 
> 
> 
> 
> 
> 
> Ben Luey
> lueyb@carleton.edu
> ICQ: 19144397
> 
> Political power grows out of the barrel of a gun."  -- Mao Tse-tung
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
>