Skip to content

Instantly share code, notes, and snippets.

@federunco
Last active November 2, 2025 21:53
Show Gist options
  • Select an option

  • Save federunco/f2bde2e25342c6284b68ce4ecf305e5d to your computer and use it in GitHub Desktop.

Select an option

Save federunco/f2bde2e25342c6284b68ce4ecf305e5d to your computer and use it in GitHub Desktop.

Running Quartus + Questa on Apple Silicon

The current methods to run an Intel FPGA workflow on Apple Silicon involve two possibile approaches:

  • Using a WoA Virtual Machine: Performance is terrible (already in amd64 Windows platforms is terrible, adding two virtualization layers on top of it leads to eternal compilation times) + space wasted for all the Microsoft bloatware
  • Using a Docker Container: Performance is better than WoA, but the USB drivers are not working

Running Linux on UTM with Rosetta enabled should tackle these problems

Disclaimer for Baremetal installation

This guide could possibly work also when installing Debian directly on the Mac with Asahi Linux, but it is not recommended for beginners: with the standard installation procedure the Linux Kernel uses a default page size of 16K, and the rosetta binary is not designed to run with this page size. By recompiling the Linux Kernel to use 4K page sizes it should work flawlessly, but expect slower perfomance and/or higher power usage on the overall system. Easier methods exist when using Asahi (especially the Fedora Remix), such as FEX-Emu, but I don't have tested them personally.

Configuring the virtual machine

Enabling persistent Rosetta 2 on Linux Guest

  • Install support for binfmt utils:
sudo apt install binfmt-support
  • Create the directory /opt/rosetta
  • Create a new service file for the Rosetta service on /etc/systemd/system/rosetta.service:
[Unit]
Description=Enable Rosetta 2 Translation Layer

[Service]
Type=oneshot
ExecStart=/bin/sh /opt/rosetta/rosetta_start.sh

[Install]
WantedBy=multi-user.target
  • Enable the Rosetta service on boot:
systemctl enable rosetta.service

Depending on whether you choose using AVF or QEMU, the setup of Rosetta slightly changes:

Apple Virtualization Framework

  • Create the required directory for the Rosetta mount:
sudo mkdir /media/rosetta
  • Create /opt/rosetta/rosetta_start.sh and copy the following script:
#!/bin/sh
sudo mount -t virtiofs rosetta /media/rosetta
sudo /usr/sbin/update-binfmts --install rosetta /media/rosetta/rosetta \
     --magic "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00" \
     --mask "\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \
     --credentials yes --preserve yes --fix-binary yes
  • Reboot the virtual machine

QEMU

  • On your macOS Host, run:
softwareupdate --install-rosetta --agree-to-license
grep RosettaUpdateAuto.pkg /var/log/install.log

From the last command, you should get where the latest install package for Rosetta has been downloaded.

  • cd to a known directory, and extract the install package:
pkgutil --expand-full /Library/Updates/Rosetta/SoftwareUpdate/RosettaUpdateAuto.pkg ./Rosetta
cd ./Rosetta/RosettaUpdateAuto.pkg/Payload/Library/Apple/usr/libexec/oah/RosettaLinux
  • Patch with radare2 the rosetta binary by following this guide
  • Copy the patched rosetta binary with scp to your guest VM in /opt/rosetta/rosetta
  • Create /opt/rosetta/rosetta_start.sh and copy the following script:
#!/bin/sh
sudo /usr/sbin/update-binfmts --install rosetta /opt/rosetta/rosetta \
     --magic "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00" \
     --mask "\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \
     --credentials yes --preserve yes --fix-binary yes
  • Reboot the virtual machine

Installing dependencies

  • Enable multiarch repos
sudo dpkg --add-architecture amd64
  • Install the required libraries for Quartus
sudo apt update
sudo apt install libbz2-1.0:amd64 libglib2.0-0:amd64 libnsl-dev:amd64 libfontconfig:amd64 libx11-xcb1:amd64 libxext6:amd64 libsm6:amd64 libdbus-1-3:amd64 libxft2:amd64 libxtst6:amd64 libxi6:amd64 libgtk2.0-0:amd64 libcrypt1:amd64 libgtk-3-0:amd64

These libraries where tested for Quartus 24.1std, if for other versions Quartus crashes (cli outputs aborted (core dumped)), use strace to debug for missing libraries

Installing and patching Quartus

The installation script for Quartus checks if SSE3 instruction are supported on the current CPU, the main problem is that this script doesn't run on the Rosetta environment, failing the checks.

Version 24.1std

  • Run the following commands to install Quartus (please note that this is an unattended install of the lite version with only Cyclone V device support enabled, change CLI parameters and/or the wget url to install your desider edition, refer to ./setup.sh --help for the options available). Watch out for the free space on the /tmp directory (newer Debian Systems on default installations assign 1 GB to the /tmp directory)
