carray_from_* unused-function warnings with 0.26b0
See original GitHub issueThose weren’t present before. We’re building with -Wall because until now the generated code was clean. Here’s an example of failure:
building 'xpra.codecs.csc_swscale.colorspace_converter' extension
creating build/temp.linux-x86_64-2.7/xpra/codecs/csc_swscale
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/xpra -I/usr/include/python2.7 -c xpra/codecs/csc_swscale/colorspace_converter.c -o build/temp.linux-x86_64-2.7/xpra/codecs/csc_swscale/colorspace_converter.o -Wl,-rpath,/usr/lib64/xpra -Wall -Werror -fPIC
xpra/codecs/csc_swscale/colorspace_converter.c:12227:12: error: ‘__Pyx_carray_from_py_unsigned_long’ defined but not used [-Werror=unused-function]
static int __Pyx_carray_from_py_unsigned_long(PyObject *__pyx_v_o, unsigned long *__pyx_v_v, Py_ssize_t __pyx_v_length) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpra/codecs/csc_swscale/colorspace_converter.c:11690:12: error: ‘__Pyx_carray_from_py_int’ defined but not used [-Werror=unused-function]
static int __Pyx_carray_from_py_int(PyObject *__pyx_v_o, int *__pyx_v_v, Py_ssize_t __pyx_v_length) {
^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
And:
building 'xpra.codecs.vpx.encoder' extension
creating build/temp.linux-x86_64-2.7/xpra/codecs/vpx
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/xpra -I/usr/include/python2.7 -c xpra/codecs/vpx/encoder.c -o build/temp.linux-x86_64-2.7/xpra/codecs/vpx/encoder.o -Wall -Werror -fPIC
xpra/codecs/vpx/encoder.c:21241:30: error: ‘__pyx_convert__to_py_vpx_codec_enc_cfg_t’ defined but not used [-Werror=unused-function]
static PyObject* __pyx_convert__to_py_vpx_codec_enc_cfg_t(vpx_codec_enc_cfg_t s) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpra/codecs/vpx/encoder.c:13358:28: error: ‘__pyx_convert__from_py_vpx_codec_enc_cfg_t’ defined but not used [-Werror=unused-function]
static vpx_codec_enc_cfg_t __pyx_convert__from_py_vpx_codec_enc_cfg_t(PyObject *__pyx_v_obj) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
Not sure why those functions are generated at all. This problem only affects these two modules out of a well over a dozen. How can I workaround this and get Cython not to generate those functions?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be fixed by 29067ceba6b1370cfd9a9b85a291957c0aaa34a1
This can be disabled with the auto_pickle directive, e.g.
#cython: auto_pickle=False
at the top of the file. However, we should be able to test whether conversion is possible without actually generating them, so this bug still should be fixed.