criu
criu copied to clipboard
Unable to make install criu-3.19 due to AttributeError: module 'pycriu' has no attribute '__version__'
After downloading criu 3.19 tar: http://github.com/checkpoint-restore/criu/archive/v3.19/criu-3.19.tar.gz
And downloading all the required packages from the install page: https://criu.org/Installation
I am unable to make install criu in Amazon linux due to below error:
sudo make install
Note: Building without setproctitle() and strlcpy() support.
To enable these features, please install libbsd-devel (RPM) / libbsd-dev (DEB).
Note: Building criu with amdgpu_plugin.
Makefile.config:53: Warn: you have no libnftables installed
Makefile.config:54: Warn: Building without nftables support
fatal: not a git repository (or any of the parent directories): .git
INSTALL criu.8
INSTALL crit.1 criu-ns.1 compel.1 criu-amdgpu-plugin.1
make[1]: Nothing to be done for `all'.
make[1]: `images/built-in.o' is up to date.
make[1]: `compel/plugins/std.lib.a' is up to date.
make[1]: `compel/plugins/fds.lib.a' is up to date.
make[1]: `compel/libcompel.a' is up to date.
make[1]: `compel/compel-host-bin' is up to date.
make[1]: Nothing to be done for `all'.
make[1]: `soccr/libsoccr.a' is up to date.
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
make[2]: `lib/c/built-in.o' is up to date.
make[2]: `lib/c/built-in.o' is up to date.
make[2]: Nothing to be done for `lib/c/criu.pc.in'.
INSTALL lib
INSTALL pkgconfig/criu.pc
INSTALL pycriu
WARNING: Running pip install with root privileges is generally not a good idea. Try `python3 -m pip install --user` instead.
Processing ./lib
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /bin/python3 /usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpp82f7bpa
cwd: /tmp/pip-req-build-s0ybcnks
Complete output (51 lines):
Traceback (most recent call last):
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/expand.py", line 83, in __getattr__
for target, value in self._find_assignments()
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/expand.py", line 191, in read_attr
return getattr(StaticModule(module_name, spec), attr_name)
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/expand.py", line 87, in __getattr__
raise AttributeError(f"{self.name} has no attribute {attr}") from e
AttributeError: pycriu has no attribute __version__
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 6, in <module>
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 159, in setup
dist.parse_config_files()
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 895, in parse_config_files
self, self.command_options, ignore_option_errors=ignore_option_errors
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/setupcfg.py", line 189, in parse_configuration
meta.parse()
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/setupcfg.py", line 500, in parse
section_parser_method(section_options)
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/setupcfg.py", line 475, in parse_section
self[name] = value
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/setupcfg.py", line 293, in __setitem__
parsed = self.parsers.get(option_name, lambda x: x)(value)
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/setupcfg.py", line 606, in _parse_version
return expand.version(self._parse_attr(value, self.package_dir, self.root_dir))
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/setupcfg.py", line 417, in _parse_attr
return expand.read_attr(attr_desc, package_dir, root_dir)
File "/tmp/pip-build-env-jcwxkmi7/overlay/lib/python3.7/site-packages/setuptools/config/expand.py", line 195, in read_attr
return getattr(module, attr_name)
AttributeError: module 'pycriu' has no attribute '__version__'
----------------------------------------
ERROR: Command errored out with exit status 1: /bin/python3 /usr/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpp82f7bpa Check the logs for full command output.
make[1]: *** [install] Error 1
make: *** [install-lib] Error 2
Any help or pointers would be greatly appreciated!
@karanshetty53 Could you try upgrading to the latest version of pip?
python3 -m pip --version
sudo python3 -m pip install -U pip
As Amazon Linux 2023 is based on Fedora, it might help to look at the Fedora CRIU RPM: https://src.fedoraproject.org/rpms/criu/blob/rawhide/f/criu.spec
@rst0git Thanks I have already upgraded pip and it still shows version errors on pycriu.
@adrianreber I did try Fedora RPM but it looks for certain version dependencies that are already upgraded and installed:
error: Failed dependencies:
python(abi) = 3.12 is needed by crit-3.19-4.fc40.x86_64
python3-criu = 3.19-4.fc40 is needed by crit-3.19-4.fc40.x86_64
rpmlib(PayloadIsZstd) <= 5.4.18-1 is needed by crit-3.19-4.fc40.x86_64
I am also willing to try any other recommended OS if it can be installed without any package version errors.
Appreciate your inputs on this.
I did not mean that you take the Fedora RPM directly. I linked to the spec file so that you can see how Fedora builds CRIU.
If you do not care about the distribution try Fedora, @rst0git and myself are the main group of people maintaining CRIU in Fedora. It usually is in a pretty good state. Also RHEL 9 and clones should work good. Ubuntu usually needs an external package which is also something we provide.
I was able to replicate the error when building CRIU in amazonlinux:2 container and confirm that it is not present with amazonlinux:latest.
@karanshetty53 In addition to Adrian's suggestion, if you don't need crit and pycriu, you can use make install-criu as a workaround for this problem.
A friendly reminder that this issue had no activity for 30 days.