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: build failure with _Py_BEGIN_SUPPRESS_IPH undefined
Type: Stage: resolved
Components: Build, Interpreter Core, Library (Lib), Windows Versions: Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, paul.moore, steve.dower, tim.golden, zach.ware, zbysz
Priority: normal Keywords: patch

Created on 2015-07-18 18:01 by zbysz, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
0001-Always-define-_Py_-_SUPPRESS_IPH-macros.patch zbysz, 2015-07-18 18:01
Messages (5)
msg246910 - (view) Author: Zbyszek Jędrzejewski-Szmek (zbysz) * Date: 2015-07-18 18:01
I'm not sure if I'm doing something wrong, because other people should be seeing this too... Anyway, attached patch fixes the issue for me.
msg246914 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-07-18 20:52
There is a reference in the patch file to #23524.
msg246915 - (view) Author: Zbyszek Jędrzejewski-Szmek (zbysz) * Date: 2015-07-18 20:53
Oh, for the record, the build failure:

building 'time' extension
gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I../Include -I. -IInclude -I/usr/local/include -I/home/zbyszek/python/cpython/Include -I/home/zbyszek/python/cpython/build -c /home/zbyszek/python/cpython/Modules/timemodule.c -o build/temp.linux-x86_64-3.6/home/zbyszek/python/cpython/Modules/timemodule.o
/home/zbyszek/python/cpython/Modules/timemodule.c: In function ‘time_strftime’:
/home/zbyszek/python/cpython/Modules/timemodule.c:656:9: error: unknown type name ‘_Py_BEGIN_SUPPRESS_IPH’
         _Py_BEGIN_SUPPRESS_IPH
         ^
/home/zbyszek/python/cpython/Modules/timemodule.c:656:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
/home/zbyszek/python/cpython/Modules/timemodule.c:658:9: error: ‘_Py_END_SUPPRESS_IPH’ undeclared (first use in this function)
         _Py_END_SUPPRESS_IPH
         ^
/home/zbyszek/python/cpython/Modules/timemodule.c:658:9: note: each undeclared identifier is reported only once for each function it appears in
/home/zbyszek/python/cpython/Modules/timemodule.c:662:9: error: expected ‘;’ before ‘if’
         if (buflen > 0 || i >= 256 * fmtlen) {
         ^
msg246916 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-07-18 20:55
I was going to guess it was timemodule.c.

You need to "make distclean" or "hg purge" to clean up your repo. This seems to be some sort of gcc/configure issue. So far everyone else who has seen this has fixed it by cleaning their repo.
msg246923 - (view) Author: Zbyszek Jędrzejewski-Szmek (zbysz) * Date: 2015-07-18 23:33
Indeed, make distclean fixes the problem.
History
Date User Action Args
2022-04-11 14:58:19adminsetgithub: 68852
2015-07-18 23:35:23zach.waresetresolution: not a bug
stage: resolved
2015-07-18 23:33:03zbyszsetstatus: open -> closed

messages: + msg246923
2015-07-18 20:55:04steve.dowersetmessages: + msg246916
2015-07-18 20:53:28zbyszsetmessages: + msg246915
2015-07-18 20:52:22BreamoreBoysetnosy: + BreamoreBoy
messages: + msg246914
2015-07-18 20:26:07vstinnersetnosy: + paul.moore, tim.golden, zach.ware, steve.dower
components: + Build, Windows
2015-07-18 18:01:12zbyszcreate