Menu

#304 MingW compile failing on time.c

open
nobody
None
5
2020-03-27
2020-03-27
No

Please forgive me if this proves not to be a bug.

I have been following item 6 in http://unicon.org/utr/utr21.html to build Unicon on MingW on Windows 10.

make WUnicon64
make

This gives me two issues:

  1. Intially, make fails with
rm: cannot remove `plus4': No such file or directory
make: *** [update_rev] Error 1

I work (hack) around that problem by deleting from Makefile the line

          rm plus4 plus4.c;\
  1. Now make causes stuff to compile, until I get to
time.c: In function 'millisec':
time.c:101:18: error: 'CLOCK_PROCESS_CPUTIME_ID' undeclared (first use in this function)
  101 |    clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts);
      |                  ^
time.c:101:18: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [time.o] Error 1
make[2]: Leaving directory `/home/art/unicon_build/unicon/src/common'

According to https://stackoverflow.com/a/15177658 and https://stackoverflow.com/a/15177684 and (somewhere else that I forget, "Cygwin provides support for POSIX; MingW does not"), this should fail because time.h should not be included in the build.

Is this a bug (can you reproduce it), or is it more likely something that I am doing wrong (and, if so, how can I figure that out)?

Thank you.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB