pwr-Solaar / Solaar

Linux device manager for Logitech devices
https://pwr-solaar.github.io/Solaar
GNU General Public License v2.0
5.35k stars 402 forks source link

Termux support #2529

Closed hoshsadiq closed 2 months ago

hoshsadiq commented 2 months ago

Information

Is your feature request related to a problem? Please describe. I'm trying to install Solaar inside Termux. It seems that this is not possible right now.

Describe the solution you'd like I'd like support for Solaar to be run in Termux. There's some docs on how to access usb devices within Termux.

Describe alternatives you've considered I was hoping that Logitech would have an Android app, but nope. Alternatively, I can potentially set it up using my main computer.

Additional context For sure the below isn't related to the above (supporting Termux-usb package), however, I did attempt to install it using pipx, but couldn't get past it failing to build ninja. There's a thread discussing this (see https://github.com/termux/termux-packages/issues/8951), but I'm unable to get past the issue based on comments.

$ pkg install xorgproto ninja patchelf gobject-introspection binutils
...

~ $ pipx install solaar
Fatal error from pip prevented installation. Full pip output in file:
    /data/data/com.termux/files/home/.local/state/pipx/log/cmd_2024-06-17_22.22.56_pip_errors.log

pip seemed to fail to build package:
    ninja

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error

Error installing solaar.

~ $ cat /data/data/com.termux/files/home/.local/state/pipx/log/cmd_2024-06-17_22.22.56_pip_errors.log
PIP STDOUT
----------
Collecting solaar
  Using cached solaar-1.1.13-py3-none-any.whl.metadata (1.8 kB)
Collecting pyudev>=0.13 (from solaar)
  Using cached pyudev-0.24.3-py3-none-any.whl.metadata (4.6 kB)
Collecting PyYAML>=3.12 (from solaar)
  Using cached PyYAML-6.0.1.tar.gz (125 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting python-xlib>=0.27 (from solaar)
  Using cached python_xlib-0.33-py2.py3-none-any.whl.metadata (6.2 kB)
Collecting psutil>=5.4.3 (from solaar)
  Using cached psutil-5.9.8.tar.gz (503 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting PyGObject (from solaar)
  Using cached pygobject-3.48.2.tar.gz (715 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting evdev>=1.1.2 (from solaar)
  Using cached evdev-1.7.1.tar.gz (30 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting dbus-python (from solaar)
  Using cached dbus-python-1.3.2.tar.gz (605 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'

PIP STDERR
----------
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [85 lines of output]
      Collecting meson-python>=0.8.1
        Using cached meson_python-0.16.0-py3-none-any.whl.metadata (4.1 kB)
      Collecting meson>=0.60.0
        Using cached meson-1.4.1-py3-none-any.whl.metadata (1.8 kB)
      Collecting ninja
        Using cached ninja-1.11.1.1.tar.gz (132 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting patchelf
        Using cached patchelf-0.17.2.1.tar.gz (167 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting setuptools
        Using cached setuptools-70.0.0-py3-none-any.whl.metadata (5.9 kB)
      Collecting wheel
        Using cached wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
      Collecting packaging>=19.0 (from meson-python>=0.8.1)
        Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
      Collecting pyproject-metadata>=0.7.1 (from meson-python>=0.8.1)
        Using cached pyproject_metadata-0.8.0-py3-none-any.whl.metadata (3.0 kB)
      Using cached meson_python-0.16.0-py3-none-any.whl (26 kB)
      Using cached meson-1.4.1-py3-none-any.whl (937 kB)
      Using cached setuptools-70.0.0-py3-none-any.whl (863 kB)
      Using cached wheel-0.43.0-py3-none-any.whl (65 kB)
      Using cached packaging-24.1-py3-none-any.whl (53 kB)
      Using cached pyproject_metadata-0.8.0-py3-none-any.whl (7.5 kB)
      Building wheels for collected packages: ninja, patchelf
        Building wheel for ninja (pyproject.toml): started
        Building wheel for ninja (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error

        × Building wheel for ninja (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [15 lines of output]
            /data/data/com.termux/files/usr/tmp/pip-build-env-tsnc2khz/overlay/lib/python3.11/site-packages/setuptools_scm/git.py:312: UserWarning: git archive did not support describe output
              warnings.warn("git archive did not support describe output")
            /data/data/com.termux/files/usr/tmp/pip-build-env-tsnc2khz/overlay/lib/python3.11/site-packages/setuptools_scm/git.py:331: UserWarning: unprocessed git archival found (no export subst applied)
              warnings.warn("unprocessed git archival found (no export subst applied)")
            Traceback (most recent call last):
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-tsnc2khz/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
                cmkr = cmaker.CMaker(cmake_executable)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-tsnc2khz/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 148, in __init__
                self.cmake_version = get_cmake_version(self.cmake_executable)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-tsnc2khz/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
                raise SKBuildError(msg) from err

            Problem with the CMake installation, aborting build. CMake executable is cmake
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for ninja
        Building wheel for patchelf (pyproject.toml): started
        Building wheel for patchelf (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error

        × Building wheel for patchelf (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [11 lines of output]
            Traceback (most recent call last):
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-202bb8z9/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
                cmkr = cmaker.CMaker(cmake_executable)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-202bb8z9/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 148, in __init__
                self.cmake_version = get_cmake_version(self.cmake_executable)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-202bb8z9/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
                raise SKBuildError(msg) from err

            Problem with the CMake installation, aborting build. CMake executable is cmake
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for patchelf
      Failed to build ninja patchelf
      ERROR: Could not build wheels for ninja, patchelf, which is required to install pyproject.toml-based projects
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
pfps commented 2 months ago

Unfortunately you are gong to be on your own here unless you can find someone who is also interested in this.

NoteAfterNote commented 2 months ago

From https://github.com/NoteAfterNote

  1. NoteAfterNote-10, "Testing: Termux, vmtest, and QEMU": https://gist.github.com/NoteAfterNote/7614b0137ac6959e3bba35df66eaa75a

  2. NoteAfterNote-7, "Reading and writing a USB drive connected to a Linux server using Termux, termux-usb, usbredirect, and QEMU on a smartphone that is not rooted": https://gist.github.com/NoteAfterNote/7a197233de3d60ff1e23ca90ed2f595a

CC: @hoshsadiq, @pfps