-
Notifications
You must be signed in to change notification settings - Fork 879
[core]:fix pthread_condattr_setclock on lower versions of Android #3149
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
base: master
Are you sure you want to change the base?
Conversation
…he configuration.
… configuration to report an error directly when a symbol cannot be found.
1. Move Android pthread_condattr_setclock check to STDCXX_SYNC=OFF block. 2. Enforce ENABLE_STDCXX_SYNC or MONOTONIC_CLOCK to prevent unsafe builds.
Thank you, lilinxiong, for reopening this pull request. It is related to #3138, which I mistakenly closed. My apologies again. |
Ok, very good, just please @lilinxiong do the fixes:
|
I feel that it’s clearer to look at the CMake logs; words aren’t very good at expressing this. Now I’ve added a message in CMake, which is to print the current system name. Then I will remove the judgment for the platform, which means I will only check if ENABLE_MONOTONIC_CLOCK is set to ON. After that, I will re-run the configuration on Darwin, and I will get the following results. That is to say, this is not in line with our expectations, and in actual usage on Darwin, we don’t need to enable ENABLE_MONOTONIC_CLOCK at all. However, only POSIX is true: Then, when POSIX is true, it will proceed to So, we actually can’t just determine if |
There's quite a mess with this definition here, but as long as I look at it, ANDROID is included in POSIX, so this should be checked anyway. In 1.6.0 we'll simplify this, but Therefore all we need is that if monotonic clock is requested and available, this *_setclock function must be available, otherwise it should make a fatal error. And all we need to make sure is that it detects this situation correctly on old Android version. |
Regarding the second point here, should I go and modify the |
61ef1d4
to
9e07c8b
Compare
Not sure if there are any configurations where monotonic clock isn't available - I don't think so. So you should be able to add this simply to the overall call to |
.travis.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you disable the monotonic clock in CI builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be enabled explicitly if we want to have monotonic clock enabled by default. Unless you think it is still better to just go on with default non-monotonic, if it was detected as not available (as it was so previously), but if so, then the check for this function must be also included in the check resulting in default monotonic clock OFF.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, you can also reopen it and give it a try…
Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
Co-authored-by: Sektor van Skijlen <ethouris@gmail.com>
@lilinxiong could you please try #3152 and let us know if it fixes your issue and compiles in your environment? |
No description provided.