Page MenuHomePhabricator

python-efl doesn't build with python3
Closed, InvalidPublic

Description

The current python-efl doesn't seem to build against python3, if its as simple as the substitution gcc suggests I can probably make a patch for us in openSUSE.

[  119s] gcc -pthread -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DOPENSSL_LOAD_CONF -fwrapv -Wno-declaration-after-statement -fPIC -g -DEFL_BETA_API_SUPPORT=1 -DEFL_EO_API_SUPPORT=1 -Iinclude/ -I/usr/include/python3.7m -c efl/eo/efl.eo.c -o build/temp.linux-x86_64-3.7/efl/eo/efl.eo.o -I/usr/include/eo-1 -I/usr/include/eina-1/eina -I/usr/include/eina-1 -I/usr/include/efl-1 -Wno-deprecated-declarations -Wno-unused-variable -Wno-format-security
[  120s] In file included from /usr/include/eina-1/Eina.h:226,
[  120s]                  from efl/eo/efl.eo.c:280:
[  120s] /usr/include/eina-1/eina/eina_module.h:232:2: warning: ignoring attribute ‘malloc’ because it conflicts with attribute ‘pure’ [-Wattributes]
[  120s]   eina_module_symbol_path_get(const void *symbol, const char *sub_dir) EINA_PURE EINA_MALLOC EINA_ARG_NONNULL(1, 2);
[  120s]   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[  120s] /usr/include/eina-1/eina/eina_module.h:249:2: warning: ignoring attribute ‘malloc’ because it conflicts with attribute ‘pure’ [-Wattributes]
[  120s]   eina_module_environment_path_get(const char *env, const char *sub_dir) EINA_PURE EINA_MALLOC EINA_ARG_NONNULL(1, 2);
[  120s]   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[  120s] efl/eo/efl.eo.c: In function ‘__Pyx_ExceptionSave’:
[  120s] efl/eo/efl.eo.c:5662:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
[  120s]      *type = tstate->exc_type;
[  120s]                      ^~~~~~~~
[  120s]                      curexc_type
[  120s] efl/eo/efl.eo.c:5663:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
[  120s]      *value = tstate->exc_value;
[  120s]                       ^~~~~~~~~
[  120s]                       curexc_value
[  120s] efl/eo/efl.eo.c:5664:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
[  120s]      *tb = tstate->exc_traceback;
[  120s]                    ^~~~~~~~~~~~~
[  120s]                    curexc_traceback
[  120s] efl/eo/efl.eo.c: In function ‘__Pyx_ExceptionReset’:
[  120s] efl/eo/efl.eo.c:5676:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
[  120s]      tmp_type = tstate->exc_type;
[  120s]                         ^~~~~~~~
[  120s]                         curexc_type
[  120s] efl/eo/efl.eo.c:5677:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
[  120s]      tmp_value = tstate->exc_value;
[  120s]                          ^~~~~~~~~
[  120s]                          curexc_value
[  120s] efl/eo/efl.eo.c:5678:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
[  120s]      tmp_tb = tstate->exc_traceback;
[  120s]                       ^~~~~~~~~~~~~
[  120s]                       curexc_traceback
[  120s] efl/eo/efl.eo.c:5679:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
[  120s]      tstate->exc_type = type;
[  120s]              ^~~~~~~~
[  120s]              curexc_type
[  120s] efl/eo/efl.eo.c:5680:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
[  120s]      tstate->exc_value = value;
[  120s]              ^~~~~~~~~
[  120s]              curexc_value
[  120s] efl/eo/efl.eo.c:5681:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
[  120s]      tstate->exc_traceback = tb;
[  120s]              ^~~~~~~~~~~~~
[  120s]              curexc_traceback
[  120s] efl/eo/efl.eo.c: In function ‘__Pyx_GetException’:
[  120s] efl/eo/efl.eo.c:5724:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
[  120s]      tmp_type = tstate->exc_type;
[  120s]                         ^~~~~~~~
[  120s]                         curexc_type
[  120s] efl/eo/efl.eo.c:5725:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
[  120s]      tmp_value = tstate->exc_value;
[  120s]                          ^~~~~~~~~
[  120s]                          curexc_value
[  120s] efl/eo/efl.eo.c:5726:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
[  120s]      tmp_tb = tstate->exc_traceback;
[  120s]                       ^~~~~~~~~~~~~
[  120s]                       curexc_traceback
[  120s] efl/eo/efl.eo.c:5727:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
[  120s]      tstate->exc_type = local_type;
[  120s]              ^~~~~~~~
[  120s]              curexc_type
[  120s] efl/eo/efl.eo.c:5728:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
[  120s]      tstate->exc_value = local_value;
[  120s]              ^~~~~~~~~
[  120s]              curexc_value
[  120s] efl/eo/efl.eo.c:5729:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
[  120s]      tstate->exc_traceback = local_tb;
[  120s]              ^~~~~~~~~~~~~
[  120s]              curexc_traceback
[  120s] error: command 'gcc' failed with exit status 1
[  120s] error: Bad exit status from /var/tmp/rpm-tmp.UcyQRq (%build)
simotek created this task.Feb 5 2019, 3:19 PM
simotek triaged this task as High priority.

Hi Simon,
I'm using only python3 since years, I'm not testing even more on py2.

I need more info:

  • exact python version
  • it's a build from stable tarballs or git version + cython?
  • exact cython version (if you are using it)

I'm quite sure this is a cython problem...And no, it's not just doing what gcc
propose because that code is generated by cython

Sorry half awake me didn't leave enough info, this issue has been triggered in the update from python3.6 to 3.7 on efl 1.20.0, (i'll try with 1.21 later not sure why that didn't get updated) according to the script i'm using the bundled c files.

[  119s] Checking for Cython: not needed, using pre-generated C files

So maybe I just need to use cython to force rebuild the files for python 3.7

The issue is 1.20, there was some fixes in 1.21 to work with py3.7

I highly discourage the usage of cython, prebuilt tarballs are much more easier to install.
also the cython rebuild will not fix your issue. Just update to 1.21 for py3.7 compatibility.

Let me know if you still have problems

DaveMDS lowered the priority of this task from High to Normal.Feb 6 2019, 1:19 PM
DaveMDS closed this task as Invalid.Apr 26 2019, 1:20 AM

I think, this was solved. Please reopen if it still apply