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

Trouble building 2.0.24 python plugin #2616

Open
dsadinoff opened this issue Mar 12, 2024 · 1 comment
Open

Trouble building 2.0.24 python plugin #2616

dsadinoff opened this issue Mar 12, 2024 · 1 comment

Comments

@dsadinoff
Copy link

I'm having the following issue building a standalone python plugin for uwsgi-2.0.24 against python 3.11 or 3.12 (havent' tried other versions of python)

PYTHON=~ccsoft/.pyenv/versions/3.11.8/bin/python3.11  ./uwsgi   --build-plugin "plugins/python  python3118"
*** uWSGI building and linking plugin from plugins/python ***
[gcc]  python3118_plugin.so
plugins/python/python_plugin.c: In function ‘uwsgi_python_init’:
plugins/python/python_plugin.c:254:17: warning: ‘Py_SetPythonHome’ is deprecated [-Wdeprecated-declarations]
  254 |                 Py_SetPythonHome(wpyhome);
      |                 ^~~~~~~~~~~~~~~~
In file included from /home/ccsoft/.pyenv/versions/3.11.8/include/python3.11/Python.h:94,
                 from plugins/python/uwsgi_python.h:4,
                 from plugins/python/python_plugin.c:1:
/home/ccsoft/.pyenv/versions/3.11.8/include/python3.11/pylifecycle.h:40:38: note: declared here
   40 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *);
      |                                      ^~~~~~~~~~~~~~~~
plugins/python/python_plugin.c:278:9: warning: ‘Py_SetProgramName’ is deprecated [-Wdeprecated-declarations]
  278 |         Py_SetProgramName(pname);
      |         ^~~~~~~~~~~~~~~~~
In file included from /home/ccsoft/.pyenv/versions/3.11.8/include/python3.11/Python.h:94,
                 from plugins/python/uwsgi_python.h:4,
                 from plugins/python/python_plugin.c:1:
/home/ccsoft/.pyenv/versions/3.11.8/include/python3.11/pylifecycle.h:37:38: note: declared here
   37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
      |                                      ^~~~~~~~~~~~~~~~~
plugins/python/python_plugin.c: At top level:
plugins/python/python_plugin.c:2105:35: error: expected identifier or ‘(’ before ‘=’ token
 2105 | struct uwsgi_plugin python_plugin = {
      |                                   ^

This is running on a fresh install of amazon linux 2023, with gcc 11.4.1, so it's not like gcc doesn't speak Designated Initializers, right?

I'd be happy to debug but I don't know how to get uwsgi --build-plugin to emit more debug info.

@dsadinoff dsadinoff changed the title Trouble buildng 2.0.24 python plugin Trouble building 2.0.24 python plugin Mar 12, 2024
@xrmx
Copy link
Collaborator

xrmx commented Mar 12, 2024

It's -Wdeprecated-declarations that should be disabled (via -Wno-error=deprecated-declarations) on uwsgi-2.0 branch. Maybe it's not disabled in plugin building path. How did you built uwsgi? Anyway uwsgiconfig.py is where the build stuff resides.

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