Created on 2018-10-19 06:24 by Maxime Belanger, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 9961 | merged | maxbelanger, 2018-10-19 06:45 | |
| PR 10019 | merged | miss-islington, 2018-10-21 00:08 | |
| PR 10020 | merged | miss-islington, 2018-10-21 00:08 | |
| Messages (4) | |||
|---|---|---|---|
| msg328030 - (view) | Author: Maxime Belanger (Maxime Belanger) | Date: 2018-10-19 06:24 | |
We build Python on macOS with `-Werror=unguarded-availability` and `-mmacosx-version-min=<xx>` to ensure `libpython` is binary-compatible with earlier versions of macOS. This can create problems when building some modules, including `timemodule.c`, which was recently altered to fix bpo-28081. The initial fix is inappropriate, because attempting to reference `CLOCK_REALTIME` et al when `HAVE_CLOCK_GETTIME` is unset (in our case, due to being too "new"), results in a compiler error: ``` ./Modules/timemodule.c:1368:29: error: '_CLOCK_REALTIME' is only available on macOS 10.12 or newer [-Werror,-Wunguarded-availability] PyModule_AddIntMacro(m, CLOCK_REALTIME); ^~~~~~~~~~~~~~ /usr/include/time.h:154:24: note: expanded from macro 'CLOCK_REALTIME' #define CLOCK_REALTIME _CLOCK_REALTIME ^~~~~~~~~~~~~~~ ./Include/modsupport.h:78:67: note: expanded from macro 'PyModule_AddIntMacro' #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c) ``` A more correct patch (I'm attaching ours) is to only add the macros to the module if at least one of the three functions is defined. This should continue to work for the author of the original issue as well as fix our problem. |
|||
| msg328183 - (view) | Author: Benjamin Peterson (benjamin.peterson) * | Date: 2018-10-21 00:07 | |
New changeset 94451182ccd6729c11338926d8a3d11645e86626 by Benjamin Peterson (Max Bélanger) in branch 'master': closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in timemodule.c. (GH-9961) https://github.com/python/cpython/commit/94451182ccd6729c11338926d8a3d11645e86626 |
|||
| msg328184 - (view) | Author: miss-islington (miss-islington) | Date: 2018-10-21 00:30 | |
New changeset beb83d013e0295c987087febf2be78b1da389b15 by Miss Islington (bot) in branch '3.6': closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in timemodule.c. (GH-9961) https://github.com/python/cpython/commit/beb83d013e0295c987087febf2be78b1da389b15 |
|||
| msg328185 - (view) | Author: miss-islington (miss-islington) | Date: 2018-10-21 00:41 | |
New changeset 002aef3f66a9f8da635e20860622f2e539a0b611 by Miss Islington (bot) in branch '3.7': closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in timemodule.c. (GH-9961) https://github.com/python/cpython/commit/002aef3f66a9f8da635e20860622f2e539a0b611 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:07 | admin | set | github: 79206 |
| 2018-10-21 00:41:45 | miss-islington | set | messages: + msg328185 |
| 2018-10-21 00:30:59 | miss-islington | set | nosy:
+ miss-islington messages: + msg328184 |
| 2018-10-21 00:08:44 | miss-islington | set | pull_requests: + pull_request9360 |
| 2018-10-21 00:08:30 | miss-islington | set | pull_requests: + pull_request9359 |
| 2018-10-21 00:08:00 | benjamin.peterson | set | status: open -> closed resolution: fixed messages: + msg328183 stage: patch review -> resolved |
| 2018-10-19 06:45:27 | maxbelanger | set | keywords:
+ patch stage: patch review pull_requests: + pull_request9308 |
| 2018-10-19 06:36:08 | serhiy.storchaka | set | nosy:
+ vstinner, benjamin.peterson |
| 2018-10-19 06:24:57 | Maxime Belanger | create | |