Skip to content

setup mxbuild ignores host OS: downloads Linux build on Windows (Exec format error) #608

@ako

Description

@ako

Summary

mxcli setup mxbuild chooses the download artifact from runtime.GOARCH only and ignores runtime.GOOS:

  • cmd/mxcli/setup.go:76docker.MxBuildCDNURL(versionStr, runtime.GOARCH)
  • cmd/mxcli/docker/download.go:32-39MxBuildCDNURL() switches on arch (arm64/amd64), never on OS.

On Windows this fetches the Linux mxbuild (.tar.gz / self-contained Linux binary), which then fails with Exec format error when dotnet tries to run it.

By contrast the sibling command setup mxcli exposes --os / --arch flags (cmd/mxcli/setup.go ~line 292). setup mxbuild has neither.

Workaround

On Windows, skip auto-setup and use the native mxbuild from the Studio Pro install:

"C:\Program Files\Mendix\11.10.0\modeler\mx.exe" check project.mpr

Proposed fix

  • Add --os / --arch flags to setup mxbuild (parity with setup mxcli), and/or detect Windows.
  • Confirm whether Mendix publishes a Windows mxbuild artifact. If only Linux is published (for Docker), then on Windows emit a clear, actionable message (point at Studio Pro's bundled mx.exe) instead of silently downloading a Linux binary that can't run.

Reported via external user feedback.

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions