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.

Author Michael.Felt
Recipients Michael.Felt, methane
Date 2019-04-23.08:47:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <840b5380-2151-c9d8-f6c0-70ebffa8e354@felt.demon.nl>
In-reply-to <1555935322.19.0.583267673117.issue36696@roundup.psfhosted.org>
Content
On 22/04/2019 14:15, Inada Naoki wrote:
> Inada Naoki <songofacandy@gmail.com> added the comment:
>
> Maybe, XLC doesn't support -D name.  -Dname should be used instead.

Excellent hint: the diff between bot run 1013 and run 1014 reveals:

diff --git a/setup.py b/setup.py
index 9c83914fd9..c470719a6a 100644
--- a/setup.py
+++ b/setup.py
@@ -725,13 +725,13 @@ class PyBuildExt(build_ext):
         # heapq
         self.add(Extension("_heapq", ["_heapqmodule.c"]))
         # C-optimized pickle replacement
-        self.add(Extension("_pickle", ["_pickle.c"]))
+        self.add(Extension("_pickle", ["_pickle.c"],
+                           extra_compile_args=['-D Py_BUILD_CORE_MODULE']))
         # atexit
         self.add(Extension("atexit", ["atexitmodule.c"]))
         # _json speedups
         self.add(Extension("_json", ["_json.c"],
-                           # pycore_accu.h requires Py_BUILD_CORE_BUILTIN
-                           extra_compile_args=['-DPy_BUILD_CORE_BUILTIN']))
+                           extra_compile_args=['-D Py_BUILD_CORE_MODULE']))

         # profiler (_lsprof is for cProfile.py)
         self.add(Extension('_lsprof', ['_lsprof.c', 'rotatingtree.c']))

So, some simple editing: and the diff with master (of yesterday):

diff --git a/setup.py b/setup.py
index 3d6404f89e..58c16e8ba4 100644
--- a/setup.py
+++ b/setup.py
@@ -726,12 +726,12 @@ class PyBuildExt(build_ext):
         self.add(Extension("_heapq", ["_heapqmodule.c"]))
         # C-optimized pickle replacement
         self.add(Extension("_pickle", ["_pickle.c"],
-                           extra_compile_args=['-D Py_BUILD_CORE_MODULE']))
+                           extra_compile_args=['-DPy_BUILD_CORE_MODULE']))
         # atexit
         self.add(Extension("atexit", ["atexitmodule.c"]))
         # _json speedups
         self.add(Extension("_json", ["_json.c"],
-                           extra_compile_args=['-D Py_BUILD_CORE_MODULE']))
+                           extra_compile_args=['-DPy_BUILD_CORE_MODULE']))

         # profiler (_lsprof is for cProfile.py)
         self.add(Extension('_lsprof', ['_lsprof.c', 'rotatingtree.c']))
@@ -816,7 +816,7 @@ class PyBuildExt(build_ext):

         # Python Internal C API test module
         self.add(Extension('_testinternalcapi', ['_testinternalcapi.c'],
-                           extra_compile_args=['-D Py_BUILD_CORE_MODULE']))
+                           extra_compile_args=['-DPy_BUILD_CORE_MODULE']))

         # Python PEP-3118 (buffer protocol) test module
         self.add(Extension('_testbuffer', ['_testbuffer.c']))

And now the modules build as expected.

Should I open PR - or is this better fixed in the original PR? What
keeps things cleaner?

>
> ----------
> nosy: +inada.naoki
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue36696>
> _______________________________________
>
History
Date User Action Args
2019-04-23 08:47:01Michael.Feltsetrecipients: + Michael.Felt, methane
2019-04-23 08:47:01Michael.Feltlinkissue36696 messages
2019-04-23 08:47:01Michael.Feltcreate