Skip to content

Instantly share code, notes, and snippets.

@sohnryang
Last active February 6, 2025 22:49
Show Gist options
  • Save sohnryang/ca5d2512f7c6e0bab87843dbf1a3708f to your computer and use it in GitHub Desktop.
Save sohnryang/ca5d2512f7c6e0bab87843dbf1a3708f to your computer and use it in GitHub Desktop.
Vivado on ARM64 Mac using Rosetta 2

Running Vivado on ARM64 Mac using Rosetta 2

macOS Ventura supports running x86-64 binaries on Linux VMs. However, even with Rosetta installing Vivado is not a simple one-click process. This guide covers some workarounds and tricks to get Vivado up and running on ARM64 Mac.

  1. Make sure you're running macOS Ventura or higher.
  2. Install UTM and create a Debian VM with Rosetta according to their guide.
    • Other distributions should also work, but commands will be different.
  3. Install x86-64 version of java and libtinfo. Vivado depends on them.
$ sudo apt install default-jdk:amd64 libtinfo5:amd64
  1. Download a copy of self-extracting web installer from Xilinx website.
  2. Run the installer with --confirm flag.
$ /path/to/vivado/installer --confirm
  1. The installer will print something like About to extract 40 KB in /tmp/selfgzXXXX ... Proceed ?. Check the path /tmp/selfgzXXXX, and proceed.
  2. After extracting, the installer will ask about running ./xsetup. Before pressing y, open /tmp/selfgzXXXX/xsetup in your editor and delete architecture checking code which looks like this:
# ERROR out if this installation is running on 32 bit OS 
# and does not support 32 bit installation 
if [ "$(uname -m)" != "x86_64" ]; then
    ...
fi
  1. Save the file and press y in the installer. Continue with installation as usual.
  2. Patch the loader. Open /path/to/xilinx/Vivado/2022.2/bin/loader in your editor, where /path/to/xilinx is the path to Xilinx software suite installation. Remove architecture checking code as you did on step 6.
@elipsitz
Copy link

@Qyt0109: I was able to get this working with only minor adjustments: https://github.com/ichi4096/vivado-on-silicon-mac — perhaps there’s something different about how Docker creates the VM.

@dsheffie
Copy link

I'm experiencing this problem installing Vivado 2023.3 on Debian 12.5, with macOS 14.4.1

assertion failed [rem_idx != -1]: Unable to find existing allocation for shared memory segment to unmap
(VMAllocationTracker.cpp:745 remove_shared_mem)
 ./xsetup: line 106:  2530 Trace/breakpoint trap   ${X_JAVA_HOME}/bin/java ${ARGS} -cp ${X_CLASS_PATH} -splash:${root}/data/images/splash.png com.xilinx.installer.api.InstallerLauncher
The program './xsetup' returned an error code (133)

Has anyone else gotten it to work on macOS 14.4.1?

If I SSH into my VM and forward X, it works just fine. If I use the UTM window it crashes with the same error you listed. Why? I have no idea, computers are strange :)

@ichi4096
Copy link

ichi4096 commented Aug 2, 2024

The macOS 15 beta seems to address Rosetta emulation issues, as I have not encountered these VMAllocationTracker errors anymore since updating to it. Accordingly, I have updated my scripts to include support for the newest Vivado version.

@Qyt0109: I was able to get this working with only minor adjustments: https://github.com/ichi4096/vivado-on-silicon-mac — perhaps there’s something different about how Docker creates the VM.

Docker, like UTM, runs an arm64 Linux kernel, but the entire userspace binaries in Docker are amd64, as well as an adjustment to make uname output the x86_64 architecture even though that is not what the kernel is running as.

@AlexanderProd
Copy link

AlexanderProd commented Nov 15, 2024

This is how you can install libtinfo5 on Ubuntu https://askubuntu.com/a/1531766/1556908

And you have to install libcrypt1 like this: sudo apt install libcrypt1:amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment