Skip to content

Release 32.1.1 fails at enableCrossCompilation on Debian with qemu-user-static installed #16

Description

@migrym

Building a hello world application fails on Debian 13 (with podman, podman-docker, and qemu-user-static installed):

/home/jpm/tmp/c/helloworld/ADF was regenerated successfully
/home/jpm/tmp/c/helloworld/Dockerfile was regenerated successfully
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: short-name "multiarch/qemu-user-static" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"
Error while building 'armv7l': failed to setup cross-compilation: exit status 125

Commenting the call to enableCrossCompilation in internal/builder/builder.go works around this issue:

diff --git a/internal/builder/builder.go b/internal/builder/builder.go
--- a/internal/builder/builder.go
+++ b/internal/builder/builder.go
@@ -41,9 +41,9 @@ func BuildRootFS(appDir, tmpBuildPath string, settings configuration.Architectur
                return fmt.Errorf("failed to create dist directory: %v", err)
        }

-       if err := enableCrossCompilation(buildSettings.CrossCompile); err != nil {
-               return err
-       }
+       //if err := enableCrossCompilation(buildSettings.CrossCompile); err != nil {
+       //      return err
+       //}

        args, err := prepareDockerBuildArgs(settings.Platform, buildSettings.Options, appDir, tmpBuildPath)
        if err != nil {

Being able to control if enableCrossCompilation gets called would fix the issue. Having e.g. a --no-cross-compilation option would allow users to keep the current behavior as default but disable the call on demand.

Activity

  1. added this to the v33.0.0 release milestone on May 11, 2026
  2. mptrk commented on May 11, 2026

    @mptrk
    Collaborator

    If enableCrossCompliation is disabled, the container image produced is amd64, right?

  3. migrym commented on May 11, 2026

    @migrym
    ContributorAuthor

    There are use cases where an image needs to be created but no compilation is required. In such cases there is no need to cross-compile since everything is already built. For example a base image or tar provides the basic application and any extra dependencies can be added from alpine packages.

    Additionally, it seems no command line option is required if the yaml setting build.crossCompile.enabled is meant for that purpose. The setting is currently unused.

  4. tsopokis commented on Sep 8, 2026

    @tsopokis
    Collaborator

    #44 You face this issue when building aarch64 under Apple Silicon, which is already linux/armv8.

  5. linked a pull request that will close this issuefix cross compilation issue #44on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions