openMotor icon indicating copy to clipboard operation
openMotor copied to clipboard

[Discussion] Pre-built binaries for Linux

Open PixelShadow opened this issue 8 months ago • 11 comments

I run Linux an I tried to build OpenMotor from source. I ran into several issues regarding dependencies. I'll probably solve them but it still takes a lot of time. Is there any way we can get pre-built binaries of this software for Linux ?

PixelShadow avatar Apr 29 '25 12:04 PixelShadow

Same I am on fedora and it would be easier for a lot of people if there were precompiled packages available

Digitalpeer1 avatar Jun 25 '25 13:06 Digitalpeer1

Please let me know if you have solved the issues because I have some as well with install

ERROR: Exception:
Traceback (most recent call last):
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
    status = _inner_run()
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
    return self.run(options, args)
           ~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/cli/req_command.py", line 68, in wrapper
    return func(self, options, args)
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/commands/install.py", line 387, in run
    requirement_set = resolver.resolve(
        reqs, check_supported_wheels=not options.target_dir
    )
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 96, in resolve
    result = self._result = resolver.resolve(
                            ~~~~~~~~~~~~~~~~^
        collected.requirements, max_rounds=limit_how_complex_resolution_can_be
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py", line 515, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py", line 388, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py", line 141, in _add_to_criteria
    if not criterion.candidates:
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_vendor/resolvelib/structs.py", line 194, in __bool__
    return bool(self._sequence)
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 163, in __bool__
    self._bool = any(self)
                 ~~~^^^^^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 147, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
                       ^^^^^^^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 37, in _iter_built
    candidate = func()
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 187, in _make_candidate_from_link
    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        link, template, name, version
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 233, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
                                       ~~~~~~~~~~~~~^
        link,
        ^^^^^
    ...<3 lines>...
        version=version,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 306, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        link=link,
        ^^^^^^^^^^
    ...<4 lines>...
        version=version,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 159, in __init__
    self.dist = self._prepare()
                ~~~~~~~~~~~~~^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 236, in _prepare
    dist = self._prepare_distribution()
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 317, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/operations/prepare.py", line 532, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/operations/prepare.py", line 647, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
        req,
    ...<3 lines>...
        self.check_build_deps,
    )
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/operations/prepare.py", line 71, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        finder, build_isolation, check_build_deps
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/distributions/sdist.py", line 56, in prepare_distribution_metadata
    self._install_build_reqs(finder)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/distributions/sdist.py", line 126, in _install_build_reqs
    build_reqs = self._get_build_requires_wheel()
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/distributions/sdist.py", line 103, in _get_build_requires_wheel
    return backend.get_requires_for_build_wheel()
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_internal/utils/misc.py", line 702, in get_requires_for_build_wheel
    return super().get_requires_for_build_wheel(config_settings=cs)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 196, in get_requires_for_build_wheel
    return self._call_hook(
           ~~~~~~~~~~~~~~~^
        "get_requires_for_build_wheel", {"config_settings": config_settings}
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/ishaa/openMotor/.venv/lib64/python3.13/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 402, in _call_hook
    raise BackendUnavailable(
    ...<4 lines>...
    )
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta
'

Digitalpeer1 avatar Jun 25 '25 17:06 Digitalpeer1

Same for me. Am on Fedora and building this is not fun.

radio-satellites avatar Jun 30 '25 10:06 radio-satellites

Turns out I needed to update my requirements.txt to build, that helped a lot. To anyone looking: requirements.txt

radio-satellites avatar Jun 30 '25 11:06 radio-satellites

Hi! Totally willing to provide packaged versions of releases for Linux, but I'm not sure where to start. What distros/formats should I target? Alternatively, willing to accept PRs that make it easier to run on Linux. Not sure if that requirements.txt file is an improvement, though, looks like the change was just removing the versions for a couple of packages. Is the issue that the versions specified don't have binaries available for Linux? Would prefer specifying versions that do (latest?) rather than dropping the version.

reilleya avatar Jul 01 '25 03:07 reilleya

@reilleya My advice is either to build it as a flatpak and release it on Flathub or you can buid it as an app image. Both solutions work for every Linux distros. Here are the pros and cons:

flatpak on Flathub:

  • Easy to install and update
  • Apparently difficult to ship (I never tried building a flatpak package but I've heard that it's not that easy)

AppImage:

  • One file that contains everything you need to run the software
  • You don't get the convenience of a package manager (you have to delete the old file and download the new one for updating)

PixelShadow avatar Jul 01 '25 14:07 PixelShadow

@PixelShadow Good overview. I don't think the process for FlatPak is that difficult - it's mostly creating a .yml manifest, then running flatpack-builder. To get it on FlatHub, I think you need to submit a pull request here. I haven't done the process ever myself but do imagine it wouldn't be that difficult.

radio-satellites avatar Jul 01 '25 23:07 radio-satellites

Flatpak usually ends up running into permission issues other than that no complaints. App images can be combined with https://github.com/mijorus/gearlever to have auto update and ease of use. Either way you could do that or DEB and RPM packages what ever is easier for you!

Digitalpeer1 avatar Jul 02 '25 01:07 Digitalpeer1

It is already in the debian 12 repos and on the AUR.

almostahexagon2 avatar Jul 11 '25 03:07 almostahexagon2

But flatpak/appimage makes it usable on more systems than debian and arch.

Digitalpeer1 avatar Jul 11 '25 16:07 Digitalpeer1

Forgive the newbie Linux user question - can openmotor be installed and run via Wine?

Regardless, it would be great to have a package available.

vahpr avatar Aug 26 '25 15:08 vahpr