Your message dated Sun, 3 Oct 2010 10:49:20 +0100
with message-id <[email protected]>
and subject line Missing definition in <time.h>
has caused the Debian Bug report #596198,
regarding qofdate.c:821: warning: implicit declaration of function '__isleap'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
596198: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=596198
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: qof
Version: 0.8.1

Hi, I'm a maintainer with the MacPorts project, where I'm trying to create a 
package for qof. I can't get it to build on Mac OS X 10.6.4 Snow Leopard, and I 
was advised by Neil Williams to report this bug here. After running 
"./configure --prefix=/opt/local --disable-sqlite" and "make" I get this error:

libtool: compile:  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. 
-DPREFIX=\"/opt/local\" -DDATADIR=\"/opt/local/share\" -I/opt/local/include -g 
-DQOF_LIB_DIR=\"/opt/local/lib/qof2\" -Werror -Wdeclaration-after-statement 
-Wno-pointer-sign -I/opt/local/include/libgda-3.0 -I/opt/local/include/glib-2.0 
-I/opt/local/lib/glib-2.0/include -I/opt/local/include 
-I/opt/local/include/libxml2 -I/opt/local/include/glib-2.0 
-I/opt/local/lib/glib-2.0/include -I/opt/local/include -pipe -O2 -arch x86_64 
-g2 -Wall -MT qofdate.lo -MD -MP -MF .deps/qofdate.Tpo -c qofdate.c  
-fno-common -DPIC -o .libs/qofdate.o
cc1: warnings being treated as errors
qofdate.c: In function 'qof_date_to_struct_tm':
qofdate.c:748: warning: assignment discards qualifiers from pointer target type
qofdate.c: In function 'qof_date_offset':
qofdate.c:821: warning: implicit declaration of function '__isleap'
make[3]: *** [qofdate.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I did not attempt to bypass "warnings being treated as errors" since "implicit 
declaration of function '__isleap'" sounded like an important problem to me.

I am using "gcc version 4.2.1 (Apple Inc. build 5664)" which was installed by 
Xcode 3.2.3. glib2 @2.24.2_0, libgda3 @3.0.4_1 and libxml2 @2.7.7_0 were 
already installed, using MacPorts.




--- End Message ---
--- Begin Message ---
notfound 596198 0.8.1
tag 596198 wontfix
quit

> Hi, I'm a maintainer with the MacPorts project, where I'm trying to
> create a package for qof. I can't get it to build on Mac OS X 10.6.4
> Snow Leopard, and I was advised by Neil Williams to report this bug
> here. After running "./configure --prefix=/opt/local
> --disable-sqlite" and "make" I get this error:

> qofdate.c: In function 'qof_date_to_struct_tm':
> qofdate.c:748: warning: assignment discards qualifiers from pointer
> target type qofdate.c: In function 'qof_date_offset':
> qofdate.c:821: warning: implicit declaration of function '__isleap'

OK, I finally got some time to look at this and it's unreproducible on
any standard GNU platform - it's something broken in your build
environment / platform.

__isleap is a standard definition of the C library on GNU, part of the
libc6-dev package, built from eglibc source.

$ grep __isleap /usr/include/*
/usr/include/time.h:# define __isleap(year)     \

$ grep "<time.h>" /usr/include/qof/*.h
/usr/include/qof/qoftime.h:#include <time.h>

__isleap is defined within the USE_POSIX block in time.h

QOF checks for time.h and your copy passes those tests but then even if
you work around this, you may well find that the time based tests will
fail. QOF builds successfully on genuine BSD platforms - this appears
to be the result of some form of OSX mangling of a working BSD base.

Your time definitions in OSX appear to be bust. QOF used to build
within Fink (and this section of code has not changed since that I
last bothered with Fink) but I suspect that your build environment is
simply not compatible with building GNU time handling software.
Something is wrong with your C library definitions.

This is not a problem I'm willing to fix in either the Debian package
or the upstream code because workarounds are only likely to cause errors
elsewhere in the test suite. 

__isleap isn't the only problem here either. That "assignment discards
qualifiers" warning isn't right.

The only thing I'm prepared to do is to make QOF abort the build if
__isleap is not defined in <time.h> but that would probably be
misleading as it isn't merely this one definition which is a problem.

I have no OSX instances on which to test, I don't want to even try to
work on a platform where time handling in the C library is so
uncertain. Maybe this is a problem within Macports itself (as Fink
used to be able to cope with this). Maybe file a bug with Apple or
whoever provides your C library? Or just install Debian on your Mac and
be done with it. ;-)

It's not a bug in QOF.

Closing.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/

Attachment: pgp6HODglPMTa.pgp
Description: PGP signature


--- End Message ---

Reply via email to