libocca / occa

Portable and vendor neutral framework for parallel programming on heterogeneous platforms.
https://libocca.org
MIT License
382 stars 81 forks source link

sys.cpp: fix code fallbacks for older Darwin #739

Closed barracuda156 closed 5 months ago

barracuda156 commented 5 months ago

Not sure why it was conditioned on Clang at all, since clock_gettime is provided by SDK and not compiler. Fix that. Include AvailabilityMacros.h – apparently nothing in the codebase does that (or did I miss it?). Amend fallback code for threadid for older macOS.

barracuda156 commented 5 months ago

Failure on Ubuntu CI is irrelevant:

- [C++]  /home/runner/work/occa/occa/src/utils/mutex.cpp
[27](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:28)
 - [C++]  /home/runner/work/occa/occa/src/utils/hash.cpp
[28](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:29)
 - [C++]  /home/runner/work/occa/occa/src/utils/exception.cpp
[29](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:30)
 - [C++]  /home/runner/work/occa/occa/src/utils/io.cpp
[30](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:31)
/usr/bin/bash: line 1: clang++-12: command not found
[31](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:32)
make: *** [Makefile:149: /home/runner/work/occa/occa/obj/utils/hash.o] Error 127
[32](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:33)
make: *** Waiting for unfinished jobs....
[33](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:34)
 - [C++]  /home/runner/work/occa/occa/src/utils/logging.cpp
[34](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:35)
/usr/bin/bash: line 1: clang++-12: command not found
[35](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:36)
/usr/bin/bash: line 1: clang++-12: command not found
[36](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:37)
make: *** [Makefile:149: /home/runner/work/occa/occa/obj/utils/mutex.o] Error 127
[37](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:38)
make: *** [Makefile:149: /home/runner/work/occa/occa/obj/utils/exception.o] Error 127
[38](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:39)
/usr/bin/bash: line 1: clang++-12: command not found
[39](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:40)
make: *** [Makefile:149: /home/runner/work/occa/occa/obj/utils/logging.o] Error 127
[40](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:41)
/usr/bin/bash: line 1: clang++-12: command not found
[41](https://github.com/libocca/occa/actions/runs/7752370647/job/21141750677?pr=739#step:10:42)
make: *** [Makefile:149: /home/runner/work/occa/occa/obj/utils/io.o] Error 127
barracuda156 commented 1 month ago

@kris-rowe I think I have missed this. Was there some special reason to have it broken back? The change from https://github.com/libocca/occa/commit/3cba0841b2b87678da53e0b311cb7e162d781181 looks wrong. I guess, instead a macro should be moved, so that we have MacOS fixed again, but without affecting anything else.