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

fail to compile pywlroots #228

Closed
cr1ogen opened this issue Jan 23, 2025 · 1 comment
Closed

fail to compile pywlroots #228

cr1ogen opened this issue Jan 23, 2025 · 1 comment

Comments

@cr1ogen
Copy link

cr1ogen commented Jan 23, 2025

setup.py give me error to install

python3 ./setup.py
/usr/lib/python3/dist-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
wlroots/__pycache__/_cffi__x58fcf130x93e86b51.c:269:10: fatal error: wlr/version.h: No existe el fichero o el directorio
  269 | #include <wlr/version.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py", line 70, in spawn
    subprocess.check_call(cmd, env=_inject_macos_ver(env))
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/subprocess.py", line 419, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/x86_64-linux-gnu-gcc', '-fno-strict-overflow', '-Wsign-compare', '-DNDEBUG', '-g', '-O2', '-Wall', '-fPIC', '-I/usr/include/python3.13', '-c', 'wlroots/__pycache__/_cffi__x58fcf130x93e86b51.c', '-o', '/home/cr1ogen/Descargas/pywlroots-0.17.0/wlroots/__pycache__/wlroots/__pycache__/_cffi__x58fcf130x93e86b51.o']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py", line 200, in _compile
    self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py", line 1045, in spawn
    spawn(cmd, dry_run=self.dry_run, **kwargs)
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/spawn.py", line 76, in spawn
    raise DistutilsExecError(
        f"command {_debug(cmd)!r} failed with exit code {err.returncode}"
    ) from err
distutils.errors.DistutilsExecError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cffi/ffiplatform.py", line 48, in _build
    dist.run_command('build_ext')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 995, in run_command
    super().run_command(command)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
    ~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 99, in run
    _build_ext.run(self)
    ~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
    self.build_extensions()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
    self._build_extensions_serial()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
    self.build_extension(ext)
    ~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 264, in build_extension
    _build_ext.build_extension(self, ext)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/command/build_ext.py", line 557, in build_extension
    objects = self.compiler.compile(
        sources,
    ...<5 lines>...
        depends=ext.depends,
    )
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/ccompiler.py", line 606, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/unixccompiler.py", line 202, in _compile
    raise CompileError(msg)
distutils.errors.CompileError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "wlroots/ffi_build.py", line 36, in load_wlroots_version
    lib = ffi.verify("#include <wlr/version.h>")
  File "/usr/lib/python3/dist-packages/cffi/api.py", line 468, in verify
    lib = self.verifier.load_library()
  File "/usr/lib/python3/dist-packages/cffi/verifier.py", line 105, in load_library
    self._compile_module()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/cffi/verifier.py", line 201, in _compile_module
    outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
  File "/usr/lib/python3/dist-packages/cffi/ffiplatform.py", line 20, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/usr/lib/python3/dist-packages/cffi/ffiplatform.py", line 54, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.VerificationError: CompileError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cr1ogen/Descargas/pywlroots-0.17.0/./setup.py", line 34, in <module>
    setup(**keywords_with_side_effects(sys.argv))
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 145, in setup
    _setup_distribution = dist = klass(attrs)
                                 ~~~~~^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 319, in __init__
    _Distribution.__init__(self, dist_attrs)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 279, in __init__
    self.finalize_options()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 677, in finalize_options
    ep(self)
    ~~^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 697, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/cffi/setuptools_ext.py", line 216, in cffi_modules
    add_cffi_module(dist, cffi_module)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
    execfile(build_file_name, mod_vars)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/cffi/setuptools_ext.py", line 25, in execfile
    exec(code, glob, glob)
    ~~~~^^^^^^^^^^^^^^^^^^
  File "wlroots/ffi_build.py", line 3132, in <module>
    check_version()
    ~~~~~~~~~~~~~^^
  File "wlroots/ffi_build.py", line 49, in check_version
    wlroots_version = load_wlroots_version()
  File "wlroots/ffi_build.py", line 38, in load_wlroots_version
    lib = importlib.import_module("wlroots").lib
          ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/cr1ogen/Descargas/pywlroots-0.17.0/wlroots/__init__.py", line 8, in <module>
    from ._ffi import ffi, lib
ModuleNotFoundError: No module named 'wlroots._ffi'
pip list:
pywayland          0.4.18
xkbcommon          1.5.1
apt search libwlroots                    
libwlroots-0.18/unstable,now 0.18.2-2 amd64 [instalado]
  Modular wayland compositor library - shared library

libwlroots-0.18-dev/unstable,now 0.18.2-2 amd64 [instalado]
  Modular wayland compositor library - development headers

libwlroots-0.18-examples/unstable,now 0.18.2-2 amd64 [instalado]
  Modular wayland compositor library - binaries
@cr1ogen
Copy link
Author

cr1ogen commented Jan 27, 2025

I had to downgrade the libwlroots 0.18 package to libwlroots 0.17 on debian to get it to work. Why would it be?

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

1 participant