Giter VIP home page Giter VIP logo

Comments (7)

morpheus65535 avatar morpheus65535 commented on May 18, 2024

Hi Mario,

First, thank you to give a try to bazarr!

pygit2 is failing to install because you don't have libgit2 install on osmc. You probably gonna need to build it from source.

Be advise that you are using the version 0.26.x of pygit2 witch is good. You need the same version of libgit2 so it could work fine.

https://libgit2.github.com/docs/guides/build-and-link/

If you take a look at dockerfile, you going to see witch package need to be installer:
apt-get install -y build-essential python-dev python-pip python-setuptools libjpeg-dev zlib1g-dev git libgit2-dev libffi-dev
Be aware that the libgit2 package is only available on Debian since version 10 Buster. Like I said, building from source is probably what you're gonna have to do.

Try this and come back to give me some feeback!

from bazarr.

mariocosme avatar mariocosme commented on May 18, 2024

Thanks for the quick reply. I installed all those packages (including libgit2-dev) without any issues. When I now run the pip install -r requirements.txt is does exit with a different error but it is still unable to install pygit2 successfully.

Here is the trace log (too big for the ssh terminal so I just paste the end):

    In file included from __pycache__/_cffi__x554e6eaax4850a773.c:3:0:
    __pycache__/_cffi__x554e6eaax4850a773.c:9673:21: error: invalid use of undefined type 'struct git_stash_apply_options'
         offsetof(struct git_stash_apply_options, progress_cb),
                         ^
    __pycache__/_cffi__x554e6eaax4850a773.c:9673:21: error: initializer element is not constant
    __pycache__/_cffi__x554e6eaax4850a773.c:9673:21: error: (near initialization for 'nums[8]')
    __pycache__/_cffi__x554e6eaax4850a773.c:9674:49: error: dereferencing pointer to incomplete type
         sizeof(((struct git_stash_apply_options *)0)->progress_cb),
                                                     ^
    __pycache__/_cffi__x554e6eaax4850a773.c:9674:49: error: request for member 'progress_cb' in something not a structure or union
    __pycache__/_cffi__x554e6eaax4850a773.c:9674:21: error: initializer element is not constant
         sizeof(((struct git_stash_apply_options *)0)->progress_cb),
                         ^
    __pycache__/_cffi__x554e6eaax4850a773.c:9674:21: error: (near initialization for 'nums[9]')
    In file included from __pycache__/_cffi__x554e6eaax4850a773.c:3:0:
    __pycache__/_cffi__x554e6eaax4850a773.c:9675:21: error: invalid use of undefined type 'struct git_stash_apply_options'
         offsetof(struct git_stash_apply_options, progress_payload),
                         ^
    __pycache__/_cffi__x554e6eaax4850a773.c:9675:21: error: initializer element is not constant
    __pycache__/_cffi__x554e6eaax4850a773.c:9675:21: error: (near initialization for 'nums[10]')
    __pycache__/_cffi__x554e6eaax4850a773.c:9676:49: error: dereferencing pointer to incomplete type
         sizeof(((struct git_stash_apply_options *)0)->progress_payload),
                                                     ^
    __pycache__/_cffi__x554e6eaax4850a773.c:9676:49: error: request for member 'progress_payload' in something not a structure or union
    __pycache__/_cffi__x554e6eaax4850a773.c:9676:21: error: initializer element is not constant
         sizeof(((struct git_stash_apply_options *)0)->progress_payload),
                         ^
    __pycache__/_cffi__x554e6eaax4850a773.c:9676:21: error: (near initialization for 'nums[11]')
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-SGUEA8/pygit2/setup.py", line 61, in <module>
        ffi.verify(preamble, **C_KEYWORDS)
      File "/usr/lib/python2.7/dist-packages/cffi/api.py", line 340, in verify
        lib = self.verifier.load_library()
      File "/usr/lib/python2.7/dist-packages/cffi/verifier.py", line 74, in load_library
        self._compile_module()
      File "/usr/lib/python2.7/dist-packages/cffi/verifier.py", line 139, in _compile_module
        outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
      File "/usr/lib/python2.7/dist-packages/cffi/ffiplatform.py", line 25, in compile
        outputfilename = _build(tmpdir, ext)
      File "/usr/lib/python2.7/dist-packages/cffi/ffiplatform.py", line 51, in _build
        raise VerificationError('%s: %s' % (e.__class__.__name__, e))
    cffi.ffiplatform.VerificationError: CompileError: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-SGUEA8/pygit2/

from bazarr.

morpheus65535 avatar morpheus65535 commented on May 18, 2024

What is the version of libgit2 you've installed? If you've install it with apt, you can get the version using this command:
dpkg -s libgit2-dev

from bazarr.

mariocosme avatar mariocosme commented on May 18, 2024
osmc@osmc:~$  dpkg -s libgit2-dev
Package: libgit2-dev
Status: install ok installed
Priority: extra
Section: libdevel
Installed-Size: 1649
Maintainer: Russell Sim <[email protected]>
Architecture: armhf
Multi-Arch: same
Source: libgit2
Version: 0.21.1-3
Depends: libgit2-21 (= 0.21.1-3), libz-dev, libssl-dev
Description: low-level Git library (development files)
 libgit2 is a portable, pure C implementation of the Git
 distributed version control system core methods provided as a
 re-entrant link-able library with a solid API.
 .
 This package contains the development files for libgit2.
Homepage: http://libgit2.github.com/

from bazarr.

morpheus65535 avatar morpheus65535 commented on May 18, 2024

You’ve installed an incompatible version of libgit2. It’s too old.

You need to build it from source, as mentionned before.

You absolutely need the 0.26.x version of libgit2.

from bazarr.

mariocosme avatar mariocosme commented on May 18, 2024

Okay. Built and installed libgit2 from source as build instructions

Still getting an error when installing bazarr dependencies:

