[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gpsd-dev
Subject:    Re: [gpsd-dev] 3.13 does not compile on OS X 10.10
From:       Frank Nicholas <frank () nicholasfamilycentral ! com>
Date:       2015-02-27 21:23:27
Message-ID: CAHTxXabgyPUs1RdRM5s=6rp+WZJd3y27x8xAPvjGTEP9UjS78w () mail ! gmail ! com
[Download RAW message or body]

On Fri, Feb 27, 2015 at 3:02 PM, Eric S. Raymond <esr@thyrsus.com> wrote:

> Frank Nicholas <frank@nicholasfamilycentral.com>:
> > git clone git://git.sv.gnu.org/gpsd.git
> > 
> > scons check
> > 
> > .
> > 
> > .
> > 
> > ntpshmread.c:75:5: warning: implicit declaration of function
> > 'clock_gettime' is
> > 
> > invalid in C99 [-Wimplicit-function-declaration]
> > 
> > clock_gettime(CLOCK_REALTIME, &shm_stat->tvc);
> > 
> > ^
> > 
> > ntpshmread.c:75:19: error: use of undeclared identifier 'CLOCK_REALTIME'
> > 
> > clock_gettime(CLOCK_REALTIME, &shm_stat->tvc);
> > 
> > ^
> > 
> > 1 warning and 1 error generated.
> > 
> > scons: *** [ntpshmread.os] Error 1
> > 
> > scons: building terminated because of errors.
> > 
> > This is using Apple's developer tools that come with Xcode.  This is the
> > same toolchain I've always used.
> > 
> > Any other info I can provide?
> 
> Nope.  That's a toolchain bug; clock_gettime should be declared in
> /usr/incude/time.h but apparently on the Mac it is not.  Attempted
> fix pushed to repo.
> --
> <a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
> 

Confirmed fixed in new clone.  'scons check' is successful.

This version/notice info is in "time.h":

 *      @(#)time.h      8.3 (Berkeley) 1/21/94

There is also an Apple header copyright notice dated 2000.

Just an FYI for future reference - the Apple developer tools are installed
with Xcode in the following path:  "
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include
 ">

Thanks,
Frank


[Attachment #3 (text/html)]

<div dir="ltr">On Fri, Feb 27, 2015 at 3:02 PM, Eric S. Raymond <span \
dir="ltr">&lt;<a href="mailto:esr@thyrsus.com" \
target="_blank">esr@thyrsus.com</a>&gt;</span> wrote:<br><div \
class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Frank \
Nicholas &lt;<a href="mailto:frank@nicholasfamilycentral.com">frank@nicholasfamilycentral.com</a>&gt;:<br>
 <div><div class="h5">&gt; git clone git://<a href="http://git.sv.gnu.org/gpsd.git" \
target="_blank">git.sv.gnu.org/gpsd.git</a><br> &gt;<br>
&gt; scons check<br>
&gt;<br>
&gt; .<br>
&gt;<br>
&gt; .<br>
&gt;<br>
&gt; ntpshmread.c:75:5: warning: implicit declaration of function<br>
&gt; &#39;clock_gettime&#39; is<br>
&gt;<br>
&gt;           invalid in C99 [-Wimplicit-function-declaration]<br>
&gt;<br>
&gt;        clock_gettime(CLOCK_REALTIME, &amp;shm_stat-&gt;tvc);<br>
&gt;<br>
&gt;        ^<br>
&gt;<br>
&gt; ntpshmread.c:75:19: error: use of undeclared identifier \
&#39;CLOCK_REALTIME&#39;<br> &gt;<br>
&gt;        clock_gettime(CLOCK_REALTIME, &amp;shm_stat-&gt;tvc);<br>
&gt;<br>
&gt;                             ^<br>
&gt;<br>
&gt; 1 warning and 1 error generated.<br>
&gt;<br>
&gt; scons: *** [ntpshmread.os] Error 1<br>
&gt;<br>
&gt; scons: building terminated because of errors.<br>
&gt;<br>
&gt; This is using Apple&#39;s developer tools that come with Xcode.   This is \
the<br> &gt; same toolchain I&#39;ve always used.<br>
&gt;<br>
&gt; Any other info I can provide?<br>
<br>
</div></div>Nope.   That&#39;s a toolchain bug; clock_gettime should be declared \
                in<br>
/usr/incude/time.h but apparently on the Mac it is not.   Attempted<br>
fix pushed to repo.<br>
<span class=""><font color="#888888">--<br>
                        &lt;a href=&quot;<a href="http://www.catb.org/~esr/" \
target="_blank">http://www.catb.org/~esr/</a>&quot;&gt;Eric S. Raymond&lt;/a&gt;<br> \
</font></span></blockquote></div><br></div><div class="gmail_extra">Confirmed fixed \
in new clone.   &#39;scons check&#39; is successful.</div><div \
class="gmail_extra"><br></div><div class="gmail_extra">This version/notice info is in \
&quot;time.h&quot;:</div><div class="gmail_extra"><p \
style="margin:0px;font-size:11px;font-family:Menlo">  *         @(#)time.h         \
8.3 (Berkeley) 1/21/94</p><div><br></div><div>There is also an Apple header copyright \
notice dated 2000.</div><div><br></div><div>Just an FYI for future reference - the \
Apple developer tools are installed with Xcode in the following path:   &quot;<span \
style="font-family:Menlo;font-size:11px">/Applications/Xcode.app/Contents/Developer/Pl \
atforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include</span>&quot;&gt;</d \
iv><div><br></div><div><div>Thanks,</div><div>Frank</div></div><div><br></div></div></div>




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic