rr icon indicating copy to clipboard operation
rr copied to clipboard

Running on a Mac

Open vjpr opened this issue 3 years ago • 4 comments

The readme says:

rr currently requires either...Certain AArch64 microarchitectures (e.g. ARM Neoverse N1 or the Apple Silicon M-series)

It's not clear if there is a way to run on Apple hardware.

It would be great to clarify this, and to provide instructions on running from macOS. Is virtualization possible and how to setup the virtualization.

Related: https://github.com/rr-debugger/rr/issues/3234

Apple Intel with Windows Bootcamp via WSL 2: https://github.com/rr-debugger/rr/issues/2506

Summary

  • Apple Silicon macOS with Linux VM Guest Virtualization - Nope
  • Apple Silicon Bare Metal (via Asahi Linux dist) - Yep
  • Apple Silicon Bootcamp - Nope - Bootcamp on Silicon not possible
  • Apple Intel macOS with Linux VM Guest Virtualization - Only before Big Sur See: https://github.com/rr-debugger/rr/issues/2897
  • Apple Intel Bare Metal (any dist) - Should work
  • Apple Intel Bootcamp Windows (WSL 2) - Nope

vjpr avatar Jul 16 '22 11:07 vjpr

It would be great to clarify this, and to provide instructions on running from macOS. Is virtualization possible and how to setup the virtualization.

There's no macOS or much of virtualization involved. It requires linux running on bare metal apple silicon.

We can probably add a link to the Asahi Linux wiki or front page. I don't think any more detailed instruction can/should be included since while it (asahi linux) is already very usable for end users, many details are still in flux and we should not host a potentially out-of-date document of another project.

yuyichao avatar Jul 16 '22 11:07 yuyichao

Does it work on Apple Intel via virtualization?

EDIT: Seems not https://github.com/rr-debugger/rr/issues/2897#issuecomment-893349129

And should it work on Intel Bootcamp with WSL 2?

vjpr avatar Jul 16 '22 11:07 vjpr

While those are Mac related questions, they are not related to apple silicon and I do not know the answers.

yuyichao avatar Jul 16 '22 12:07 yuyichao

Apple hardware is fine, Apple software is not. You'll need to be running Linux on the bare metal or a pre-Big Sur MacOS with a Linux VMWare guest and appropriate VMWare configuration. I don't think anyone has tried Bootcamp and WSL, WSL hasn't worked until quite recently.

khuey avatar Jul 16 '22 15:07 khuey

So ... "close as not planned"?

GitMensch avatar Aug 28 '23 09:08 GitMensch

Yes, not planned.

rocallahan avatar Oct 01 '23 06:10 rocallahan

I downloaded rr-5.7.0-Linux-aarch64 and try to run it on ubuntu on mac(M2 chip) qemu with -cpu=host enabled. But it shows:

$ ./rr-5.7.0-Linux-aarch64/bin/rr record ./a.out
[FATAL src/PerfCounters_aarch64.h:134:get_cpuinfo_sysfs()] Failed to read midr register from kernel

baiwfg2 avatar Dec 06 '23 12:12 baiwfg2