#1583·cross

Darwin+Podman: Unable to cross-compile

Author: skittishdevCreated Nov 1, 2024Updated Aug 5, 2026

Checklist

Describe your issue

cross doesn't work when I try to use it with podman (even if I set the CROSS_CONTAINER_ENGINE=podman env variable) on my Mac/M2. But the same project cross compiles successfully with docker.

What target(s) are you cross-compiling for?

aarch64-unknown-linux-gnu

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.5 (4090bec 2024-10-15)

Example

I have both docker and podman installed on my Mac. My Docker Desktop application is not running.

bash
ps -ef | grep docker
  503 68715 69102   0  5:05PM ttys007    0:00.00 grep docker
bash
podman machine init --cpus=8 --disk-size=64 --memory=24576 foo
podman machine start foo
CROSS_CONTAINER_ENGINE=podman cross build --target aarch64-unknown-linux-gnu --release

This results in an error like so:

Error: 
   0: /proc/self/mountinfo is unavailable when target_os != linux

Location:
   src/docker/shared.rs:1354

Additional information / notes

Cross works just fine with Docker. The command below results in a successful build when my Docker Desktop application is running in the background.

bash
cross build --target aarch64-unknown-linux-gnu --release

I installed cross as specified in the docs: https://github.com/cross-rs/cross/blob/main/docs/getting-started.md#installing-cross-1