Monday, 7 April 2014

Re: [gccsdk] Diffutils no longer compiles

John Tytgat wrote on Saturday, April 05, 2014 9:01 PM:

> In message <DUB120-DS147F359571A432C002CD1DF06C0@phx.gbl>
"Alan Buckley" <alan_baa@hotmail.com> wrote:

> > I’ve just tried compiling the latest diffutils with the GCCSDK
> > version 4.1.2 and 4.7 are both the same and it comes up with
> > the error:
> >
> > CC gettime.o
> > In file included from ./sys/time.h:30,
> > from gettime.c:24:
> > /home/riscos/cross/lib/gcc/arm-unknown-riscos/4.1.2/../../../../arm-unknown-riscos/include/sys/time.h:75:
> > error: conflicting types for 'rpl_gettimeofday'
> > ./sys/time.h:401: error: previous declaration of 'rpl_gettimeofday' was
> > here
> > make[2]: *** [gettime.o] Error 1
> > make[2]: Leaving directory
> > `/home/alanb/build/diffutils/diffutils-3.3/lib'
> > make[1]: *** [all] Error 2
> > make[1]: Leaving directory
> > `/home/alanb/build/diffutils/diffutils-3.3/lib'
> > make: *** [all-recursive] Error 1
> >
> > I’ve tried to untangle what’s going on and it seems like
> > <sys/time.h> is
> > including the local sys/time.h rather than the system one. But I may
> > be wrong?
> >
> > Can someone have a look at it and see how to fix it please?

> It's a bit nasty. Basically there are a lot of configure tests being
> done in order to figure out if the used runtime routines adhere to the
> standard(s). A couple of those tests concern gettimeofday(). The last
> one wants to check if gettimeofday() and localtime() share a static
> buffer (apparently a MacOS X issue). This test can only be done by
> running a small test program but as we're cross-compiling the result is
> 'guessing yes' instead. Which means that a replacement 'rpl_gettimeofday'
> code piece is being used instead of the system gettimeofday() routine.
> And that code gets compiled with an error on systems where the second
> parameter type is non-void.

> All very messy. I've worked around by basically enforcing the last
> test to 'no' (UnixLib's gettimeofday() and localtime() do not share
> a static buffer) with r6638 so diffutils can now be built.

Thanks for tracking that down, explaining what was happening
and putting a fix in the autobuilder.

I've also been able to use your fix to get grep to compile as well.

> Will you upload a new diffutils port ?

Yes, I've uploaded the new diffutils (and grep).

FYI - I am working my way through all the packages that
need components and updating them to use them, compiling
them with the latest trunk compiler, and for games removing
the dependency on UnixHome. I only have time for minimal
testing though, but I try to ensure everything at least runs.

Thanks,
Alan


_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment