2

After I tried to install gstreamer1.0-rockchip1 and get:

The following packages have unmet dependencies:
 gstreamer1.0-rockchip1 : Depends: librockchip-mpp1 but it is not installable
E: Unable to correct problems, you have held broken packages.

I cloned, compiled and and installed the repository mpp with make and sudo make install. Now I have the needed libraries in /usr/local/lib:

lrwxrwxrwx 1 root root       20 Aug  7 10:43 librockchip_vpu.so -> librockchip_vpu.so.1
lrwxrwxrwx 1 root root       20 Aug  7 10:43 librockchip_vpu.so.1 -> librockchip_vpu.so.0
lrwxrwxrwx 1 root root       20 Aug  7 10:43 librockchip_mpp.so -> librockchip_mpp.so.1
lrwxrwxrwx 1 root root       20 Aug  7 10:43 librockchip_mpp.so.1 -> librockchip_mpp.so.0
drwxr-xr-x 2 root root     4096 Aug  7 10:43 pkgconfig
-rw-r--r-- 1 root root    78944 Aug  7 10:20 librockchip_vpu.so.0
-rw-r--r-- 1 root root  1978352 Aug  7 10:20 librockchip_mpp.so.0
drwxrwsr-x 3 root staff    4096 Aug  7 09:01 ocaml
drwxrwsr-x 4 root staff    4096 Aug  7 08:58 python2.7
drwxrwsr-x 3 root staff    4096 Mar 11 02:17 python3.8

However, I still getting the same initial error. Is there a way to link the library?

My system:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:    20.04
Codename:   focal
Miguel
  • 132

2 Answers2

4

gstreamer1.0-rockchip1 doesn't depend on a file called /usr/local/lib/librockchip_mpp.so.1, it depends on a package called librockchip-mpp1 which may provide /usr/lib/x86_64-linux-gnu/librockchip_mpp.so.1.

Neither of these packages are available in focal repositories.

Normally, when an auxiliary repository (such as a PPA) provides a package, they should also provide any dependencies that aren't in the official repository. It looks like your repo didn't do this. It's also possible that you built gstreamer-rockchip-1 from scratch yourself.

I tend to avoid diving into dependency hell and so I'd use an alternative, but if you want to go down the rabbit hole here's what you should do:

  1. Look for a repository/PPA that supplies gstreamer1.0-rockchip1 along with its dependencies, or
  2. Package the dependencies yourself.

A search showed me two github repos of interest. I don't know if this is where you got your package, or if these are the best forks of the packages, or if they work with each other, or if they contain any malicious code. I'll let you decide all of that.

The first is a project which provides gstreamer-rockchip-1. It looks like you already have a repository or *.deb from this project. I took a look at the debain/copyright file and it doesn't point to any upstream projects.

I can see from debian/control that this package will depend on librockchip-mpp:

Build-Depends: debhelper (>= 9), autotools-dev,
 librockchip-mpp-dev (>= 1.4.0), libx11-dev, libdrm-dev,
 libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev

The only dependency here that isn't available in focal is librockchip-mpp1.

Another search led me to a repository that provides librockchip-mpp{1,-dev} (or at least a package with that name). This repository also provides the rules to package this package for debain-based distros, so this shouldn't be too tough. This one also has a debian/copyright that points to itself, so it seems a little more legitimate.

When I look at its dependencies, it only has debhelper, cmake as its build dependencies. It looks like we don't need to go deeper.

To build/install this package:

  1. Choose a tag, and download its tar.gz. Then:
$ tar -xzf release_20171218.tar.gz
$ ln -s mpp-release_20171218.tar.gz mpp_1.4.0.orig.tar.gz
$ cd mpp-release_20171218
$ dpkg-buildpackage -uc -us
$ sudo dpkg -i ../librockchip-mpp1_1.4.0-1_amd64.deb

Then you can continue the installation of gstreamer1.0-rockchip1.

Note, when I tried to compile this, I had some CMake configuration errors. Specifically:

Could not find toolchain file: /etc/dpkg-cross/cmake/CMakeCross.txt

This is as far as I'm willing to pursue this thing.

Stewart
  • 13,677
  • Wow, thanks a lot for this explanation! Apart from answering the question, it also adds very good related/how-to info. Thanks! – Miguel Aug 07 '22 at 12:31
  • sorry. I'm getting the following error dpkg-source: error: cannot fstat file ./mpp_1.4.0.orig.tar.gz: No such file or directory when building with dpkg-buildpackage -uc -us – Miguel Aug 07 '22 at 12:57
  • That means you missed the ln step in my instructions. You need to move, link, or copy the original tarball to mpp_1.4.0.orig.tar.gz. dpkg-buildpackage will verify that the files you extracted match what is in that tarball. – Stewart Aug 08 '22 at 05:43
0

You can use equivs (as in this answer) to create a phony package which satisfies the dependency. This is an alternative to actually packaging the library, which essentially tells the system "I took care of it, just believe me."

hobbs
  • 898
  • 6
  • 11