# Troubleshooting melange Builds

URL: https://edu.chainguard.dev/open-source/build-tools/melange/troubleshooting.md
Last Modified: August 10, 2022
Tags: melange, Troubleshooting

Debugging and common errors with melange build

 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.
... pipeline: - name: Build Minicli application runs: | set -x APP_HOME=&#34;${{targets.destdir}}/usr/share/hello-minicli&#34; ... Common Errors When melange is unable to finish a build successfully, you will get an error similar to this:
Error: failed to build package: unable to run pipeline: exit status 127 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&rsquo;t happen for Docker Desktop users, since the additional architectures are automatically enabled upon installation.
To enable additional architectures, you&rsquo;ll need to enable them within your kernel with the following command:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yesAn alternate approach to achieve the same result is to run the following command:
docker run --privileged --rm tonistiigi/binfmt --install all Missing build-time dependencies You may get errors from missing build-time dependences such as busybox. In this case you may get &ldquo;No such file or directory&rdquo; errors when enabling debug with set -x. To fix this, you&rsquo;ll need to locate which package has the commands that your build needs, and add it to the list of your build-time dependencies.
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.

