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

Re: [coldsync-hackers] make Errors running on SuSE 8.1



On Mon, Feb 24, 2003 at 08:27:00PM +0100, Peer Oliver Schmidt wrote:
> make[2]: Leaving directory `/usr/src/phprojekt/coldsync/src/conduits'
> all: Leaving directory `./src/conduits'
> sh ./conduits2include.sh >conduits.h
> gcc -Wall -ansi -pedantic -g -O2 -DHAVE_CONFIG_H  -I. -I./.. -I./../include 
> -I/usr/local/include -c coldsync.c
> cc1: warning: changing search order for system directory 
> "/usr/local/include"

	Are you running gcc 3.2? If so, I believe this message is
harmless.

> cc1: warning:   as it has already been specified as a non-system directory
> coldsync.c: In function `main':
> coldsync.c:119: warning: implicit declaration of function `setlocale'
> coldsync.c:119: `LC_ALL' undeclared (first use in this function)
> coldsync.c:119: (Each undeclared identifier is reported only once
> coldsync.c:119: for each function it appears in.)
> coldsync.c:120: warning: implicit declaration of function `bindtextdomain'
> coldsync.c:121: warning: implicit declaration of function `textdomain'

	This is obviously undesirable, but I'm not sure how this can
be fixed. Could you please check on your system and see where
setlocale(), LC_ALL, bindtextdomain(), and textdomain() are declared
and defined? If the man pages are well written, they should list how
you're supposed to use them.
	I suspect that some vendors have shuffled various i18n-related
functions around, so that ColdSync isn't finding all of the bits and
pieces where it thinks they should be.

> If creating the makefiles with 
> ./configure --without-libusb --without-i18n --without-ipv6
> I get the following errors
> 
> misc.c: In function `Warn':
> misc.c:73: warning: implicit declaration of function `va_start'
> misc.c:71: warning: `ap' might be used uninitialized in this function
> misc.c: In function `Error':
> misc.c:104: warning: `ap' might be used uninitialized in this function
> misc.c: In function `Verbose':
> misc.c:160: warning: `ap' might be used uninitialized in this function
> misc.c: In function `mkfname':
> 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
> make[1]: Leaving directory `/usr/src/phprojekt/coldsync/src'
> make: *** [all] Error 1

	Evidently the compiler isn't finding the declarations for
variable-length argument lists. These declarations should be in
<stdarg.h>, so the question is why the compiler isn't finding them.
	Check that /usr/include/stdarg.h exists. I'm pretty sure it
does.
	Check that the "config.h" file created by 'configure' contains

	/* Define if you have the ANSI C header files.  */
	#define STDC_HEADERS 1

If it doesn't, then there's a problem with 'configure'. The file
"config.log" contains more detailed information; look for a line that
says, "checking for ANSI C header files". If that test failed, there
will be additional information, including the specific compiler
invocation and the program that it tried to compile.
	Basically, 'configure' just tries to compile

	#include <stdlib.h>
	#include <stdarg.h>
	#include <string.h>
	#include <float.h>

If this succeeds, 'configure' concludes that it has all of the ANSI C
header files. I believe this has been known to fail under Redhat 8.0
with gcc 3.2, but I don't know why. If you could try compiling this
the same way as 'configure' and see what you get, that would be
helpful.
	In the meantime, if you know that you have all of these header
files, then after you've run 'configure', you can edit "config.h" and
define STDC_HEADERS as above. Then ColdSync ought to compile.
Obviously this isn't a good solution.

-- 
Andrew Arensburger                      This message *does* represent the
arensb@ooblick.com                      views of ooblick.com
	   Today is Monday, cleverly disguised as Tuesday.
-- 
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.