Houston4444 / RaySession

Session manager for linux musical programs
GNU General Public License v2.0
150 stars 18 forks source link

Pyliblo fails to build on Fedora 39 with python 3.12 #208

Closed ycollet closed 9 months ago

ycollet commented 9 months ago

I am trying to build pyliblo from your repo on Fedora 39 with python 3.12. I've got a build error during compilation:

+ /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -sP'
/usr/lib/python3.12/site-packages/setuptools/__init__.py:84: _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)
WARNING: The wheel package is not available.
running build
running build_ext
/usr/lib64/python3.12/site-packages/Cython/Compiler/Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /builddir/build/BUILD/pyliblo3-0.12.0/src/liblo.pxd
  tree = Parsing.p_module(s, pxd, full_module_name)

Error compiling Cython file:
------------------------------------------------------------
...
        # cb = struct(func=_weakref_method(func), user_data=user_data)
        cb = Callback(func, user_data)
        # keep a reference to the callback data around
        self._keep_refs.append(cb)

        lo_server_add_method(self._server, p, t, _msg_callback, <void*>cb)
                                                 ^
------------------------------------------------------------

src/liblo.pyx:458:49: Cannot assign type 'int (const_char *, const_char *, lo_arg **, int, lo_message, void *) except? -1 nogil' to 'lo_method_handler'. Exception values are incompatible. Suggest adding 'noexcept' to type 'int (const_char *, const_char *, lo_arg **, int, lo_message, void *) except? -1 nogil'.

Error compiling Cython file:
------------------------------------------------------------
...
        cb_data = struct(start_func=_weakref_method(start_handler),
                         end_func=_weakref_method(end_handler),
                         user_data=user_data)
        self._keep_refs.append(cb_data)

        lo_server_add_bundle_handlers(self._server, _bundle_start_callback,
                                                    ^
------------------------------------------------------------

src/liblo.pyx:513:52: Cannot assign type 'int (lo_timetag, void *) except? -1 nogil' to 'lo_bundle_start_handler'. Exception values are incompatible. Suggest adding 'noexcept' to type 'int (lo_timetag, void *) except? -1 nogil'.

Error compiling Cython file:
------------------------------------------------------------
...
                         end_func=_weakref_method(end_handler),
                         user_data=user_data)
        self._keep_refs.append(cb_data)

        lo_server_add_bundle_handlers(self._server, _bundle_start_callback,
                                      _bundle_end_callback, <void*>cb_data)
                                      ^
------------------------------------------------------------

src/liblo.pyx:514:38: Cannot assign type 'int (void *) except? -1 nogil' to 'lo_bundle_end_handler'. Exception values are incompatible. Suggest adding 'noexcept' to type 'int (void *) except? -1 nogil'.

Error compiling Cython file:
------------------------------------------------------------
...
        else:
            cs = NULL

        global __exception
        __exception = None
        self._server = lo_server_new_with_proto(cs, proto, _err_handler)
                                                           ^
------------------------------------------------------------

src/liblo.pyx:601:59: Cannot assign type 'void (int, const_char *, const_char *) except * nogil' to 'lo_err_handler'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (int, const_char *, const_char *) except * nogil'.

Error compiling Cython file:
------------------------------------------------------------
...
        # make sure python can handle threading
        PyEval_InitThreads()

        global __exception
        __exception = None
        self._server_thread = lo_server_thread_new_with_proto(cs, proto, _err_handler)
                                                                         ^
------------------------------------------------------------

src/liblo.pyx:700:73: Cannot assign type 'void (int, const_char *, const_char *) except * nogil' to 'lo_err_handler'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (int, const_char *, const_char *) except * nogil'.
Compiling src/liblo.pyx because it changed.
[1/1] Cythonizing src/liblo.pyx
Traceback (most recent call last):
  File "/builddir/build/BUILD/pyliblo3-0.12.0/setup.py", line 43, in <module>
    setup(
  File "/usr/lib/python3.12/site-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 1244, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 131, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 1244, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
    self.build_extension(ext)
  File "/usr/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
    _build_ext.build_extension(self, ext)
  File "/usr/lib64/python3.12/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension
    new_ext = cythonize(
              ^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
    cythonize_one(*args)
  File "/usr/lib64/python3.12/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: src/liblo.pyx
Houston4444 commented 9 months ago

Do you use this pyliblo fork: https://github.com/gesellkammer/pyliblo3 ?

The original pyliblo is totally abandoned.

ycollet commented 9 months ago

I though this repo was the most up to date :) Last time you fixed a problem on Fedora already .. I will check ASAP this repository. Thanks a lot for the link. I close the ticket.

ycollet commented 9 months ago

Just a note: The problem is due to cython update on Fedora 39. Before Fedora 39, version 0.29 was used and in Fedora 39 3.0 is used. On Fedora 39, a compat package is provided: python3-cython0.29

kiilo commented 7 months ago

got it running

the installing raysession from source

wget https://github.com/Houston4444/RaySession/releases/download/v0.14.2/RaySession-0.14.2-source.tar.gz`
tar xfz RaySession-0.14.2-source.tar.gz 
cd RaySession-0.14.2/
make

test it ./src/bin/raysession

install it sudo make install