osmc@osmc:~/Downloads/libgit2-0.26.0/build$ sudo cmake --build . --target instal                                                              l
[ 21%] Built target git2
[100%] Built target libgit2_clar
Install the project...
-- Install configuration: "Debug"
-- Installing: /usr/local/lib/libgit2.so.0.26.0
-- Installing: /usr/local/lib/libgit2.so.26
-- Installing: /usr/local/lib/libgit2.so
-- Installing: /usr/local/lib/pkgconfig/libgit2.pc
-- Installing: /usr/local/include/git2
-- Installing: /usr/local/include/git2/buffer.h
-- Installing: /usr/local/include/git2/commit.h
-- Installing: /usr/local/include/git2/odb_backend.h
-- Installing: /usr/local/include/git2/trace.h
-- Installing: /usr/local/include/git2/repository.h
-- Installing: /usr/local/include/git2/tag.h
-- Installing: /usr/local/include/git2/reflog.h
-- Installing: /usr/local/include/git2/cherrypick.h
-- Installing: /usr/local/include/git2/merge.h
-- Installing: /usr/local/include/git2/transport.h
-- Installing: /usr/local/include/git2/errors.h
-- Installing: /usr/local/include/git2/filter.h
-- Installing: /usr/local/include/git2/blob.h
-- Installing: /usr/local/include/git2/net.h
-- Installing: /usr/local/include/git2/tree.h
-- Installing: /usr/local/include/git2/types.h
-- Installing: /usr/local/include/git2/annotated_commit.h
-- Installing: /usr/local/include/git2/pathspec.h
-- Installing: /usr/local/include/git2/clone.h
-- Installing: /usr/local/include/git2/odb.h
-- Installing: /usr/local/include/git2/status.h
-- Installing: /usr/local/include/git2/cred_helpers.h
-- Installing: /usr/local/include/git2/indexer.h
-- Installing: /usr/local/include/git2/config.h
-- Installing: /usr/local/include/git2/strarray.h
-- Installing: /usr/local/include/git2/submodule.h
-- Installing: /usr/local/include/git2/sys
-- Installing: /usr/local/include/git2/sys/commit.h
-- Installing: /usr/local/include/git2/sys/odb_backend.h
-- Installing: /usr/local/include/git2/sys/openssl.h
-- Installing: /usr/local/include/git2/sys/repository.h
-- Installing: /usr/local/include/git2/sys/hashsig.h
-- Installing: /usr/local/include/git2/sys/reflog.h
-- Installing: /usr/local/include/git2/sys/merge.h
-- Installing: /usr/local/include/git2/sys/transport.h
-- Installing: /usr/local/include/git2/sys/filter.h
-- Installing: /usr/local/include/git2/sys/refdb_backend.h
-- Installing: /usr/local/include/git2/sys/config.h
-- Installing: /usr/local/include/git2/sys/remote.h
-- Installing: /usr/local/include/git2/sys/index.h
-- Installing: /usr/local/include/git2/sys/diff.h
-- Installing: /usr/local/include/git2/sys/stream.h
-- Installing: /usr/local/include/git2/sys/time.h
-- Installing: /usr/local/include/git2/sys/mempack.h
-- Installing: /usr/local/include/git2/sys/refs.h
-- Installing: /usr/local/include/git2/remote.h
-- Installing: /usr/local/include/git2/ignore.h
-- Installing: /usr/local/include/git2/global.h
-- Installing: /usr/local/include/git2/patch.h
-- Installing: /usr/local/include/git2/index.h
-- Installing: /usr/local/include/git2/stash.h
-- Installing: /usr/local/include/git2/diff.h
-- Installing: /usr/local/include/git2/message.h
-- Installing: /usr/local/include/git2/common.h
-- Installing: /usr/local/include/git2/object.h
-- Installing: /usr/local/include/git2/oid.h
-- Installing: /usr/local/include/git2/proxy.h
-- Installing: /usr/local/include/git2/checkout.h
-- Installing: /usr/local/include/git2/inttypes.h
-- Installing: /usr/local/include/git2/describe.h
-- Installing: /usr/local/include/git2/reset.h
-- Installing: /usr/local/include/git2/oidarray.h
-- Installing: /usr/local/include/git2/pack.h
-- Installing: /usr/local/include/git2/stdint.h
-- Installing: /usr/local/include/git2/revert.h
-- Installing: /usr/local/include/git2/revparse.h
-- Installing: /usr/local/include/git2/revwalk.h
-- Installing: /usr/local/include/git2/version.h
-- Installing: /usr/local/include/git2/notes.h
-- Installing: /usr/local/include/git2/graph.h
-- Installing: /usr/local/include/git2/refspec.h
-- Installing: /usr/local/include/git2/rebase.h
-- Installing: /usr/local/include/git2/signature.h
-- Installing: /usr/local/include/git2/worktree.h
-- Installing: /usr/local/include/git2/blame.h
-- Installing: /usr/local/include/git2/refs.h
-- Installing: /usr/local/include/git2/attr.h
-- Installing: /usr/local/include/git2/refdb.h
-- Installing: /usr/local/include/git2/transaction.h
-- Installing: /usr/local/include/git2/branch.h
-- Installing: /usr/local/include/git2.h
osmc@osmc:~/Downloads/libgit2-0.26.0/build$ cd ../../bazarr/
osmc@osmc:~/Downloads/bazarr$ sudo pip install -r requirements.txt
Requirement already satisfied: apscheduler in /usr/local/lib/python2.7/dist-pack                                                              ages (from -r requirements.txt (line 1))
Requirement already satisfied: babelfish in /usr/local/lib/python2.7/dist-packag                                                              es (from -r requirements.txt (line 2))
Requirement already satisfied: bottle in /usr/local/lib/python2.7/dist-packages                                                               (from -r requirements.txt (line 3))
Requirement already satisfied: bottle-fdsend in /usr/local/lib/python2.7/dist-pa                                                              ckages (from -r requirements.txt (line 4))
Requirement already satisfied: dogpile.cache in /usr/local/lib/python2.7/dist-pa                                                              ckages (from -r requirements.txt (line 5))
Requirement already satisfied: enzyme in /usr/local/lib/python2.7/dist-packages                                                               (from -r requirements.txt (line 6))
Requirement already satisfied: Pillow in /usr/lib/python2.7/dist-packages (from                                                               -r requirements.txt (line 7))
Requirement already satisfied: py-pretty in /usr/local/lib/python2.7/dist-packag                                                              es (from -r requirements.txt (line 8))
Requirement already satisfied: pycountry in /usr/local/lib/python2.7/dist-packag                                                              es (from -r requirements.txt (line 9))
Collecting pygit2 (from -r requirements.txt (line 10))
  Using cached pygit2-0.26.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-WqTYaL/pygit2/setup.py", line 61, in <module>
        ffi.verify(preamble, **C_KEYWORDS)
      File "/usr/lib/python2.7/dist-packages/cffi/api.py", line 340, in verify
        lib = self.verifier.load_library()
      File "/usr/lib/python2.7/dist-packages/cffi/verifier.py", line 75, in load_library
        return self._load_library()
      File "/usr/lib/python2.7/dist-packages/cffi/verifier.py", line 151, in _load_library
        return self._vengine.load_library()
      File "/usr/lib/python2.7/dist-packages/cffi/vengine_cpy.py", line 149, in load_library
        raise ffiplatform.VerificationError(error)
    cffi.ffiplatform.VerificationError: importing '/tmp/pip-build-WqTYaL/pygit2/__pycache__/_cffi__x554e6eaax4850a773.arm-linux-gnueabihf.so': libgit2.so.26: cannot open shared object file: No such file or directory

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-WqTYaL/pygit2/

from bazarr.

morpheus65535 avatar morpheus65535 commented on May 18, 2024

It’s more a pygit2 vs libgit2 problem. I think you’re going to need some help from the developers of those software. :-/

from bazarr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.