Skip to content

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

@migrym

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions