Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udpipe_python.cpp contains removed _PyObject_GC_UNTRACK macro #117

Closed
PrimozGodec opened this issue Nov 5, 2019 · 5 comments
Closed

udpipe_python.cpp contains removed _PyObject_GC_UNTRACK macro #117

PrimozGodec opened this issue Nov 5, 2019 · 5 comments

Comments

@PrimozGodec
Copy link

When building the package with Python 3.8 I got the following error:

/home/conda/feedstock_root/build_artifacts/ufal.udpipe_1572695479385/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -I/home/conda/feedstock_root/build_artifacts/ufal.udpipe_1572695479385/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/ufal.udpipe_1572695479385/work=/usr/local/src/conda/ufal.udpipe-1.2.0.2 -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/ufal.udpipe_1572695479385/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold=/usr/local/src/conda-prefix -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -I/home/conda/feedstock_root/build_artifacts/ufal.udpipe_1572695479385/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/include -fPIC -Iudpipe/include -I/home/conda/feedstock_root/build_artifacts/ufal.udpipe_1572695479385/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/include/python3.8 -c udpipe/udpipe_python.cpp -o build/temp.linux-x86_64-3.8/udpipe/udpipe_python.o -std=c++11 -fvisibility=hidden -w
    cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
    udpipe/udpipe_python.cpp: In function 'void SwigPyStaticVar_dealloc(PyDescrObject*)':
    udpipe/udpipe_python.cpp:3321:3: error: '_PyObject_GC_UNTRACK' was not declared in this scope
       _PyObject_GC_UNTRACK(descr);
       ^~~~~~~~~~~~~~~~~~~~
    udpipe/udpipe_python.cpp:3321:3: note: suggested alternative: '_PyObject_GC_IS_TRACKED'
       _PyObject_GC_UNTRACK(descr);
       ^~~~~~~~~~~~~~~~~~~~
       _PyObject_GC_IS_TRACKED
    error: command '/home/conda/feedstock_root/build_artifacts/ufal.udpipe_1572695479385/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
    Running setup.py install for ufal.udpipe: finished with status 'error'

It happens because _PyObject_GC_UNTRACK do not exist in Python 3.8 anymore. Can you consider removing it?

@foxik
Copy link
Member

foxik commented Nov 5, 2019

Thanks for bringing this to our attention. We will probably need to use newer swig, because of Python update. I am currently abroad, so I will get to it when I return (sometimes next week). If you need a fix sooner, you can generate udpipe_python.cpp in bindings/python (with make) using swig 4.0.1, which is the first version supporting Python 3.8.

@PrimozGodec
Copy link
Author

I think I can wait for next week since I would need a newer version published at PyPi and you are the one who can make it.

Thank you for the fast reply.

@PrimozGodec
Copy link
Author

Hello @foxik,

can you rebuild udpipe_python.cpp using swig 4.0.1, and make a new release soon. The thing is that locally I can rebuild the package myself but to allow Orang3-text users to install it for Python3.8 there must be an official release (at PyPi) that I cannot make.

@foxik
Copy link
Member

foxik commented Nov 20, 2019

Yeah, sorry for the delay, I planned some additional improvements to the package before the release (I want to start building wheels and have some bugs in UDPipe I wanted to fix). But considering you are in a hurry, I just did a quick release of 1.2.0.3 which is nearly identical to 1.2.0.2 but with 4.0.1 Swig -- could you please tell me if it is working for Python 3.8 (I do not have it readily available, so I just tested 3.5 and 3.6)? Also, I had to move the location of extension module (SWIG is now importing it differently), so there may be hidden caveats.

@PrimozGodec
Copy link
Author

Hello,
thank you for making the new release available. It seems it is working now also with python 3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants