On May 5, 2013, at 1:37 PM, Graham Menhennitt <gra...@menhennitt.com.au> wrote:
> On 06/05/2013 01:28, John Ralls wrote: >> On May 5, 2013, at 2:45 AM, Graham Menhennitt <gra...@menhennitt.com.au> >> wrote: >> >>> I thought I'd try building GnuCash 2.5.1 on FreeBSD 9-STable. I copied >>> the port directory, changed the version to 2.5.1, and fixed the file >>> size and SHA256 values to suit. I then started the build. It progresses >>> for a few seconds and then exits with an error: >>> >>> libtool: compile: cc -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/libc >>> -I../../../src -pthread -I/usr/local/include/glib-2.0 >>> -I/usr/local/include -DG_LOG_DOMAIN=\"qof\" -I/usr/local/include >>> -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -O2 >>> -pipe -fno-strict-aliasing -Wall -Wunused -Wmissing-prototypes >>> -Wmissing-declarations -Wno-unused -MT gnc-date.lo -MD -MP -MF >>> .deps/gnc-date.Tpo -c gnc-date.c -fPIC -DPIC -o .libs/gnc-date.o >>> gnc-date.c: In function 'gnc_localtime_r': >>> gnc-date.c:310: error: lvalue required as left operand of assignment >>> gnc-date.c:314: error: 'daylight' undeclared (first use in this function) >>> gnc-date.c:314: error: (Each undeclared identifier is reported only once >>> gnc-date.c:314: error: for each function it appears in.) >>> gnc-date.c:319: error: wrong type argument to unary minus >>> gmake[5]: *** [gnc-date.lo] Error 1 >>> >>> I can't see the variables "timezone" and "daylight" declared anywhere so >>> I'm not surprised that it doesn't compile. How does this work on Linux? >>> Are they globals or something? If so, where are they declared? >> Yes, they are globals defined in time.h on both Linux and Darwin. If they're >> not there on FreeBSD >> we'll have to define them in an ifdef, but IIRC they're part of the POSIX >> spec so it would be strange >> if they're not there. >> >> Regards, >> John Ralls > Thanks for replying, John. > > Well they don't exist here. The only mention of "daylight" in > /usr/include is in a comment. And "timezone" is the name of a function: > > #if __BSD_VISIBLE > char *timezone(int, int); /* XXX XSI conflict */ > void tzsetwall(void); > time_t timelocal(struct tm * const); > time_t timegm(struct tm * const); > #endif /* __BSD_VISIBLE */ > > This must have changed since 2.4 as that builds fine. Looking at the > same file in 2.4.11, there doesn't seem to be anything similar. Please remember to copy all replies to the list: Use "Reply All" or if your client supports it "Reply List". Yes, gnc-date is thoroughly rewritten for 2.6. The POSIX-compliant functions are designed to fail in 2038, and we've had user complaints about being unable to set up mortgages which extend beyond that date. I'll set up a FreeBSD VM and see what I can figure out for 2.5.2. Thanks for the report. Regards, John Ralls _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel