[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] Problems compiling



On Fri, Sep 05, 2003 at 05:23:41AM -0600, Izzy Blacklock wrote:
> I'm currently working with coldsync-3.0-pre3, which produces this erro
>>r 
> message on make:
> 
> ----------- 8< --------------
> 
> coldsync.c: In function `open_log_file':
> coldsync.c:494: warning: passing arg 1 of `Error' makes pointer from integer 
> without a cast
> coldsync.c:509: warning: passing arg 1 of `Error' makes pointer from integer 
> without a cast
> coldsync.c:522: warning: passing arg 1 of `Error' makes pointer from integer 
> without a cast
> coldsync.c:533: warning: passing arg 2 of `fprintf' makes pointer from integer 
> without a cast
> coldsync.c: In function `open_tempfile':
> coldsync.c:560: warning: passing arg 1 of `Error' makes pointer from integer 
> without a cast
> make[1]: *** [coldsync.o] Error 1
> 
> ----------- 8< --------------

	These errors appear to be due to constructs of the form
		_("some string")
This should expand to
		gettext("some string")
Presumably gettext() isn't declared in that context. At this point, I
would run coldsync.c through the preprocessor: grab the
		cc ... -c -o coldsync.o coldsync.c
command from the output of 'make', but run it as
		cc ... -E coldsync.c
(and save the output to a file, or pipe it through 'less'). Make sure
that the problematic lines (in open_log_file(), according to what you
sent, so you can grep for that) look reasonable. Line 494, for
instance, should look like "Error(gettext("some string"))".
	If so, see if gettext() is declared somewhere above. If it
isn't, try to see why. Perhaps the output from 'configure' might give
a clue.

> I was playing around with .configure options and with --without-i18n, 
> coldsync.o compiles, but I get this error:
> 
> ----------- 8< --------------
> 
> misc.c: In function `Verbose':
> misc.c:160: `va_list' undeclared (first use in this function)
> misc.c:160: parse error before "ap"
> misc.c:165: `ap' undeclared (first use in this function)
> misc.c: In function `mkfname':
> misc.c:202: `va_list' undeclared (first use in this function)
> misc.c:202: parse error before "ap"
> misc.c:210: `ap' undeclared (first use in this function)
> misc.c:229: warning: implicit declaration of function `va_arg'
> misc.c:229: parse error before "const"
> misc.c:236: warning: implicit declaration of function `va_end'
> make[1]: *** [misc.o] Error 1
> 
> ----------- 8< --------------
> 
> Any idea what is missing?  If needed, I can provide more of the make o
>>utput or 
> the .configure output.  

	Obviously it's not finding the declarations necessary for
variable argument lists. These should be declared in <stdarg.h>. Take
a look at /usr/include/stdarg.h to make sure that va_list, va_start(),
etc. are declared there. You can use the "cc -E" trick above to make
sure that <stdarg.h> is being included. It should be, unless
STDC_HEADERS is unset in "config.h". Check the output of 'configure'
to see whether it can find <stdarg.h> and the rest of the standard
headers.

-- 
Andrew Arensburger                      This message *does* represent the
arensb@ooblick.com                      views of ooblick.com
		   Have you crashed Windows today?
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.