Getting Started with Magic VLSI

Magic VLSI – or just Magic – is a free and open source VLSI layout software. Simply put Magic allows you to draw the mask layers used in a semiconductor facrication process. The Magic software is another “Berkeley Child” (like BSD and others) and first came into existence in the 1980s. Magic is still under active development as of late 2019.

Some Linux distributions offer a pre-build package for Magic from their package repository. Most often these packages are outdated and therefor it is best to build Magic from the sources.

Start by pulling the latest release from the official project page.
$> git clone git://
$> cd magic

$> git checkout magic-8.2

I am building Magic in a WSL Ubuntu 18.04 while writing this guide, so installing some additional packages is required before continuing. This step is subject to the build machine and may vary.
$> sudo apt install csh
$> sudo apt install libglu1-mesa-dev freeglut3-dev mesa-common-dev
$> sudo apt install tk tk-dev
$> sudo apt install libcairo2 libcairo2-dev

Now let’s continue to build Magic. I like to install software to /opt so it’s not burried deep inside the file tree and is available to all users on my machine (which is just me). The installation folder is set by the --prefix option.
$> ./configure --prefix=/opt/magic-8.2
If all the dependencies above where installed you should see a fivefold yes after the configure script has completed.

With that out of the way the build process can be launched as usual. The installation step may require to change the permissions on the installation folder, so that the current user has write access to the installation path.
$> make
$> make install

That’s it! Let’s see if it worked.
$> cd /opt/magic-8.2/bin
$> ./magic &

Success! Magic 8.2 has been launched.

In order to have something more than a gray box to look at let’s load the layout of an example gate from my Magic VLSI examples repo.

“Nice colors!” “Oh NAND you.”

That’s it for now. More examples on how to get started with Magic may follow.
P.S.: Before I forget to mention it, Magic requires a mouse with 3 buttons to work as intended. No kidding!



Getting Started with GHDL


Undelete Files with SnapRAID


  1. Trevor

    I tried to run make install and it gave me this error:

    cp: cannot create regular file ‘/opt/magic-8.2/bin/magic’: No such file or directory

    • andrsmllr

      Writing to /opt usually requires root privileges. Either create the target dir “sudo mkdir /opt/magic-x.y” and change ownership with “sudo chown -R user:group /opt/magic-x.y”, then run “make install”.
      Alternatively run “sudo make install”, which is not optimal because the installed files will be owned by root and often considered insecure.

  2. Trevor

    Also, when I ran git checkout magic-8.2 it says;

    error: pathspec ‘magic-8.2’ did not match any file(s) known to git

    • andrsmllr

      Hi, my article still uses the git repo from which is outdated. At this time it’s probably better to use the github repository from and just use the master branch or one of the latest tags.

Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by WordPress & Theme by Anders Norén

Close Bitnami banner