Author doko
Recipients doko
Date 2017-12-06.13:03:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512565420.17.0.213398074469.issue32232@psf.upfronthosting.co.za>
In-reply-to
Content
building extensions statically in linking these into the python binary is currently broken on 3.7.

I'm attaching the change that worked for me in 3.7alpha2, but doesn't work anymore with alpha3. Currently investigating.  When building extensions as builtins, these should benefit from the knowledge about the core interpreter.

x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/home/packages/python/3.7/python3.7-3.7.0~a3=. -fstack-protector-strong -Wformat -Werror=format-security    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration  -IObjects -IInclude -IPython -I. -I../Include -Wdate-time -D_FORTIFY_SOURCE=2   -DPy_BUILD_CORE  -c ../Modules/_elementtree.c -o Modules/_elementtree.o
In file included from ../Include/pyatomic.h:10:0,
                 from ../Include/Python.h:53,
                 from ../Modules/_elementtree.c:16:
../Modules/_elementtree.c: In function 'element_dealloc':
../Include/pystate.h:314:34: error: '_PyRuntime' undeclared (first use in this function); did you mean 'PyRun_File'?
 #  define _PyThreadState_Current _PyRuntime.gilstate.tstate_current
                                  ^
../Include/pyatomic.h:533:5: note: in expansion of macro '_Py_atomic_load_explicit'
     _Py_atomic_load_explicit(ATOMIC_VAL, _Py_memory_order_relaxed)
     ^~~~~~~~~~~~~~~~~~~~~~~~
../Include/pystate.h:316:31: note: in expansion of macro '_Py_atomic_load_relaxed'
              ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
                               ^~~~~~~~~~~~~~~~~~~~~~~
../Include/pystate.h:316:56: note: in expansion of macro '_PyThreadState_Current'
              ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
                                                        ^~~~~~~~~~~~~~~~~~~~~~
../Include/object.h:1069:34: note: in expansion of macro 'PyThreadState_GET'
         PyThreadState *_tstate = PyThreadState_GET(); \
                                  ^~~~~~~~~~~~~~~~~
../Modules/_elementtree.c:634:5: note: in expansion of macro 'Py_TRASHCAN_SAFE_BEGIN'
     Py_TRASHCAN_SAFE_BEGIN(self)
     ^~~~~~~~~~~~~~~~~~~~~~
../Include/pystate.h:314:34: note: each undeclared identifier is reported only once for each function it appears in
 #  define _PyThreadState_Current _PyRuntime.gilstate.tstate_current
                                  ^
../Include/pyatomic.h:533:5: note: in expansion of macro '_Py_atomic_load_explicit'
     _Py_atomic_load_explicit(ATOMIC_VAL, _Py_memory_order_relaxed)
     ^~~~~~~~~~~~~~~~~~~~~~~~
../Include/pystate.h:316:31: note: in expansion of macro '_Py_atomic_load_relaxed'
              ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
                               ^~~~~~~~~~~~~~~~~~~~~~~
../Include/pystate.h:316:56: note: in expansion of macro '_PyThreadState_Current'
              ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
                                                        ^~~~~~~~~~~~~~~~~~~~~~
../Include/object.h:1069:34: note: in expansion of macro 'PyThreadState_GET'
         PyThreadState *_tstate = PyThreadState_GET(); \
                                  ^~~~~~~~~~~~~~~~~
../Modules/_elementtree.c:634:5: note: in expansion of macro 'Py_TRASHCAN_SAFE_BEGIN'
     Py_TRASHCAN_SAFE_BEGIN(self)
     ^~~~~~~~~~~~~~~~~~~~~~
../Include/pyatomic.h:56:5: error: '__atomic_load_ptr' undeclared (first use in this function); did you mean '__atomic_load_n'?
     atomic_load_explicit(&(ATOMIC_VAL)->_value, ORDER)
     ^
../Include/pyatomic.h:533:5: note: in expansion of macro '_Py_atomic_load_explicit'
     _Py_atomic_load_explicit(ATOMIC_VAL, _Py_memory_order_relaxed)
     ^~~~~~~~~~~~~~~~~~~~~~~~
../Include/pystate.h:316:31: note: in expansion of macro '_Py_atomic_load_relaxed'
              ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
                               ^~~~~~~~~~~~~~~~~~~~~~~
History
Date User Action Args
2017-12-06 13:03:40dokosetrecipients: + doko
2017-12-06 13:03:40dokosetmessageid: <1512565420.17.0.213398074469.issue32232@psf.upfronthosting.co.za>
2017-12-06 13:03:40dokolinkissue32232 messages
2017-12-06 13:03:39dokocreate