sudo mkdir /eda
cd /tmp 
wget https://downloads.intel.com/akdlm/software/acdsinst/24.1std/1077/ib_tar/Quartus-lite-24.1std.0.1077-linux.tar
tar xf Quartus-lite-24.1std.0.1077-linux.tar
sudo ./setup.sh --mode unattended --accept_eula 1 --installdir /eda/quartus/24.1std --disable-components quartus_help,arria_lite,cyclone,cyclone10lp,max,max10,riscfree --create_desktop_shortcuts 1
  • Patch the installation:
sudo cp /eda/quartus/24.1std/quartus/adm/qenv.sh /eda/quartus/24.1std/quartus/adm/qenv.sh.bak
sudo sed -i '/# We don'\''t support processors without SSE extensions (e.g. Pentium II and older CPUs)./i\
if test `uname -m` = "aarch64" ; then\
  export QUARTUS_BIT_TYPE=64\
fi
' /eda/quartus/24.1std/quartus/adm/qenv.sh
sudo sed -i '/# We don'\''t support processors without SSE extensions (e.g. Pentium II and older CPUs)./,/##### Determine what bitness executables we should use/ {
    /^[^#]/ s/^/# /
}' "/eda/quartus/24.1std/quartus/adm/qenv.sh"
  • Install the patched sqlite3 library:
wget https://github.com/federunco/federunco/raw/refs/heads/main/libccl_sqlite3.so
sudo cp /eda/quartus/24.1std/quartus/linux64/libccl_sqlite3.so /eda/quartus/24.1std/quartus/linux64/libccl_sqlite3.so.bak
sudo cp libccl_sqlite3.so /eda/quartus/24.1std/quartus/linux64/libccl_sqlite3.so

Other versions (tested for 23.1std)

  • Download the desired version of Quartus (e.g. the Lite edition)
  • Run the Quartus installer with the following arguments: ./qinst-lite-linux-23.1std.1-993.run --confirm
  • When asked to run the installer, DO NOT ENTER ANYTHING, copy the extracted installer located in /tmp in a known directory
  • Select to not run the installer, the script should clean the tmp directory
  • Edit the script located in ./adm/qenv.sh and add the following before the line containing # We don't support processors without SSE extensions (e.g. Pentium II and older CPUs).
if test `uname -m` = "aarch64" ; then
	export QUARTUS_BIT_TYPE=64
fi
  • In the current terminal window, run this command to skip CPU checks during installation: export QUARTUS_CPUID_BYPASS=1
  • Run the installation script, a GUI window should appear (if the installer throws Illegal Instruction, please run it in CLI mode)

After the installation has completed, open the installation directory (should be located in the home directory) and edit ./23.1std/quartus/adm/qenv.sh:

  • Add the following before the line containing # We don't support processors without SSE extensions (e.g. Pentium II and older CPUs).
if test `uname -m` = "aarch64" ; then
	export QUARTUS_BIT_TYPE=64
fi
  • Comment out the lines between # We don't support processors without SSE extensions (e.g. Pentium II and older CPUs). and ##### Determine what bitness executables we should use

