This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: timemodule.c fails to compile on BSD
Type: compile error Stage: resolved
Components: Build, FreeBSD Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, koobs, p-ganssle, pablogsal, vstinner
Priority: normal Keywords: patch

Created on 2018-09-17 19:32 by pablogsal, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9366 merged vstinner, 2018-09-17 20:38
PR 9467 merged benjamin.peterson, 2018-09-21 02:18
Messages (6)
msg325566 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-09-17 19:32
Example:

https://buildbot.python.org/all/#/builders/87/builds/1434

./Modules/timemodule.c:573:24: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
            p->tm_zone = PyUnicode_AsUTF8(item);
                       ^ ~~~~~~~~~~~~~~~~~~~~~~
./Modules/timemodule.c:1545:44: warning: incompatible pointer to integer conversion passing 'char *(int, int)' to parameter of type 'long' [-Wint-conversion]
    PyModule_AddIntConstant(m, "timezone", timezone);
                                           ^~~~~~~~
./Include/modsupport.h:118:71: note: passing argument to parameter here
PyAPI_FUNC(int) PyModule_AddIntConstant(PyObject *, const char *, long);
                                                                      ^
./Modules/timemodule.c:1568:44: error: use of undeclared identifier 'daylight'
    PyModule_AddIntConstant(m, "daylight", daylight);
                                           ^
2 warnings and 1 error generated.
*** [Modules/timemodule.o] Error code 1
make: stopped in /usr/home/buildbot/python/3.x.koobs-freebsd10/build
make: stopped in /usr/home/buildbot/python/3.x.koobs-freebsd10/build
1 error
msg325567 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-09-17 19:32
Bisecting returns commit 5633c4f342d as possible culprit
msg325572 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-09-17 19:53
Reverting afde1c1a05c and 5633c4f342d fixes the issue.
msg325574 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-09-17 20:40
I wrote PR 9366 to fix the compilation of timemodule.c on FreeBSD.
msg325575 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-09-17 20:56
New changeset 1fb399ba4e977e697d194769070316247237f68e by Victor Stinner in branch 'master':
bpo-34715: Revert "Simplify PyInit_timezone. (GH-9323)" (GH-9366)
https://github.com/python/cpython/commit/1fb399ba4e977e697d194769070316247237f68e
msg325946 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-09-21 02:52
New changeset c510c6b8b60f211793e0b84c317ea6974e8a6153 by Benjamin Peterson in branch 'master':
Simplify PyInit_timezone. (GH-9467)
https://github.com/python/cpython/commit/c510c6b8b60f211793e0b84c317ea6974e8a6153
History
Date User Action Args
2022-04-11 14:59:06adminsetgithub: 78896
2018-09-21 02:52:22benjamin.petersonsetmessages: + msg325946
2018-09-21 02:37:29benjamin.petersonsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-09-21 02:18:33benjamin.petersonsetpull_requests: + pull_request8880
2018-09-17 20:56:20vstinnersetmessages: + msg325575
2018-09-17 20:40:27vstinnersetnosy: + vstinner
messages: + msg325574
2018-09-17 20:38:02vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request8790
2018-09-17 19:55:02pablogsalsetnosy: + p-ganssle
2018-09-17 19:53:01pablogsalsetnosy: - p-ganssle
messages: + msg325572
2018-09-17 19:50:10p-gansslesetnosy: + p-ganssle
2018-09-17 19:40:22pablogsalsetnosy: + benjamin.peterson
2018-09-17 19:32:33pablogsalsetmessages: + msg325567
2018-09-17 19:32:14pablogsalcreate