YoSTEALTH / Liburing

Liburing is Python + Cython wrapper around C Liburing, which is a helper to setup and tear-down io_uring instances.
https://pypi.org/project/liburing/
Creative Commons Zero v1.0 Universal
98 stars 3 forks source link

Unable to install the package via pip #3

Closed govardhangdg closed 4 years ago

govardhangdg commented 4 years ago

What I did?

ran the command pip install liburing

Output

ERROR: Command errored out with exit status 1: command: /usr/bin/python /usr/lib/python3.8/site-packages/pep517/_in_process.py build_wheel /tmp/tmpct4dcl0c cwd: /tmp/pip-install-a88v40ja/liburing Complete output (40 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/liburing copying liburing/wrapper.py -> build/lib.linux-x86_64-3.8/liburing copying liburing/interface.py -> build/lib.linux-x86_64-3.8/liburing copying liburing/helper.py -> build/lib.linux-x86_64-3.8/liburing copying liburing/init.py -> build/lib.linux-x86_64-3.8/liburing running build_ext generating cffi module 'build/temp.linux-x86_64-3.8/liburing._liburing.c' creating build/temp.linux-x86_64-3.8 building 'liburing._liburing' extension creating build/temp.linux-x86_64-3.8/build creating build/temp.linux-x86_64-3.8/build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/src gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -Isrc/include -I/usr/include/python3.8 -c build/temp.linux-x86_64-3.8/liburing._liburing.c -o build/temp.linux-x86_64-3.8/build/temp.linux-x86_64-3.8/liburing._liburing.o In file included from src/include/liburing.h:17, from build/temp.linux-x86_64-3.8/liburing._liburing.c:542: src/include/custom.h:4:8: error: redefinition of ‘struct __kernel_timespec’ 4 | struct kernel_timespec { | ^~~~~ In file included from /usr/include/liburing/compat.h:5, from src/include/liburing.h:14, from build/temp.linux-x86_64-3.8/liburing._liburing.c:542: /usr/include/linux/time_types.h:7:8: note: originally defined here 7 | struct kernel_timespec { | ^~~~~ In file included from src/include/liburing.h:17, from build/temp.linux-x86_64-3.8/liburing._liburing.c:542: src/include/custom.h:9:8: error: redefinition of ‘struct open_how’ 9 | struct open_how { | ^~~~ In file included from src/include/liburing.h:14, from build/temp.linux-x86_64-3.8/liburing._liburing.c:542: /usr/include/liburing/compat.h:9:8: note: originally defined here 9 | struct open_how { | ^~~~ error: command 'gcc' failed with exit status 1

ERROR: Failed building wheel for liburing

OS

Arch linux 5.5.7-arch1-1

Additional

As the liburing files were not present initially, i had to install them using yay -S liburing

YoSTEALTH commented 4 years ago

Can you try to install from github? This issue should be fixed!

hmm... liburing files were included in pip install liburing build.

govardhangdg commented 4 years ago

Received the following on running python setup.py install within the repo

[govardhan@arch]: ~/work/iouring/Liburing>$ python setup.py install Traceback (most recent call last): File "setup.py", line 18, in setup(url='https://github.com/YoSTEALTH/Liburing', File "/usr/lib/python3.8/site-packages/setuptools/init.py", line 145, in setup return distutils.core.setup(*attrs) File "/usr/lib/python3.8/distutils/core.py", line 108, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python3.8/site-packages/setuptools/dist.py", line 446, in init _Distribution.init(self, { File "/usr/lib/python3.8/distutils/dist.py", line 292, in init self.finalize_options() File "/usr/lib/python3.8/site-packages/setuptools/dist.py", line 735, in finalize_options ep.load()(self, ep.name, value) File "/usr/lib/python3.8/site-packages/cffi-1.14.0-py3.8-linux-x86_64.egg/cffi/setuptools_ext.py", line 217, in cffi_modules add_cffi_module(dist, cffi_module) File "/usr/lib/python3.8/site-packages/cffi-1.14.0-py3.8-linux-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module execfile(build_file_name, mod_vars) File "/usr/lib/python3.8/site-packages/cffi-1.14.0-py3.8-linux-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile exec(code, glob, glob) File "builder.py", line 10, in subprocess.run('./configure') File "/usr/lib/python3.8/subprocess.py", line 489, in run with Popen(popenargs, **kwargs) as process: File "/usr/lib/python3.8/subprocess.py", line 854, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: './configure'

govardhangdg commented 4 years ago

Update: worked with pip install git+https://github.com/YoSTEALTH/Liburing Thanks.

YoSTEALTH commented 4 years ago

ok, cool ... https://github.com/YoSTEALTH/Liburing/tree/master/libs uses submodules so ya... :)

govardhangdg commented 4 years ago

But I can't use it :(

Python 3.8.0 (default, Oct 23 2019, 18:51:26) [GCC 9.2.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import liburing Traceback (most recent call last): File "", line 1, in File "", line 259, in load_module File "/usr/lib/python3.8/site-packages/liburing-2020.2.26-py3.8.egg/liburing/init.py", line 1, in ModuleNotFoundError: No module named 'liburing._liburing'

govardhangdg commented 4 years ago

Even though it is installed:

[govardhan@arch]: ~/work/iouring/futures>$ pip show liburing Name: liburing Version: 2020.2.26 Summary: This is a Python + CFFI wrapper around Liburing C library, which is a helper to setup and tear-down io_uring instances. Home-page: https://github.com/YoSTEALTH/Liburing Author: STEALTH Author-email: None License: UNKNOWN Location: /usr/lib/python3.8/site-packages/liburing-2020.2.26-py3.8.egg Requires: cffi Required-by:

YoSTEALTH commented 4 years ago

hmm... that is weird. how did it install without compiling the liburing._liburing.so?

YoSTEALTH commented 4 years ago

can you try pip install --upgrade way? maybe you are looking at previously failed installed.

govardhangdg commented 4 years ago

It worked! Thanks a lot!!

YoSTEALTH commented 4 years ago

cool :)