-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
valkey: fix on 10.6, remove brewism #23817
Conversation
Notifying maintainers: |
Is the check faulty here then? Maybe it can be fixed at the source. |
It is broken, I think. |
Precisely. Their check is doing the opposite of what they thought it is. This works correctly:
However, dropping that flag I found another bug in the code, apparently:
|
Yeah, wait with merging this, it is more broken than I thought. This has to be fixed. UPD. Error is not because of the flag being dropped, but because of the wrong assumptions for archs. Now once detection of 10.6 is fixed, hell broke loose LOL |
@mohd-akram Ok, this builds fine for me, and we do not need to drop the flag. |
I'm surprised that makes a difference. I'm just curious, could you check what values you get for them in a simple program? #include <AvailabilityMacros.h>
#include <stdio.h>
int main(void)
{
printf("MAC_OS_X_VERSION_MIN_REQUIRED=%d\n", MAC_OS_X_VERSION_MIN_REQUIRED);
printf("__MAC_OS_X_VERSION_MIN_REQUIRED=%d\n", __MAC_OS_X_VERSION_MIN_REQUIRED);
printf("MAC_OS_X_VERSION_MAX_ALLOWED=%d\n", MAC_OS_X_VERSION_MAX_ALLOWED);
printf("__MAC_OS_X_VERSION_MAX_ALLOWED=%d\n", __MAC_OS_X_VERSION_MAX_ALLOWED);
return 0;
} |
It will not compile, since those are undefined :)
It is actually a known issue. Confusion arose from a fact that |
I see, and |
@mohd-akram Yes, I learnt this on my own mistakes LOL Wherever it is still used in our patches, should be changed to non-underscored ones (upstreams might occasionally use |
I don't think upstream should ever use them TBH. They actually come from |
For some background, the underscore versions are for Apple internal use. The non-underscore versions are more compatible and are the ones we usually use. The Tiger SDK does not have Availability.h but does have AvailabilityMacros.h, so we came to use that most of the time. It works fine on newer systems too. https://github.com/kencu/macos-sdk/tree/master/MacOSX10.4u.sdk/usr/include I added Availability.h to LegacySupport some years back so it would be there for Tiger if needed. |
I believe |
Closes: https://trac.macports.org/ticket/69887
Description
Fix build on 10.6, drop unneeded brewism
Type(s)
Tested on
macOS 10.6
Xcode 3.2
Verification
Have you
port lint --nitpick
?sudo port test
?sudo port -vst install
?