Open ryandesign opened 1 year ago
There are two places where similar code needs to be added
For example like this:
Thank you for reporting! We are about to update abseil and S2 to newer versions. Do you know if abseil-cpp and the latest version of google/s2geometry are able to compile on macports?
I did not see this fix in the upstream abseil repository.
In MacPorts, the abseil port works around the problem by using a compatibility library developed by MacPorts which includes, among other things, the missing MAP_ANONYMOUS
definition. It would be better to report the problem to the developers of abseil however so they can fix it.
Build status information for abseil and s2geometry in MacPorts are here:
It would be better to report the problem to the developers of abseil however so they can fix it.
But abseil also now uses clock_gettime
which is only available in macOS 10.12 and later. I reported this to them and they will not fix it; they state abseil requires macOS 10.13 or later. For MacPorts, we have a clock_gettime
implementation in our compatibility library.
s2 fails to build on OS X 10.10 and earlier:
https://trac.macports.org/ticket/67784
MAP_ANONYMOUS
is equivalent toMAP_ANON
which is available on older systems.There are several places where you already have code to address this:
https://github.com/r-spatial/s2/blob/4fe0c97df91c98a24f379bfc3d8d4544f4835117/src/absl/base/internal/low_level_alloc.cc#L56-L63
https://github.com/r-spatial/s2/blob/4fe0c97df91c98a24f379bfc3d8d4544f4835117/src/absl/debugging/failure_signal_handler.cc#L154-L156
https://github.com/r-spatial/s2/blob/4fe0c97df91c98a24f379bfc3d8d4544f4835117/src/s2/base/port.h#L574-L581
Note that the comment is outdated:
MAP_ANONYMOUS
does exist on Darwin in OS X 10.11 (released 2015) and later.There are two places where similar code needs to be added, or it needs to be moved into a more central include file:
https://github.com/r-spatial/s2/blob/4fe0c97df91c98a24f379bfc3d8d4544f4835117/src/absl/debugging/internal/examine_stack.cc#L57-L58
https://github.com/r-spatial/s2/blob/4fe0c97df91c98a24f379bfc3d8d4544f4835117/src/absl/debugging/internal/stack_consumption.cc#L113-L114
I see no reason to limit the fix to systems where
__APPLE__
is defined.