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

Need Help #48

Open
Fgaoxing opened this issue Aug 8, 2023 · 14 comments
Open

Need Help #48

Fgaoxing opened this issue Aug 8, 2023 · 14 comments

Comments

@Fgaoxing
Copy link

Fgaoxing commented Aug 8, 2023

image

@Fgaoxing
Copy link
Author

Fgaoxing commented Aug 8, 2023

@remittor

@remittor
Copy link
Contributor

remittor commented Aug 8, 2023

I will advise you to install clang (version 7 or higher).

fastwsgi/setup.py

Lines 39 to 48 in 5572bb3

# Forced use clang compiler, if installed
if platform.system() == "Linux" and current_compiler == "":
for cc_ver in range(40, 7, -1):
cc = 'clang-%d' % cc_ver
text, ver_major, ver_minor = get_compiler_version(cc)
if text and ver_major:
current_compiler = cc
print('Change current compiler to {}'.format(cc))
os.environ['CC'] = cc
break

@Fgaoxing
Copy link
Author

Fgaoxing commented Aug 8, 2023

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

@Fgaoxing
Copy link
Author

Fgaoxing commented Aug 8, 2023

@remittor I installed it, but still reported an error

@remittor
Copy link
Contributor

remittor commented Aug 8, 2023

I want to use ”GCC“

What this command produces: gcc --version

How can I do?

ext.extra_compile_args += [ "-Wno-unused-but-set-variable" ]

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

@Fgaoxing
Copy link
Author

Fgaoxing commented Aug 8, 2023

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

@remittor
Copy link
Contributor

remittor commented Aug 8, 2023

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

@Fgaoxing
Copy link
Author

Fgaoxing commented Aug 8, 2023

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

@Fgaoxing
Copy link
Author

Fgaoxing commented Aug 8, 2023

@remittor

@remittor
Copy link
Contributor

remittor commented Aug 8, 2023

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

fastwsgi.run(wsgi_app=app, host='0.0.0.0', port=5000)

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

@Fgaoxing
Copy link
Author

Fgaoxing commented Aug 8, 2023

image

@Fgaoxing
Copy link
Author

Fgaoxing commented Aug 8, 2023

@remittor

1 similar comment
@Fgaoxing
Copy link
Author

@remittor

@jamesroberts
Copy link
Owner

fastwsgi.run(wsgi_app=app, host='0.0.0.0', port=5000)

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.

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

3 participants