Skip to content

Podman Fails on macOS due to SELinux Labels #756

@Alexhuszagh

Description

@Alexhuszagh

Checklist

Describe your issue

Related to containers/podman#13631

This bug has likely been around a long time, and reproduces on any tested cross version. Removing the SELinux labels works. You can create a simple test case with:

podman run -it --rm -v "$PWD"/target:/target:Z ubuntu:20.04 bash

And this will fail with the described error.

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

other (specify in description)

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

latest main build

Example

cargo install cross --git https://github.com/cross-rs/cross
git clone https://github.com/cross-rs/rust-cpp-hello-word
cd rust-cpp-hello-word
cross run --target ... # any target

Which produces an error of error preparing container $(ID) for attach: lsetxattr $(PATH): operation not supported.

Additional information / notes

It seems this is podman specific due to the description below. Basically, on macOS and with Podman, remove the SELinux labels.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions