I had a super annoying weekend getting Vivado running on a new build system. Here's some lessons I learned that aren't likely to make it into user manual.

Get Vivado running before messing with nix. The Vivado install tools (both command line and Java-based) have annoyingly rigid dependencies on particular versions of Linux OS. For example, v2020.2 supports the follows Ubuntu variants:

Ubuntu Linux 16.04.5 LTS;16.04.6 LTS; 18.04.1 LTS; 18.04.2 LTS, 18.04.3 LTS; 18.04.4 LTS; and 20.04 LTS (64-bit)

but v2020.1 only supports the following variants:

Ubuntu Linux 16.04.5, 16.04.6, 18.04.1, 18.04.2, 18.04.3, and 18.04.4 LTS (64-bit)

Currently, M-Labs's nix build system relies on v2020.1 which means you ought not attempt to use 20.04 LTS.

Just because Vivado support 18.04.4 LTS does not mean it supports 18.04.5 LTS. You'd think it would trivial to get 18.04.5 to work but it's not. Command line install and the several well-intentioned Xilinx support threads didn't help me.

They Vivado is most conveniently obtained by downloading the All OS single-file installer. https://www.xilinx.com/support/download.html


Here's an example of what the installer failure looked like on my 18.04.5 LTS build. It worked fine on 18.04.4 LTS.

$ nix-shell -I artiqSrc=~/github/m-labs/artiq ~/git-mlabs/m-labs/nix-scripts/artiq-fast/shell-dev.nix

$ sudo ./Xilinx_Unified_2020.1_0602_1208_Lin64.bin 
[sudo] password for britton: 
Verifying archive integrity... All good.
Uncompressing Xilinx Installer...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Exception in thread "SPLASH_LOAD_MESSAGE" java.lang.IllegalStateException: no splash screen available
	at java.desktop/java.awt.SplashScreen.checkVisible(Unknown Source)
	at java.desktop/java.awt.SplashScreen.getBounds(Unknown Source)
	at java.desktop/java.awt.SplashScreen.getSize(Unknown Source)
	at com.xilinx.installer.gui.H.run(Unknown Source)

Exception in thread "main" java.lang.IllegalStateException: no splash screen available
	at java.desktop/java.awt.SplashScreen.checkVisible(Unknown Source)
	at java.desktop/java.awt.SplashScreen.close(Unknown Source)
	at com.xilinx.installer.gui.G.b(Unknown Source)
	at com.xilinx.installer.gui.InstallerGUI.G(Unknown Source)
	at com.xilinx.installer.gui.InstallerGUI.e(Unknown Source)
	at com.xilinx.installer.api.InstallerLauncher.main(Unknown Source)

---- HANGS ---

We're installing Vivado on NixOS directly, which isn't supported by Xilinx but works nevertheless. You can use buildFHSUserEnv to simulate a traditional distro (AFAIK also works on non-NixOS Nix with reproducibility benefits); an alternative approach is to use patchelf.

This GUI installer bug can be worked around by running the installation in command line like this:
https://forum.m-labs.hk/d/75-configuring-a-custom-kalsi-crate/5
And the Xilinx installer does not really need sudo, it just needs to write to the destination directory.

2 years later

For anyone reading this again: The ARTIQ-7+ development shell (nix develop) now provides a vivado-env command that spawns another shell containing all the dependencies for the Vivado installer to work, on any distro.

    2 years later