Neil Schemenauer added the comment:
I ran into an error like this and perhaps I have a clue was why some people run
into it. Dynamic modules built from Modules/Setup will need to have
-DPy_BUILD_CORE defined within the Setup file in the case they need to use the
_Py_BEGIN_SUPPRESS_IPH macr
Steve Dower added the comment:
If they are compiled independently, they should have Py_BUILD_CORE set.
That flag is meant for the headers, which serve dual purposes, not the module
itself. *Any* C file that is part of core should expect that option to be set
for when it includes its headers.
STINNER Victor added the comment:
setup.py gets C flags from Makefile using the sysconfig module. You must have
-DBUILD_CORE in Makefile. When I compiled Python using "./configure; make" the
time module is build.
How do you compile Python?
"#define _Py_BEGIN_SUPPRESS_IPH" is already declared
Ilya Kulakov added the comment:
Why is it important to hide these 2 macroses behind Py_BUILD_CORE?
Certain tools for embedding python may try to compile modules independently. I
realize that it's not a problem of Python to take care of that, but in that
particular case if hiding these 2 macros
Timothy Murphy added the comment:
Ok so I see the compiler is including pyport.h (using strace) so that means
that it can only be a case of Py_BUILD_CORE not being in CFLAGS for
timemodule.o.
I suppose that this is a configure problem. I'll try to work out how/why.
--
_
Timothy Murphy added the comment:
I'm so sorry. I apologise for mucking up and giving you the wrong changeset :-(
my hg summary output is as follows:
parent: 96850:5adf995d443f
Issue #18684: Fixed reading out of the buffer in the re module.
branch: 3.5
commit: 2 unknown (clean)
update: (curre
Steve Dower added the comment:
Last time this came up the solution was either "hg purge" or "make distclean",
I don't remember which worked.
timemodule.c should already be built with Py_BUILD_CORE set in CFLAGS, but
apparently it's possible for that setting to disappear from one of the
genera
R. David Murray added the comment:
It works for us. I've added Steve Dower to nosy, who I believe added that
code. IIUC it should only come into play on Windows.
Are you using a stock checkout, or have you applied local modifications? The
changeset id you reference doesn't have IPH in it.
Timothy Murphy added the comment:
This patch works for me on Linux but it seems clearly wrong for windows.
The problem is that using it on windows introduces a dependency and I don't
have a windows machine to check if this is ok. To me it seems that the time
module must have been built as par
New submission from Timothy Murphy:
My build of the 3.5 head fails in timemodule.c which results in an interpreter
that can run but can't "import time".
Details:
changeset 96851:bb9fc884a838
on Fedora Linux x86_64
Output:
/home/tim/build/cpython/Modules/timemodule.c: In function ‘time_strftim
10 matches
Mail list logo