clangupc / clang-upc

Clang UPC Front-End
https://clangupc.github.io/
Other
17 stars 5 forks source link

[runtime] CMake and autoconf logic assumes shm_open() and clock_gettime() are in librt #69

Closed PHHargrove closed 10 years ago

PHHargrove commented 10 years ago

Both Mac OS X and OpenBSD have support for shm_open() (POSIX Shared Memory).

However, both fail the corresponding CMake probe, with something like the following in CMakeFiles/CMakeError.log:

Performing C++ SOURCE FILE Test HAVE_SHM_OPEN failed with the following output:
[....]
ld: library not found for -lrt

While the version Mac OS X I test one lacks clock_gettime(), that function is present on OpenBSD. However, the corresponding CMake probe also fails with ld: library not found for -lrt

In these cases (shm_open() on 2 platforms and clock_gettime() on 1) the corresponding symbols are in the standard library and there is no librt.

With an autoconf-based build on OpenBSD, it looks like neither clock_gettime() nor shm_open() is located correctly. I'll investigate and enter a distinct issue for that or add the details here, depending which seems appropriate when I have the details.

PHHargrove commented 10 years ago

The logic in libupc/autoconf/configure.ac also appears to be constructed incorrectly such that shm_open() will not be found unless it is in librt. However, the probe is conditional on enabling Portals4, so I have not even been able to verify that the probe work correctly on Linux.