Troubleshooting melange Builds

Debugging and common errors

By Erika Heidi

Debug Options

To include debug-level information on melange builds, edit your melange.yaml file and include set -x in your pipeline. You can add this flag at any point of your pipeline commands to further debug a specific section of your build.

  - name: Build Minicli application
    runs: |
      set -x

Common Errors

When melange is unable to finish a build successfully, you will get an error similar to this:

The build could not be completed due to an error at some point of your pipeline. Enable debug by including set -x at the beginning of your build pipeline so that you can nail down where the issue occurs.

Missing QEMU user-space emulation packages

Linux users using the Docker melange image may get errors when building packages for other architectures than x86 and x86_64. This won’t happen for Docker Desktop users, since the additional architectures are automatically enabled upon installation.

To enable additional architectures, you’ll need to enable them within your kernel with the following command:

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Further Resources

For additional guidance, please refer to the melange repository on GitHub, where you can find more examples or open an issue in case of problems.