Installing the license file

  • Obtain all the required licenses for the current setup from the Self-Service portal
  • Copy the generated license file in a known directory (best to keep it in the same install folder, for example /eda/licenses)
  • Edit .bashrc, adding the following contents at the end of the file (adjust paths accordingly to your configuration:
export LM_LICENSE_FILE='/eda/licenses/[your_license_file].dat' 
export PATH=$PATH:/eda/quartus/24.1std/questa_fse/linux_x86_64/ 
export PATH=$PATH:/eda/quartus/24.1std/quartus/bin/
  • Source .bashrc Now Quartus can be run with the command quartus, while Questa can be run by using vsim on a terminal window.

Post-installation

Reclaim free space on the Virtual Hard Disk

During installation some temporary files might not have been fully removed from the virtual hard disk, resulting in unnecessary disk usage on the host system. The unused space can be reclaimed by running the fstrim command by releasing unallocated blocks:

sudo fstrim / -v

Make USB Blaster work in QEMU Virtual Machine (thanks to @maehne)

  • Create a new rule for UDEV (e.g. /etc/udev/rules.d/51-usb-blaster.rules) and paste the following contents:
# USB-Blaster
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0660", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="0660", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="0660", TAG+="uaccess"

# USB-Blaster II
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="0660", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="0660", TAG+="uaccess"
  • Reload all UDEV rules immediately:
sudo udevadm control --reload-rules
sudo udevadm trigger

If during flashing the Programmer hangs, kill the jtag daemon with sudo killall jtagd and reconnect the USB cable to the machine.

Benchmarks

The same project was compiled on different machines with the same Fitter Seed (pipelined SystemVerilog FIR Filter, Cyclone V, 50 MHz clock constraint), obtaining the following compilation times:

  • Windows Server on i7 10th Gen: 10min 3s
  • Macbook Air M2 - WoA on UTM: 17min 14s
  • Macbook Air M2 - Docker: 8min 10s
  • Macbook Air M2 - Debian + Rosetta: 6min 43s
@daklod2k3
Copy link

daklod2k3 commented Apr 2, 2025

Can you help me with the bug

System:

Macbook Air M1
UTM apple virtualization + rosetta: Debian 12

Error

I run the follow command mention in the desktop file and got this error

$ intelFPGA_lite/24.1std/quartus/bin/quartus --64bit

*** Fatal Error: Illegal Instruction
Module: quartus
Stack Trace:
    0x1af7f: hasHighPrecisionDouble + 0x42 (ccl_sqlite3)
    0x54005: altr_sqlite3_initialize + 0xd8 (ccl_sqlite3)
    0x549ce: altr_sqlite3_malloc + 0x8 (ccl_sqlite3)
    0x5419a: altr_sqlite3_initialize + 0x26d (ccl_sqlite3)
    0x404a5: msg_exe_init(int, char const**) + 0x56 (ccl_msg)
    0x4050c: msg_exe_main(int, char const**, int (*)(int, char const**)) + 0x2a (ccl_msg)
     0x3ab5: main + 0x26 (quartus)

    0x27305: __libc_start_main + 0x85 (c.so.6)
     0x3889: _start + 0x29 (quartus)

End-trace

Source list

I can't access the ubuntu link you mention, so I find debian 12 which have arm version'
my addition in source list file for install package you mention

/source.list
...
deb http://deb.debian.org/debian bookworm main contrib non-free
deb http://deb.debian.org/debian bookworm-updates main contrib non-free
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free
...

Some addition info

The error above is of 24.1 version, and I can't install 23.1 version because the installer log this error

Tue Apr  1 10:18:33 2025 INFO: Command: /home/dak/Downloads/intelFPGA_lite_23.1std/QuartusLiteSetup-23.1std.1.993-linux.run --mode unattended --unattendedmodeui minimal --accept_eula 1  --installdir /home/dak/intelFPGA_lite/23-1 --enable-components questa_fse,max10 --disable-components arria_lite,cyclone,cyclone10lp,cyclonev,max,quartus_help,riscfree --create_desktop_shortcuts 1 returned 4: 

Tue Apr  1 10:18:33 2025 INFO: Installation cancelled or finished with error.  --  Total install time: 3 secs

@federunco
Copy link
Author

Can you help me with the bug

System:

Macbook Air M1 UTM apple virtualization + rosetta: Debian 12

Error

I run the follow command mention in the desktop file and got this error

$ intelFPGA_lite/24.1std/quartus/bin/quartus --64bit

*** Fatal Error: Illegal Instruction
Module: quartus
Stack Trace:
    0x1af7f: hasHighPrecisionDouble + 0x42 (ccl_sqlite3)
    0x54005: altr_sqlite3_initialize + 0xd8 (ccl_sqlite3)
    0x549ce: altr_sqlite3_malloc + 0x8 (ccl_sqlite3)
    0x5419a: altr_sqlite3_initialize + 0x26d (ccl_sqlite3)
    0x404a5: msg_exe_init(int, char const**) + 0x56 (ccl_msg)
    0x4050c: msg_exe_main(int, char const**, int (*)(int, char const**)) + 0x2a (ccl_msg)
     0x3ab5: main + 0x26 (quartus)

    0x27305: __libc_start_main + 0x85 (c.so.6)
     0x3889: _start + 0x29 (quartus)

End-trace

Source list

I can't access the ubuntu link you mention, so I find debian 12 which have arm version' my addition in source list file for install package you mention

/source.list
...
deb http://deb.debian.org/debian bookworm main contrib non-free
deb http://deb.debian.org/debian bookworm-updates main contrib non-free
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free
...

Some addition info

The error above is of 24.1 version, and I can't install 23.1 version because the installer log this error

Tue Apr  1 10:18:33 2025 INFO: Command: /home/dak/Downloads/intelFPGA_lite_23.1std/QuartusLiteSetup-23.1std.1.993-linux.run --mode unattended --unattendedmodeui minimal --accept_eula 1  --installdir /home/dak/intelFPGA_lite/23-1 --enable-components questa_fse,max10 --disable-components arria_lite,cyclone,cyclone10lp,cyclonev,max,quartus_help,riscfree --create_desktop_shortcuts 1 returned 4: 

Tue Apr  1 10:18:33 2025 INFO: Installation cancelled or finished with error.  --  Total install time: 3 secs

I haven't tested out the 24.1 version, instead the 23.1 version must be extracted before going any further. From the commands you've entered it seems you're not doing it, but rather running an unattended installation. The guest os is not a problem, as I'm also using Debian 12

@daklod2k3
Copy link

Can you help me with the bug

System:

Macbook Air M1 UTM apple virtualization + rosetta: Debian 12

Error

I run the follow command mention in the desktop file and got this error

$ intelFPGA_lite/24.1std/quartus/bin/quartus --64bit

*** Fatal Error: Illegal Instruction
Module: quartus
Stack Trace:
    0x1af7f: hasHighPrecisionDouble + 0x42 (ccl_sqlite3)
    0x54005: altr_sqlite3_initialize + 0xd8 (ccl_sqlite3)
    0x549ce: altr_sqlite3_malloc + 0x8 (ccl_sqlite3)
    0x5419a: altr_sqlite3_initialize + 0x26d (ccl_sqlite3)
    0x404a5: msg_exe_init(int, char const**) + 0x56 (ccl_msg)
    0x4050c: msg_exe_main(int, char const**, int (*)(int, char const**)) + 0x2a (ccl_msg)
     0x3ab5: main + 0x26 (quartus)

    0x27305: __libc_start_main + 0x85 (c.so.6)
     0x3889: _start + 0x29 (quartus)

End-trace

Source list

I can't access the ubuntu link you mention, so I find debian 12 which have arm version' my addition in source list file for install package you mention

/source.list
...
deb http://deb.debian.org/debian bookworm main contrib non-free
deb http://deb.debian.org/debian bookworm-updates main contrib non-free
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free
...

Some addition info

The error above is of 24.1 version, and I can't install 23.1 version because the installer log this error

Tue Apr  1 10:18:33 2025 INFO: Command: /home/dak/Downloads/intelFPGA_lite_23.1std/QuartusLiteSetup-23.1std.1.993-linux.run --mode unattended --unattendedmodeui minimal --accept_eula 1  --installdir /home/dak/intelFPGA_lite/23-1 --enable-components questa_fse,max10 --disable-components arria_lite,cyclone,cyclone10lp,cyclonev,max,quartus_help,riscfree --create_desktop_shortcuts 1 returned 4: 

Tue Apr  1 10:18:33 2025 INFO: Installation cancelled or finished with error.  --  Total install time: 3 secs

I haven't tested out the 24.1 version, instead the 23.1 version must be extracted before going any further. From the commands you've entered it seems you're not doing it, but rather running an unattended installation. The guest os is not a problem, as I'm also using Debian 12

what do you mean extracted, that log is showing running command from the installer UI not my command

@federunco
Copy link
Author

Can you help me with the bug

System:

Macbook Air M1 UTM apple virtualization + rosetta: Debian 12

Error

I run the follow command mention in the desktop file and got this error

$ intelFPGA_lite/24.1std/quartus/bin/quartus --64bit

*** Fatal Error: Illegal Instruction
Module: quartus
Stack Trace:
    0x1af7f: hasHighPrecisionDouble + 0x42 (ccl_sqlite3)
    0x54005: altr_sqlite3_initialize + 0xd8 (ccl_sqlite3)
    0x549ce: altr_sqlite3_malloc + 0x8 (ccl_sqlite3)
    0x5419a: altr_sqlite3_initialize + 0x26d (ccl_sqlite3)
    0x404a5: msg_exe_init(int, char const**) + 0x56 (ccl_msg)
    0x4050c: msg_exe_main(int, char const**, int (*)(int, char const**)) + 0x2a (ccl_msg)
     0x3ab5: main + 0x26 (quartus)

    0x27305: __libc_start_main + 0x85 (c.so.6)
     0x3889: _start + 0x29 (quartus)

End-trace

Source list

I can't access the ubuntu link you mention, so I find debian 12 which have arm version' my addition in source list file for install package you mention

/source.list
...
deb http://deb.debian.org/debian bookworm main contrib non-free
deb http://deb.debian.org/debian bookworm-updates main contrib non-free
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free
...

Some addition info

The error above is of 24.1 version, and I can't install 23.1 version because the installer log this error

Tue Apr  1 10:18:33 2025 INFO: Command: /home/dak/Downloads/intelFPGA_lite_23.1std/QuartusLiteSetup-23.1std.1.993-linux.run --mode unattended --unattendedmodeui minimal --accept_eula 1  --installdir /home/dak/intelFPGA_lite/23-1 --enable-components questa_fse,max10 --disable-components arria_lite,cyclone,cyclone10lp,cyclonev,max,quartus_help,riscfree --create_desktop_shortcuts 1 returned 4: 

Tue Apr  1 10:18:33 2025 INFO: Installation cancelled or finished with error.  --  Total install time: 3 secs

I haven't tested out the 24.1 version, instead the 23.1 version must be extracted before going any further. From the commands you've entered it seems you're not doing it, but rather running an unattended installation. The guest os is not a problem, as I'm also using Debian 12

what do you mean extracted, that log is showing running command from the installer UI not my command

The error regarding 24.1 version seems like some sort of error of the Rosetta translator, I could suggest trying to not use the AVF but using another hypervisor (such as QEMU in UTM with the rosetta binary provided here https://github.com/rawenger/rosetta-linux-asahi). Regarding the 23.1 version, the return code 4, as the output suggests, is an illegal instruction, probably due to an unimplemented feature in the translator. From my experience, not running the installer in UI mode, but in text mode from the console should mitigate a lot of problems (if I remember correctly, the GUI installer in some of my installations crashed shortly after the Intel splash screen). Try to run the installer from console, and check with dmesg if Rosetta is handling correctly the syscalls.

@IordanisKostelidis
Copy link

IordanisKostelidis commented May 1, 2025

Hello, I installed it on my Mac mini M4.
I had issue with the installation (splash screen, crash). I finally installed it using cli (mode text).
First I installed the Quartus + MAX10 Device. The I repeated the step (mode text) for Questa. I downloaded the license file, but it not work (Questa).

The Quartus works fine (I fully build a sample project)

The error:
assertion failed [true_path_length_self >= 0]: true_path_length_self underflowed!
(ThreadContextFcntl.cpp:178 is_rosetta_process)
Unable to checkout a license. Vsim is closing.
** Error: Invalid license environment. Application closing.

The license info:

Products		:	Questa*-Intel® FPGA Starter Edition SW-QUESTA		
						
Primary Machine		:	robotics-ihu-gr		
						
Primary Machine ID	:	66577D9C3FD1		
						
Host Type		:	NIC ID		
						
Companion Host ID	:	N/A		
					
Companion Host ID 2	:	N/A		
						
Redundant Server#2	:	N/A		
						
Redundant Server#3	:	N/A	

I used the Nic from enp0s1:

2: enp0s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 66:57:7d:9c:3f:d1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.64.5/24 brd 192.168.64.255 scope global dynamic noprefixroute enp0s1
       valid_lft 2688sec preferred_lft 2688sec
    inet6 fdbe:4a55:de4c:79ad:82c0:e3bb:be03:9bd6/64 scope global temporary dynamic 
       valid_lft 603890sec preferred_lft 85216sec
    inet6 fdbe:4a55:de4c:79ad:6457:7dff:fe9c:3fd1/64 scope global dynamic mngtmpaddr 
       valid_lft 2591982sec preferred_lft 604782sec
    inet6 fe80::6457:7dff:fe9c:3fd1/64 scope link 
       valid_lft forever preferred_lft forever

I have used invalid product? invalid Nic address or is other issue?

@daklod2k3
Copy link

Can you help me with the bug

System:

Macbook Air M1 UTM apple virtualization + rosetta: Debian 12

Error

I run the follow command mention in the desktop file and got this error

$ intelFPGA_lite/24.1std/quartus/bin/quartus --64bit

*** Fatal Error: Illegal Instruction
Module: quartus
Stack Trace:
    0x1af7f: hasHighPrecisionDouble + 0x42 (ccl_sqlite3)
    0x54005: altr_sqlite3_initialize + 0xd8 (ccl_sqlite3)
    0x549ce: altr_sqlite3_malloc + 0x8 (ccl_sqlite3)
    0x5419a: altr_sqlite3_initialize + 0x26d (ccl_sqlite3)
    0x404a5: msg_exe_init(int, char const**) + 0x56 (ccl_msg)
    0x4050c: msg_exe_main(int, char const**, int (*)(int, char const**)) + 0x2a (ccl_msg)
     0x3ab5: main + 0x26 (quartus)

    0x27305: __libc_start_main + 0x85 (c.so.6)
     0x3889: _start + 0x29 (quartus)

End-trace

Source list

I can't access the ubuntu link you mention, so I find debian 12 which have arm version' my addition in source list file for install package you mention

/source.list
...
deb http://deb.debian.org/debian bookworm main contrib non-free
deb http://deb.debian.org/debian bookworm-updates main contrib non-free
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free
...

Some addition info

The error above is of 24.1 version, and I can't install 23.1 version because the installer log this error

Tue Apr  1 10:18:33 2025 INFO: Command: /home/dak/Downloads/intelFPGA_lite_23.1std/QuartusLiteSetup-23.1std.1.993-linux.run --mode unattended --unattendedmodeui minimal --accept_eula 1  --installdir /home/dak/intelFPGA_lite/23-1 --enable-components questa_fse,max10 --disable-components arria_lite,cyclone,cyclone10lp,cyclonev,max,quartus_help,riscfree --create_desktop_shortcuts 1 returned 4: 

Tue Apr  1 10:18:33 2025 INFO: Installation cancelled or finished with error.  --  Total install time: 3 secs

I haven't tested out the 24.1 version, instead the 23.1 version must be extracted before going any further. From the commands you've entered it seems you're not doing it, but rather running an unattended installation. The guest os is not a problem, as I'm also using Debian 12

what do you mean extracted, that log is showing running command from the installer UI not my command

The error regarding 24.1 version seems like some sort of error of the Rosetta translator, I could suggest trying to not use the AVF but using another hypervisor (such as QEMU in UTM with the rosetta binary provided here https://github.com/rawenger/rosetta-linux-asahi). Regarding the 23.1 version, the return code 4, as the output suggests, is an illegal instruction, probably due to an unimplemented feature in the translator. From my experience, not running the installer in UI mode, but in text mode from the console should mitigate a lot of problems (if I remember correctly, the GUI installer in some of my installations crashed shortly after the Intel splash screen). Try to run the installer from console, and check with dmesg if Rosetta is handling correctly the syscalls.

How to install without GUI, in the tut you said that install from GUI so I just do like it

@federunco
Copy link
Author

Can you help me with the bug

System:

Macbook Air M1 UTM apple virtualization + rosetta: Debian 12

Error

I run the follow command mention in the desktop file and got this error

$ intelFPGA_lite/24.1std/quartus/bin/quartus --64bit

*** Fatal Error: Illegal Instruction
Module: quartus
Stack Trace:
    0x1af7f: hasHighPrecisionDouble + 0x42 (ccl_sqlite3)
    0x54005: altr_sqlite3_initialize + 0xd8 (ccl_sqlite3)
    0x549ce: altr_sqlite3_malloc + 0x8 (ccl_sqlite3)
    0x5419a: altr_sqlite3_initialize + 0x26d (ccl_sqlite3)
    0x404a5: msg_exe_init(int, char const**) + 0x56 (ccl_msg)
    0x4050c: msg_exe_main(int, char const**, int (*)(int, char const**)) + 0x2a (ccl_msg)
     0x3ab5: main + 0x26 (quartus)

    0x27305: __libc_start_main + 0x85 (c.so.6)
     0x3889: _start + 0x29 (quartus)

End-trace

Source list

I can't access the ubuntu link you mention, so I find debian 12 which have arm version' my addition in source list file for install package you mention

/source.list
...
deb http://deb.debian.org/debian bookworm main contrib non-free
deb http://deb.debian.org/debian bookworm-updates main contrib non-free
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free
...

Some addition info

The error above is of 24.1 version, and I can't install 23.1 version because the installer log this error

Tue Apr  1 10:18:33 2025 INFO: Command: /home/dak/Downloads/intelFPGA_lite_23.1std/QuartusLiteSetup-23.1std.1.993-linux.run --mode unattended --unattendedmodeui minimal --accept_eula 1  --installdir /home/dak/intelFPGA_lite/23-1 --enable-components questa_fse,max10 --disable-components arria_lite,cyclone,cyclone10lp,cyclonev,max,quartus_help,riscfree --create_desktop_shortcuts 1 returned 4: 

Tue Apr  1 10:18:33 2025 INFO: Installation cancelled or finished with error.  --  Total install time: 3 secs

I haven't tested out the 24.1 version, instead the 23.1 version must be extracted before going any further. From the commands you've entered it seems you're not doing it, but rather running an unattended installation. The guest os is not a problem, as I'm also using Debian 12

what do you mean extracted, that log is showing running command from the installer UI not my command

The error regarding 24.1 version seems like some sort of error of the Rosetta translator, I could suggest trying to not use the AVF but using another hypervisor (such as QEMU in UTM with the rosetta binary provided here https://github.com/rawenger/rosetta-linux-asahi). Regarding the 23.1 version, the return code 4, as the output suggests, is an illegal instruction, probably due to an unimplemented feature in the translator. From my experience, not running the installer in UI mode, but in text mode from the console should mitigate a lot of problems (if I remember correctly, the GUI installer in some of my installations crashed shortly after the Intel splash screen). Try to run the installer from console, and check with dmesg if Rosetta is handling correctly the syscalls.

How to install without GUI, in the tut you said that install from GUI so I just do like it

https://www.intel.com/content/www/us/en/docs/programmable/683472/22-3/installing-fpga-software-at-the-command.html

@federunco
Copy link
Author

federunco commented May 5, 2025

Error: Invalid license environment

Try to check if the license environment variable is set correctly (echo $LM_LICENSE_FILE), I'm not familiar with Rosetta internals, but that assert (assertion failed [true_path_length_self >= 0]: true_path_length_self underflowed!) kinda looks like that the file path it tried to read returned -1, it could mean that it didn't find the license file.

@federunco
Copy link
Author

federunco commented Jun 21, 2025

I run the follow command mention in the desktop file and got this error

Finally got to upgrade to the 24.1std version, to solve the problem please run this commands:

wget https://github.com/federunco/federunco/raw/refs/heads/main/libccl_sqlite3.so
sudo cp libccl_sqlite3.so /eda/quartus/24.1std/quartus/linux64/libccl_sqlite3.so

Change the install directory accordingly to your setup

@sameh-galal
Copy link

Hello, I installed it on my Mac mini M4. I had issue with the installation (splash screen, crash). I finally installed it using cli (mode text). First I installed the Quartus + MAX10 Device. The I repeated the step (mode text) for Questa. I downloaded the license file, but it not work (Questa).

The Quartus works fine (I fully build a sample project)

The error: assertion failed [true_path_length_self >= 0]: true_path_length_self underflowed! (ThreadContextFcntl.cpp:178 is_rosetta_process) Unable to checkout a license. Vsim is closing. ** Error: Invalid license environment. Application closing.

The license info:

Products		:	Questa*-Intel® FPGA Starter Edition SW-QUESTA		
						
Primary Machine		:	robotics-ihu-gr		
						
Primary Machine ID	:	66577D9C3FD1		
						
Host Type		:	NIC ID		
						
Companion Host ID	:	N/A		
					
Companion Host ID 2	:	N/A		
						
Redundant Server#2	:	N/A		
						
Redundant Server#3	:	N/A	

I used the Nic from enp0s1:

2: enp0s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 66:57:7d:9c:3f:d1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.64.5/24 brd 192.168.64.255 scope global dynamic noprefixroute enp0s1
       valid_lft 2688sec preferred_lft 2688sec
    inet6 fdbe:4a55:de4c:79ad:82c0:e3bb:be03:9bd6/64 scope global temporary dynamic 
       valid_lft 603890sec preferred_lft 85216sec
    inet6 fdbe:4a55:de4c:79ad:6457:7dff:fe9c:3fd1/64 scope global dynamic mngtmpaddr 
       valid_lft 2591982sec preferred_lft 604782sec
    inet6 fe80::6457:7dff:fe9c:3fd1/64 scope link 
       valid_lft forever preferred_lft forever

I have used invalid product? invalid Nic address or is other issue?

I hit the same problem. I ran vsim using strace and found the following

5348  mmap(0xeffff7d78000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED_NOREPLACE, -1, 0) = 0xeffff7d78000
5348  newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=114, ...}, 0) = 0
5348  readlinkat(AT_FDCWD, "/proc/self/exe", "/rosetta", 4096) = 8
5348  readlinkat(AT_FDCWD, "/proc/5346/exe", "/rosetta", 4096) = 8
5348  readlinkat(AT_FDCWD, "/proc/5348/exe", "/rosetta", 4096) = 8
5348  newfstatat(AT_FDCWD, "/rosetta", 0xeffff7defb70, AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT) = -1 ENOENT (No such file or direc
tory)
5348  readlinkat(AT_FDCWD, "/proc/5346/exe", "/rosetta", 4096) = 8
5348  newfstatat(AT_FDCWD, "/rosetta", 0xeffff7defb70, AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT) = -1 ENOENT (No such file or direc
tory)
5348  write(2, "assertion failed [true_path_leng"..., 131) = 131

so it seems vsim reads /proc/self/exe, which resolves to /rosetta It then tries to stat the file /rosetta But it fails returning ENOENT (No such file or directory.

the solution was super hacky but it worked. just create a symbolic link at /rosetta that maps to vsim

sudo ln -s "$(which vsim)" /rosetta

and then miraculously it worked!
Screenshot 2025-07-06 at 7 01 48 PM

@maehne
Copy link

maehne commented Aug 25, 2025

@federunco: Thanks for maintaining these instructions to make Quartus Prime work in a Linux VM on Apple Silicon! They enabled me to install and use Quartus Prime Std lite 24.1 and Questa Sim into a Debian Trixie VM on a MacBook Air with M4 processor and macOS 15.6.1. Some remarks:

  • I didn't need to install binutils:amd64 and g++-multilib:amd64 (They would force uninstalling the native aarch64 compiler toolchain), but additionally needed libcrypt1:amd64 (for Quartus) and libgtk-3-0:amd64(for the Risc Free IDE). So my current list of dependencies looks like:

    • libbz2-1.0:amd64
    • libglib2.0-0:amd64
    • libnsl-dev:amd64
    • libfontconfig:amd64
    • libx11-xcb1:amd64
    • libxext6:amd64
    • libsm6:amd64
    • libdbus-1-3:amd64
    • libxft2:amd64
    • libxtst6:amd64
    • libxi6:amd64
    • libgtk2.0-0:amd64
    • libcrypt1:amd64
  • Rosetta: Only when using Rosetta in macOS 13, the --preserve should be set to no. On newer macOS versions it should be set to yes. I did not need to create the /opt/rosetta/rosetta_start.sh script and /etc/systemd/system/rosetta.service service. On Qemu, mounting of the Rosetta volume with sudo mount -t virtiofs rosetta /opt/rosetta/rosetta is not necessary.

  • Indeed, without your patched libccl_sqlite3.so, Quartus Prime would crash with an Rosetta error. How did you patch that library? I was not able to find a source for this library.

  • For using the USB-Blaster, it is best to add a UDEV rule:

# /etc/udev/rules.d/51-usb-blaster.rules
# USB-Blaster
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0660", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="0660", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="0660", TAG+="uaccess"

# USB-Blaster II
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="0660", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="0660", TAG+="uaccess"
  • The Online help in the Risc Free IDE is not working. This can be fixed by selecting explicitly your web browser (Firefox) in Window > Preferences > General > Web Browser. By default, the found web browser won't open any URL. Fix this by clicking on "Edit..." and add "%URL%" to "Parameters:".

  • For Questa Sim, the license file should be set using the environment variable SALT_LICENSE_SERVER instead of the deprecated LM_LICENSE_FILE.

@SmartBoy84
Copy link

SmartBoy84 commented Sep 17, 2025

Hey, thanks for the guide - I've got it up and running extremely well on M2 air!

One issue though, the programmer takes quite a lot of time (relatively - 1,2 minutes) to detect the device that is plugged in. When I plug in a device, open up the programmer and click hardware setup it freezes for a couple of minutes before detecting a device.

Has anybody else had this issue, and if so how do you resolve it?

Also some more comments, in addition to the ones given above:
On Parallels, ticking the enable x86 emulation option will NOT work and cause Quartus to crash (with errors that seem unrelated to architectural issues). You need to follow the instructions in the guide to get your own Rosetta binary, and set it up as a service.

@maehne
Copy link

maehne commented Sep 17, 2025

@SmartBoy84: Did you consider my remarks above, especially the UDEV rules? With them, programming FPGAs works well on my machine without considerable delays.

However, I have observed long delays/programming failures using the USB-Blaster in the past. Sometimes, simply killing the JTAG daemon using sudo killall jtagd and unplugging/replugging the USB cable helps to resolve the issue. At least in one occasion, the delays/programming failures were provoked by a bad USB cable. I am also aware that there are bad/cheap USB-Blaster clones, which can cause such troubles.

@SmartBoy84
Copy link

SmartBoy84 commented Sep 17, 2025

Yep! killall jtagd worked!

Time to add that to my list of hacks to get this stuff to work on Mac
As reference for me, dhclient to get internet working after suspend in plain debian install in parallels, restart avahi-daemon for local DNS resolution, killall jtagd if programmer freezes, restart i3 if buttons become unresponsive.

As a side note, it may also have been an issue with my udev rules. I changed it to yours and it seems to have fixed the delay issue as well so thank you @maehne, I'll edit this comment if it breaks again (and so if that wasn't the solution for future readers).
EDIT: that didn't fix the lag issue, just restart jtagd if you have that issue.

Also, consider ammending your comment about setting preserve to -off, I think you meant yes on MacOS > 13

Edit: potentially something to do with libudev: https://hackaday.io/project/123606-clone-buino-dual/log/145420-beware-of-quartus-jtag-programmer-on-linux

@maehne
Copy link

maehne commented Sep 17, 2025

Glad that I could help.

Also, consider ammending your comment about setting preserve to -off, I think you meant yes on MacOS > 13

Thanks for the pointer to this typo. I fixed it above.

@maehne
Copy link

maehne commented Sep 17, 2025

Edit: potentially something to do with libudev: https://hackaday.io/project/123606-clone-buino-dual/log/145420-beware-of-quartus-jtag-programmer-on-linux

It seems jtagd (at least from Quartus Prime Std lite 24.1) tries to load either libudev.so.0 or libudev.so.1. So, this would require more testing by people affected by this issue.

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