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: Built-in module 'time' does not enable functions if -Werror specified in the build environment
Type: behavior Stage:
Components: Build, Extension Modules Versions: Python 3.6, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: toast12
Priority: normal Keywords:

Created on 2016-10-19 21:02 by toast12, last changed 2022-04-11 14:58 by admin.

Messages (2)
msg278993 - (view) Author: (toast12) Date: 2016-10-19 21:02
Our build environment uses -Wno-error. However, this causes problems enabling all the functions in built-in module 'time':

configure:11130: checking for strftime
-
-
cc1: warnings being treated as errors
conftest.c:236: error: conflicting types for built-in function 'strftime'

Because strftime was not enabled, we had problems running xmlrpc.client:

>>> from xmlrpc import client 
Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "XXX/lib64/python3.5/xmlrpc/client.py", line 267, in <module>     if _day0.strftime('%Y') == '0001':      # Mac OS X AttributeError: module 'time' has no attribute 'strftime' >>>

As a workaround, I am passing -fno-builtin now. But I believe this should be handled on the python end
msg278994 - (view) Author: (toast12) Date: 2016-10-19 21:12
Excuse my typo. I meant -Werror and not -Wno-error
History
Date User Action Args
2022-04-11 14:58:38adminsetgithub: 72664
2016-10-20 07:55:02martin.pantersettitle: Built-in module 'Time' does not enable functions if -Wno-error specified in the build environment -> Built-in module 'time' does not enable functions if -Werror specified in the build environment
2016-10-20 07:05:34SilentGhostsettype: behavior
components: + Build
versions: + Python 3.6
2016-10-19 21:12:44toast12setmessages: + msg278994
2016-10-19 21:02:02toast12create