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

Installing borgbackup on Sonology DSM 7.2-64570 not possible #6063

Closed
barnybla opened this issue Apr 4, 2024 · 3 comments
Closed

Installing borgbackup on Sonology DSM 7.2-64570 not possible #6063

barnybla opened this issue Apr 4, 2024 · 3 comments

Comments

@barnybla
Copy link

barnybla commented Apr 4, 2024

I try to install borgbackup on my NAS, and I get the following error:

(borgmatic_env) root@swnnas2:/volume1/borgmatic_env# python3 -m pip install borgbackup
Collecting borgbackup
  Using cached borgbackup-1.2.8.tar.gz (4.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      Traceback (most recent call last):
        File "/tmp/pip-build-env-mf45xtqb/overlay/lib/python3.11/site-packages/pkgconfig/pkgconfig.py", line 91, in _wrapper
          return func(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-mf45xtqb/overlay/lib/python3.11/site-packages/pkgconfig/pkgconfig.py", line 125, in exists
          return call(cmd) == 0
                 ^^^^^^^^^
        File "/var/packages/python311/target/lib/python3.11/subprocess.py", line 389, in call
          with Popen(*popenargs, **kwargs) as p:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/var/packages/python311/target/lib/python3.11/subprocess.py", line 1026, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/var/packages/python311/target/lib/python3.11/subprocess.py", line 1950, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/volume1/borgmatic_env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/volume1/borgmatic_env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/volume1/borgmatic_env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-mf45xtqb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-mf45xtqb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-mf45xtqb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 193, in <module>
        File "/tmp/pip-install-luz2jq4b/borgbackup_7c6c0bd69b094015b0eb0f32a1c4e50d/setup_crypto.py", line 28, in crypto_ext_kwargs
          if pc and pc.exists('libcrypto'):
                    ^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-mf45xtqb/overlay/lib/python3.11/site-packages/pkgconfig/pkgconfig.py", line 93, in _wrapper
          raise EnvironmentError("pkg-config probably not installed: %r" % e)
      OSError: pkg-config probably not installed: FileNotFoundError(2, 'No such file or directory')
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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

I don't understand the error, can somebody explains me the error code.

Thanks for help
Bernd

@hgy59
Copy link
Contributor

hgy59 commented Apr 4, 2024

@barnybla we have a borgbackup package available.

It is not possible to install borgbackup as you did. It is missing some wheels that need to be cross compiled for the system your are running it. I suppose your NAS is not of x86_64 architecture, as wheels for those are mostly downloadable from the index (like pypi).
AFAICS in the logs, it is trying to build cryptography wheel. For this it would need a build environment with development packages, compiler, et al.

If you install borgbackup package created by the SynoCommunity, you get all the required cross compiled wheels for your NAS.

It is one of the main tasks of this repository to cross compile programs, libraries and tools (and wheels) from source code.


PS If a program and all dependencies are pure python, then it is possilbe to install it in a virtual environment as you tried.

@barnybla
Copy link
Author

barnybla commented Apr 4, 2024

thanks hgy59 for the reply,
The NAS has a x86_64 architecture. So I should leave virtual environment, and install it in the normal system. Which package, from the SynoCommunity for borg and borgmatic, I should install?

Bernd

@hgy59
Copy link
Contributor

hgy59 commented Apr 4, 2024

@barnybla ok, you already opened issue #6045, so you were on the right way.

You can add the synocommunity repository to the DSM Package Center (see https://synocommunity.com/) and then install the borg package v1.2.6-14 found in "Community" Packages.

Or you could download the spk file for your model and DSM 7.1 on https://synocommunity.com/package/borgbackup
(chose any x64 arch like apollolake, avoton, braswell, ...) and manually install it in the Package Center.

Lets continue this discussion in #6045.

@SynoCommunity SynoCommunity locked and limited conversation to collaborators Apr 4, 2024
@hgy59 hgy59 closed this as completed Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants