Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-09

Cannot compile EpikTimer

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Xiangrong Fang

Hi All,

While trying to install epiktimer following this wiki page:

http://wiki.lazarus.freepascal.org/EpikTimer

I got this error:

/home/xrfang/git/epiktimer/epiktimer.pas(403,29) Error: Identifier not
found "clock_gettime"

I am running Lazarus 1.2.4/FPC2.6.2 on Ubuntu 14.10 64bit.

Any ideas?

Thanks a lot.

Xiangrong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140902/98c5aba6/attachment.html>

Reply by email

Xiangrong Fang
to Mattias Gaertner

Thanks, this worked. I added unit Linux in here:

{$IFDEF Windows}
  Windows, MMSystem,
{$ELSE}
  unix, unixutil, baseunix, *Linux*,
{$ENDIF}

Should this be considered a minor bug in epiktimer's platform dependant code?

Xiangrong

2014-09-02 22:28 GMT+08:00 Mattias Gaertner :

Show quoted text 26 lines
On Tue, 2 Sep 2014 22:18:38 +0800 Xiangrong Fang wrote: > Hi All, > > While trying to install epiktimer following this wiki page: > > http://wiki.lazarus.freepascal.org/EpikTimer > > I got this error: > > /home/xrfang/git/epiktimer/epiktimer.pas(403,29) Error: Identifier not > found "clock_gettime" clock_gettime is defined in unit Linux. > I am running Lazarus 1.2.4/FPC2.6.2 on Ubuntu 14.10 64bit. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140902/ab4e2ad2/attachment-0001.html>

Reply by email

Marco van de Voort
to Graeme Geldenhuys
Graeme Geldenhuys wrote
It seems FPC it out of date then. Because clock_gettime is a POSIX.1 standard, and FreeBSD has support for it.

Trouble is that monotonic clock support is an optional part of the standard, AND the cheapness/accurancy tradeoffs of the same constants may vary with OS. (e.g. freebSD MONOTONIC vs MONOTONIC_FAST, the latter I'd expect in a gettickcount)

Reply by email

Graeme Geldenhuys
Marco van de Voort wrote 8 lines
Trouble is that monotonic clock support is an optional part of the standard, AND the cheapness/accurancy tradeoffs of the same constants may vary with OS. (e.g. freebSD MONOTONIC vs MONOTONIC_FAST, the latter I'd expect in a gettickcount)

Did you see my patch in FPC Mantis regarding this? If it's not 100% correct (I'm a total newbie when it comes to compiler development), hopefully it is at least a good starting point to implement this in FreeBSD. Any feedback would be appreciated.

Regards,
Graeme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140905/d17884f9/attachment.html>

Reply by email

Marco van de Voort
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
> OS. (e.g. freebSD MONOTONIC vs MONOTONIC_FAST, the latter I'd expect > in a > gettickcount) Did you see my patch in FPC Mantis regarding this? If it's not 100% correct (I'm a total newbie when it comes to compiler development), hopefully it is at least a good starting point to implement this in FreeBSD. Any feedback would be appreciated.

I committed it, since the patch itself was ok. Maybe it should have been attempted to come to one implementation for free/open/net in bsd.pas though.

What I was hinting above maybe the sysutils code should use MONOTONIC_FAST, not MONOTONIC on FreeBSD. Granularity worsens, but performnace improves.

It depends on what the sysutils routine is supposed to favor.

Reply by email

Graeme Geldenhuys
Marco van de Voort wrote 5 lines
I committed it, since the patch itself was ok. Maybe it should have been attempted to come to one implementation for free/open/net in bsd.pas though.

I was thinking of that too afterwards. Though I don't have access to Open/NetBSD systems, so not sure how compatible it is with FreeBSD.

Show quoted text 6 lines
What I was hinting above maybe the sysutils code should use MONOTONIC_FAST, not MONOTONIC on FreeBSD. Granularity worsens, but performnace improves. It depends on what the sysutils routine is supposed to favor.

Ah, I see what you mean. I'll look into this and do a few more tests.

Regards,
Graeme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140906/2fd4518d/attachment-0001.html>

Reply by email

Marco van de Voort
to Graeme Geldenhuys
Graeme Geldenhuys wrote
I was thinking of that too afterwards. Though I don't have access to Open/NetBSD systems, so not sure how compatible it is with FreeBSD.

In general very, but with some exceptions and sometimes a bit of time between introduction of a feature over all flavors.

Reply by email