fastwsgi icon indicating copy to clipboard operation
fastwsgi copied to clipboard

Need Help

Open Fgaoxing opened this issue 2 years ago • 14 comments

image

Fgaoxing avatar Aug 08 '23 04:08 Fgaoxing

@remittor

Fgaoxing avatar Aug 08 '23 05:08 Fgaoxing

I will advise you to install clang (version 7 or higher). https://github.com/jamesroberts/fastwsgi/blob/5572bb31b859d690be225707b9e7e25af397544b/setup.py#L39-L48

remittor avatar Aug 08 '23 05:08 remittor

@remittor But, I want to use ”GCC“。How can I do?

Fgaoxing avatar Aug 08 '23 05:08 Fgaoxing

@remittor I installed it, but still reported an error

Fgaoxing avatar Aug 08 '23 06:08 Fgaoxing

I want to use ”GCC“

What this command produces: gcc --version

How can I do?

https://github.com/jamesroberts/fastwsgi/blob/5572bb31b859d690be225707b9e7e25af397544b/setup.py#L90 You need to add an additional argument for the compiler in this line of code: -std=c99

To rebuild a module, you can use the following commands:

python3 -m pip uninstall fastwsgi
CC="gcc" python3 setup.py install

remittor avatar Aug 08 '23 07:08 remittor

I received the following error from 'Ubuntu 22.04 LTS (GNU/Linux 5.15.0-30-generic x86_64)'

running install
running bdist_egg
running egg_info
writing fastwsgi.egg-info/PKG-INFO
writing dependency_links to fastwsgi.egg-info/dependency_links.txt
writing entry points to fastwsgi.egg-info/entry_points.txt
writing requirements to fastwsgi.egg-info/requires.txt
writing top-level names to fastwsgi.egg-info/top_level.txt
reading manifest file 'fastwsgi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'llhttp/include/*.h'
warning: no files found matching 'llhttp/src/*.c'
warning: no files found matching 'llhttp/src/*.h'
warning: no files found matching 'llhttp/LICENSE-MIT'
warning: no files found matching 'libuv/include/*.h'
warning: no files found matching 'libuv/include/*/*.h'
warning: no files found matching 'libuv/src/*.c'
warning: no files found matching 'libuv/src/*.h'
warning: no files found matching 'libuv/src/*/*.c'
warning: no files found matching 'libuv/src/*/*.h'
warning: no files found matching 'libuv/LICENSE'
adding license file 'LICENSE'
writing manifest file 'fastwsgi.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
Current compiler type: unix
Current compiler: ['gcc', '-Wno-unused-result', '-Wsign-compare', '-DNDEBUG', '-g', '-fwrapv', '-O3', '-Wall']
Current compiler version: 11.4
building '_fastwsgi' extension
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -Illhttp/include -Ilibuv/include -I/www/server/pyporject_evn/b55dac4a6804ffc35f58551f48f361fa_venv/include/python3.10 -Ilibuv/include -Ilibuv/src -c fastwsgi/asgi.c -o build/temp.linux-x86_64-3.10/fastwsgi/asgi.o -O3 -fno-strict-aliasing -fcommon -g -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -std=c99
In file included from fastwsgi/asgi.h:4,
                 from fastwsgi/asgi.c:1:
fastwsgi/common.h:5:10: fatal error: uv.h: No such file or directory
    5 | #include "uv.h"
      |          ^~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1

Fgaoxing avatar Aug 08 '23 08:08 Fgaoxing

warning: no files found matching 'llhttp/include/*.h'

You need to clone the repository along with the submodules: git clone --recurse-submodules https://github.com/jamesroberts/fastwsgi

remittor avatar Aug 08 '23 08:08 remittor

The installation is complete, but after running, only the PID is displayed, and then it ends

Fgaoxing avatar Aug 08 '23 09:08 Fgaoxing

@remittor

Fgaoxing avatar Aug 08 '23 09:08 Fgaoxing

The installation is complete, but after running, only the PID is displayed, and then it ends

https://github.com/jamesroberts/fastwsgi/blob/5572bb31b859d690be225707b9e7e25af397544b/wsgi_example.py#L9 Add an additional parameter to this line: loglevel = 8 And start the server like this: python3 wsgi_example.py

remittor avatar Aug 08 '23 09:08 remittor

image

Fgaoxing avatar Aug 08 '23 09:08 Fgaoxing

@remittor

Fgaoxing avatar Aug 08 '23 09:08 Fgaoxing

@remittor

Fgaoxing avatar Aug 25 '23 00:08 Fgaoxing

https://github.com/jamesroberts/fastwsgi/blob/5572bb31b859d690be225707b9e7e25af397544b/wsgi_example.py#L9

Add an additional parameter to this line: loglevel = 8 And start the server like this: python3 wsgi_example.py

In your screenshot I see, bin/python3 app.py. What is the content of your app.py?

We need more information to reproduce this error. Are you still seeing the same error when following remittor's recommendations above?

Please run the wsgi_example.py file.

jamesroberts avatar Aug 25 '23 04:08 jamesroberts