configure.ac: define a path for profile data#21408
configure.ac: define a path for profile data#21408Mingli-Yu wants to merge 1 commit intopython:masterfrom
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
|
(ccache maintainer here.)
The [2] reference is misleading since ccache/ccache@91a2954 was first included in ccache 3.2 some six years ago, not in 3.7.10. Also, the problem you see is not due to a deliberate logic change but a bug.
I guess that it wouldn't hurt to set an explicit profile directory path, but regardless of whether this is done the ccache bug should be fixed. @Mingli-Yu: As you might have seen in ccache/ccache#615 I have not been able to reproduce the problem so I can't really debug or fix it. But since you can reproduce it perhaps you could help out by describing in ccache/ccache#615 how to do it? That would be much appreciated. |
Actually, ccache/ccache@91a2954 altogether with ccache/ccache@c9fdcef makes the error out if no profiling data file found.
As my understanding, ccache/ccache#615 can be closed now as we need to do the fix for python3(this Pull request is just the fix we need for python3) after ccache upgrade to 3.7.10. |
There comes below error when use ccache 3.7.10 to compile python3 and check [1] for more details. | Python-3.8.3/Modules/_contextvarsmodule.c:43:1: error: source locations for function 'PyInit__contextvars' have changed, the profile data may be out of date [-Werror=coverage-mismatch] That's because the logic for profile directory changes a little in [2] after ccache upgrades to 3.7.10 and it errors out if no profile data found per [2] and [3]. So define a profile directory path accordingly to fix the above error. [1] ccache/ccache#615 [2] ccache/ccache@c9fdcef [3] ccache/ccache@91a2954 Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
I still think that it's misleading. The bug was introduced in ccache 3.7.10 so I don't see why ccache/ccache@91a2954 would be relevant.
Option 1: Fix thousands of projects (there can of course be other projects than Python that are affected as well) and branches to work around a bug in ccache. Option 2: Help the ccache maintainer to reproduce the bug so that it can be fixed. Then a new ccache version can be released as soon as possible and ccache 3.7.10 can be forgotten about. I vote for option 2. 🙂 Please help me reproduce the problem instead of working on an unnecessary workaround in Python. |
The reason why I think we should fix python3 is because currently python3 uses below logic during build. With this pull request, we just pass a path to the fprofile-generate and fprofile-use as below. Do you think we can still not pass the path to fprofile-generate and fprofile-use? BTW, please follow my steps to reproduce the issue: |
Sure, that can be done. But since
Thanks! I'll follow up in ccache/ccache#615. |
|
The issue already has been fixed by ccache as ccache/ccache@58895dc, so no need to define a path for profile data for python3 any more. |


There comes below error when use ccache 3.7.10 to compile python3
and check [1] for more details.
| Python-3.8.3/Modules/_contextvarsmodule.c:43:1: error: source locations for function 'PyInit__contextvars' have changed, the profile data may be out of date [-Werror=coverage-mismatch]
That's because the logic for profile directory changes a little in
[2] after ccache upgrades to 3.7.10 and it errors out if no profile
data found per [2] and [3].
So define a profile directory path accordingly to fix the above error.
[1] ccache/ccache#615
[2] ccache/ccache@c9fdcef
[3] ccache/ccache@91a2954
Signed-off-by: Mingli Yu mingli.yu@windriver.com