Troubleshooting:dependencies

Here's a step-by-step guide to resolving  errors coming from , as well as   errors coming from.

Why does this happen?
The errors indicate that there is an issue with the binary package repositories either of postmarketOS or of Alpine Linux. pmOS Edge is built upon Alpine's "edge" repository (as in bleeding edge), so a certain amount of breakage is expected.

In most cases a library (e.g.  from libressl/openssl) has been updated with an incompatible change (soname bump), and a package that was built against the previous version did not get rebuilt yet.

Triggering rebuilds is done by both Alpine and pmOS by increasing the  in the.

Alpine Linux
The package maintainers from Alpine trigger a rebuild for all packages that depend on a certain library at the same time as they update that library. But building packages takes time, and when a big number of packages depend on such a library, build bots may even get stuck at a package that used to compile fine a few months ago, but doesn't compile in the current environment (let's say because they don't build with the latest GCC version that Alpine has packaged).

There is a dedicated build bot for each architecture and branch combination (e.g. ), and once it is stuck, it won't continue with compiling other packages in the queue. If you have some time to spare, you could actually help out with getting these packages to compile again by finding out which one is failing on build.alpinelinux.org (click the packages to see the build logs) and assisting Alpine developers in #alpine-devel. However, the quick workaround is rebuilding just the packages you need, as explained below.

postmarketOS
For postmarketOS packages, we need to trigger the rebuild manually, as soon as a library gets updated in Alpine on which one of our packages depend. We have a test case in place, that detects such breakage and we fix it in  and our binary repository as soon as we see it, typically within a day.

Update your package index
Maybe the issue has already been resolved in the package repositories of postmarketOS or Alpine. will automatically download the newest package indexes when they are older than four hours. Force it to download the currrent index files with:

From inside the postmarketOS installation, you can do the same with:

apk
All packages are mentioned that depend on the shared library. Find the package that depends on the lower version of it. In the example below, this is  (the higher version would be  ). This means the package that needs to be rebuilt is.

ERROR: unsatisfiable constraints: libstdc++-6.4.0-r6: breaks: g++-armhf-6.4.0-r5[libstdc++=6.4.0-r5] satisfies: world[libstdc++] g++-6.4.0-r6[libstdc++=6.4.0-r6] g++-6.4.0-r6[libstdc++=6.4.0-r6] gcc-6.4.0-r6[so:libstdc++.so.6] lzip-1.19-r1[so:libstdc++.so.6] gcc-6.4.0-r6: breaks: g++-armhf-6.4.0-r5[gcc=6.4.0-r5] satisfies: world[gcc] g++-6.4.0-r6[gcc=6.4.0-r6] build-base-0.5-r0[gcc]

pmbootstrap
Here the package depending on the dependency that was not found is not mentioned: [21:38:23] ERROR: Could not find dependency 'so:libcrypto.so.42' in any aports folder or APKINDEX. See:  [21:38:23] Run 'pmbootstrap log' for details. [21:38:23] See also: 

In order to see it, run your last  command again, but with verbose mode. For example:

After it crashed at the same point, check  for a line like the following (on the right should be the library you are interested in). The "????" is the package we are looking for. If you're having a hard time looking through the whole log, you can use  to clear it.

????: depends on: so:libcrypto.so.42

Find out where the package comes from
We need to know if the package comes from postmarketOS or Alpine Linux. Change to your  folder, and search for the package:

If you can find it, the package comes from postmarketOS. Otherwise from Alpine.

postmarketOS
It might be, that we marked the package for rebuild already, so pull the latest changes from the master branch (or rebase if you are on your own branch):

Then try again. If the problem persists, mark all postmarketOS packages with broken dependencies for rebuild:

When you execute the command that caused the error next time, the package should get built locally and the problem should be gone.

Cross compilers
This is a special case, because we generate the cross compilers directly from Alpine: If the error has  and   involved, regenerate your   aport based on the latest   aport from Alpine (replace armhf with aarch64 etc. as necessary):

Alpine Linux
Clone Alpine's packages to a folder outside of your  folder:

Find the package in question:

Build it with  for the architecture in question (replace the path to   accordigly):

= See also =
 * nokia-n900: pmbootstrap install fails for libcrypto.so.42
 * Dependency conflict blocks generation of hammerhead image