Sorry for the radio silence the last few weeks, I’ve been real busy learning to transition myself from being a Windows guy to a Linux guy, and I have to admit there is a steep learning curve. Plus, I’ve been working on creating a $15 alternative to the normally $300 Altera USB-Blaster, but I’ll talk more about that project in a future post.

My first challenge, now that I’ve overcome my hard-drive nightmare, was getting Quartus installed on my Ubuntu box. This task was much harder than I had first expected it to be, so in this post I’ll share my solution.

I tried to download the Quartus installer but everytime I tried to install it, I got the following error:
./altera_installer_gui: symbol lookup error: /usr/lib32/libXi.so: undefined symbol: XESetWireToEventCookie

Fortunately, I googled apon the blog of Aleksandr Koltsoff over at Lower Strata who put together a great post that got me halfway to the goal. Unfortunately, after following his guide I still had some problems with the device files not being configured correctly. I’ll explain how to fix this problem at the end of the article.

I recommend you head over to Aleksandr’s article for the instructions, but I’m going to repost them here for good measure:

So, step by step guide to getting the blob to work on Lucid 64-bit:

1. Download the installer from Altera website (it’s a shell script containing a compressed binary installer). Do not yet execute the script.
2. Download the Karmic version of libXi for 32-bit. Do not install the deb.
3. Extract the deb: mkdir deb-extract && dpkg -x libxi6_1.2.1-2ubuntu1_i386.deb deb-extract
4. Now, switch to the directory where you downloaded the Altera installer script. It needs to be extracted, but not yet run. Execute the following: sh altera_installer.external.sh --confirm
5. The script will ask whether it’s ok to extract stuff, answer yes.
6. Then, the script will ask whether it’s ok to run the installer (“OK to execute: ./altera_installer_gui --gui?“). Answer No.
7. cd bin
8. cp ../deb-extract/usr/lib/libXi.so.6 libXi.so
9. LD_LIBRARY_PATH=$PWD ./altera_installer_gui --gui
10. Enter ~/altera as the install directory and /tmp to hold the temp files.
11. The installer will take a lot of time downloading the stuff (at least it did for me, and it wasn’t for the lack of bandwidth at my side). Sometimes it will also abort the download (because “it failed”) and ask you to restart the install. The partial downloads are kept in /tmp so eventually your installation should complete.
12. Once the installer has downloaded everything, you have the option to start Quartus. You might want to check that it will run.

The program can be now run like this: ~/altera/10.0/quartus/bin/quartus (you may want to create a symlink or a menu entry, since those are not created on Lucid).

I couldn’t find the version of the installer that also downloads the files, only the full package, so my install steps were slightly different.

I downloaded the full 2.8GB installer from the Altera website. Then when I got to step 6, I didn’t answer No. I just opened a second terminal window and did steps 7 & 8 to copy the libXi.so file into that install directory. Then once the copy was complete I returned to the first terminal window and entered Yes to the install prompt, allowing the full installation to continue. I sort of snuck in, inserted the file and snuck out before the installer ran. Eventually a graphical window will open and allow you to make a few configuration choices for Quartus to complete the configuration process.

After the install was done, Quartus ran but I was unable to open any of my projects or create new ones because there were no devices installed.

Here is the workaround to install the devices:
In the path where I installed Quartus (/home/altera/) there is file called: altera_installer_10.0sp1.log
At the end of the log I can see some text where it tried to installed the devices but failed:

Installing package : Cyclone Family ...
starting subprocess:
/home/chris/altera/10.0sp1/quartus/bin/quartus_sh --qinstall -qda "/home/chris/Documents/Downloads/10.0sp1_quartus_free_linux/altera_installer/bin/../../devices/subscription/cyclone.qda" -show_qt_progress
quartus_free install process 16964 finished with status 2
/home/chris/altera/10.0sp1/quartus/bin/quartus_sh: 59: ARGV[0]=--qinstall: not found
/home/chris/altera/10.0sp1/quartus/bin/quartus_sh: 59: ++val: not found
/home/chris/altera/10.0sp1/quartus/bin/quartus_sh: 59: ARGV[0]=-qda: not found
/home/chris/altera/10.0sp1/quartus/bin/quartus_sh: 59: ++val: not found
/home/chris/altera/10.0sp1/quartus/bin/quartus_sh: 59: ARGV[0]=/home/chris/Documents/Downloads/10.0sp1_quartus_free_linux/altera_installer/bin/../../devices/subscription/cyclone.qda: not found
/home/chris/altera/10.0sp1/quartus/bin/quartus_sh: 59: ++val: not found
/home/chris/altera/10.0sp1/quartus/bin/quartus_sh: 59: ARGV[0]=-show_qt_progress: not found
/home/chris/altera/10.0sp1/quartus/bin/quartus_sh: 59: ++val: not found
export: 137: 800.000: bad variable name



I opened terminal and navigated to my install directory: /home/altera/10.0sp1/quartus/bin and then ran the following to install the cyclone i/ii/iii devices:

/home/chris/altera/10.0sp1/quartus/bin/quartus_sh --qinstall -qda "/home/chris/Documents/Downloads/10.0sp1_quartus_free_linux/altera_installer/bin/../../devices/subscription/cyclonei.qda" -show_qt_progress

then

/home/chris/altera/10.0sp1/quartus/bin/quartus_sh --qinstall -qda "/home/chris/Documents/Downloads/10.0sp1_quartus_free_linux/altera_installer/bin/../../devices/subscription/cycloneii.qda" -show_qt_progress

then

/home/chris/altera/10.0sp1/quartus/bin/quartus_sh --qinstall -qda "/home/chris/Documents/Downloads/10.0sp1_quartus_free_linux/altera_installer/bin/../../devices/subscription/cycloneiii.qda" -show_qt_progress



Navigate to this path to see what other devices are available to be installed:
/home/chris/Documents/Downloads/10.0sp1_quartus_free_linux/devices/subscription/

I’m not certain why those devices didn’t install correctly for me, hopefully you won’t have the same problem.

Feel free to leave a comment and let me know how the install process goes for you.