Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error (out) for old MacOS #1513

Open
h-vetinari opened this issue Aug 11, 2023 · 4 comments
Open

[Bug]: Error (out) for old MacOS #1513

h-vetinari opened this issue Aug 11, 2023 · 4 comments
Labels
priority: p3 Desirable enhancement/fix; May not be in the next release.

Comments

@h-vetinari
Copy link
Contributor

Describe the issue

Abseil already points to google's "foundational C++ support policy" explicitly, but it still carries code for old macos versions.

However, it seems this is not being tested anymore, as I found out when running against an older MacOS SDK:

In file included from $PREFIX/include/absl/synchronization/mutex.h:74:
$PREFIX/include/absl/synchronization/internal/kernel_timeout.h:94:45: error: unknown type name 'clockid_t'; did you mean 'clock_t'?
  struct timespec MakeClockAbsoluteTimespec(clockid_t c) const;
                                            ^
/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/_types/_clock_t.h:30:33: note: 'clock_t' declared here
typedef __darwin_clock_t        clock_t;

It would be good to error out already in CMake based on what is being tested as the lower bound in CI

Steps to reproduce the problem

Compile a project that includes include/absl/synchronization/mutex.h on an old MacOS

What version of Abseil are you using?

20230802.0

What operating system and version are you using?

MacOS

What compiler and version are you using?

clang 15

What build system are you using?

cmake

Additional context

I'm not asking to support old MacOS, just error out more clearly if it's an unsupported version.

@derekmauro derekmauro added the priority: p3 Desirable enhancement/fix; May not be in the next release. label Aug 14, 2023
@barracuda156
Copy link

barracuda156 commented Aug 15, 2023

@h-vetinari @derekmauro No, it won’t be good to error out, it would be good to fix the bug :)

P. S. Seriously, we can find a solution for this, I guess, and a PR with a fix – but please do not deliberately break something further for no need and make life of others harder.

@h-vetinari
Copy link
Contributor Author

There's no bug. There's a lower limit that Google decides to support (which makes sense, because the stdlibs for C/C++ in the SDKs are really old). That's why it's called "foundational support policy".

Users below the defined lower bound are out of luck, but it would be nice to tell them more clearly that their system is too outdated.

@barracuda156
Copy link

@h-vetinari GCC upstream supports macOS back to 10.5, so we have the latest C/C++ libraries and compilers.

It is a bug, because it breaks otherwise working software. And it is a fixable bug.

@h-vetinari
Copy link
Contributor Author

h-vetinari commented Aug 16, 2023

Great for GCC, but abseil is not GCC. More importantly, you cannot just take along a newer glibc to an old MacOS, it's an integral part of the system. Under very controlled circumstances, you can get away with replacing your C++ stdlib, but abseil needs to supports much, much broader use than such specialised setups.

I don't speak for the maintainers here, but the amount of effort necessary to maintain compatibility with ancient (Mac)OSes is wildly, absurdly disproportionate to the number of users still on those versions (not least since Apple aggressively pushes people to upgrade their OS; the youngest unsupported SDK, 10.12, went EOL almost 4 years ago). And some things are plainly impossible to use or support otherwise, if they for example rely on newer glibc features (like C++17's std::aligned_alloc, which requires C11's aligned_alloc, which only reached the MacOS SDK in 10.15).

So it's really not a bug; it's a trade-off of maintainer time for supporting the far reaches of the long tail of support against everything else they need to do. And you don't get to make the choice for other projects where that trade-off is justified. Whatever software still needs to run on such old systems in this day and age will simply have to stay on abseil <=20230125.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement/fix; May not be in the next release.
Projects
None yet
Development

No branches or pull requests

3 participants