|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
|
<html> |
|
|
<head> |
|
|
|
|
|
|
|
|
<meta name="Description" content="KLayout layout viewer and editor project page" /> |
|
|
<meta name="Keywords" content="KLayout OASIS GDS2 viewer editor layout semiconductor mask chip design" /> |
|
|
<meta name="abstract" content="KLayout is a free layout viewer and editor for several formats commonly used in the semiconductor industry to transfer layout data" /> |
|
|
<meta name="URL" content="https://www.klayout.de/" /> |
|
|
<meta name="Author" content="Matthias Koefferlein" /> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript" /> |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
|
|
|
|
<title>KLayout Layout Viewer And Editor</title> |
|
|
|
|
|
|
|
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.klayout.de/news.xml"/> |
|
|
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/format.css?v2.0"/> |
|
|
<link rel="shortcut icon" href="https://www.klayout.de/favicon.ico"/> |
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="https://www.klayout.de/fonts.css"/> |
|
|
|
|
|
|
|
|
<script src="https://www.klayout.de/jquery-3.4.1.min.js"></script> |
|
|
|
|
|
|
|
|
<link href="https://www.klayout.de/bootstrap-4.3.1-dist/css/bootstrap.min.css" rel="stylesheet"> |
|
|
<script src="https://www.klayout.de/bootstrap-4.3.1-dist/js/bootstrap.min.js"></script> |
|
|
|
|
|
|
|
|
|
|
|
</head> |
|
|
|
|
|
<body> |
|
|
|
|
|
<div class="klayout-header"> |
|
|
|
|
|
<div class="container mb-5"> |
|
|
|
|
|
<nav class="navbar navbar-dark navbar-expand-lg"> |
|
|
|
|
|
<a class="navbar-brand" href="https://www.klayout.de"><img src="https://www.klayout.de/klayout.png" srcset="https://www.klayout.de/klayout-x2.png 2x" alt="KLayout"></a> |
|
|
|
|
|
<div class="collapse navbar-collapse" id="navbarToggleExternalContent"> |
|
|
|
|
|
<ul class="navbar-nav ml-auto mr-auto"> |
|
|
|
|
|
<li class="nav-item dropdown active mr-4"> |
|
|
<a class="nav-link dropdown-toggle klayout-menu" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
About |
|
|
</a> |
|
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/intro.html">KLayout Project</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/doc.html">Documentation</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/galleries.html">Galleries</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/credits.html">Credits</a> |
|
|
<div class="dropdown-divider"></div> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/contact.html">Contact</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/impressum.html">Impressum / Imprint</a> |
|
|
<a class="dropdown-item" href="https://www.klayout.de/privacy_policy.html">Datenschutz / Privacy Policy</a> |
|
|
</div> |
|
|
</li> |
|
|
<li class="nav-item active mr-4"> |
|
|
<a class="nav-link klayout-menu" href="https://www.klayout.de/build.html">Get KLayout</a> |
|
|
</li> |
|
|
<li class="nav-item active mr-4"> |
|
|
<a class="nav-link klayout-menu" href="https://sami.klayout.org">Package Index</a> |
|
|
</li> |
|
|
<li class="nav-item active mr-5"> |
|
|
<a class="nav-link klayout-menu" href="https://www.klayout.de/forum">Forum</a> |
|
|
</li> |
|
|
<li class="nav-item active"> |
|
|
<span class="nav-link klayout-menu"> |
|
|
<a href="https://f-si.org"><img src="https://www.klayout.de/f-si_logo_32h_w.png" border="0" title="Free Silicon Foundation" alt="F-Si"/></a> |
|
|
<a class="ml-4" href="https://github.com/KLayout"><img src="https://www.klayout.de/GitHub-Mark-32px-white.png" border="0" title="KLayout on GitHub" alt="GitHub"/></a> |
|
|
</span> |
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation"> |
|
|
<span class="navbar-toggler-icon"></span> |
|
|
</button> |
|
|
|
|
|
</nav> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="container"> |
|
|
|
|
|
<h1>Build instructions before version 0.25</h1> |
|
|
|
|
|
<a name="build_unix"></a><h2>Building KLayout on Unix</h2> |
|
|
|
|
|
<p> |
|
|
System Requirements: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li>Linux system (tested on Ubuntu 8.04LTS, 10.04LTS, 12.04LTS, 14.02LTS, RHE 4/5/6, CentOS 6)</li> |
|
|
<li>on Linux: gcc Version 4 or later (tested with 4.3.2, 4.4.3, 4.6.3, 4.8.4). Solaris is no longer supported.</li> |
|
|
<li>Qt Version 4.5.x or later (4.5.2, 4.6.3, 4.7.4 and 4.8.2). </li> |
|
|
<li>gcc C++ compiler (package "g++" on Debian)</li> |
|
|
<li>zlib library and headers (package "zlib1g-dev" on Debian)</li> |
|
|
<li>Recommended: Ruby 1.9.1 or later (Ruby 2.x will work too), Python 2.7 or later (Python 3.x will work too)</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
To build, the simplest way is to use the build.sh wrapper script |
|
|
provided. Unpack the tarkit, change to the directory created |
|
|
and type |
|
|
</p> |
|
|
|
|
|
<p class="indent"> |
|
|
<tt> |
|
|
./build.sh |
|
|
</tt> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
If the script complains about missing tools are libraries, the Qt |
|
|
installation needs to be specified. There are basically two ways: |
|
|
either a Qt package was configured or installed using the environment |
|
|
provided by TrollTech, or the system provides a Qt4 installtion itself. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
In the first case, the actual Qt installation path can be specified with |
|
|
the -qt option: i.e. |
|
|
</p> |
|
|
|
|
|
<p class="indent"> |
|
|
<tt> |
|
|
./build.sh -qt ~/qt |
|
|
</tt> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
will locate the Qt include files in ~/qt/include, the Qt library in |
|
|
~/qt/lib. The installation path is the prefix that was specified |
|
|
on Qt's configure command line. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
On LSB (Linux Standard Base) systems, the Qt4 library can be optionally |
|
|
installed. It is common to have different |
|
|
installation directories for include and library files. On |
|
|
Ubuntu 6.10 with Qt4 for example, the libraries are located in "/usr/lib", the |
|
|
development tools like "uic" are installed in "/usr/bin" and |
|
|
the include files reside in "/usr/include/qt4". |
|
|
In this case, use: |
|
|
</p> |
|
|
|
|
|
<p class="indent"> |
|
|
<tt> |
|
|
./build.sh -qtbin /usr/bin -qtlib /usr/lib -qtinc /usr/include/qt4 |
|
|
</tt> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Since the above settings are the default, this is equivalent to specifying nothing |
|
|
as shown above. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
The build script does not determine the platform to build upon. By default, |
|
|
32 bit Linux and "gcc" is configured as the build platform. To build for an other platform, |
|
|
use |
|
|
</p> |
|
|
|
|
|
<p class="indent"> |
|
|
<tt> |
|
|
./build.sh -platform </tt><platform><tt> |
|
|
</tt> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
The platforms and build variants available are listed with |
|
|
</p> |
|
|
|
|
|
<p class="indent"> |
|
|
<tt> |
|
|
./build.sh -help |
|
|
</tt> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
The build script will create the final executable in |
|
|
</p> |
|
|
|
|
|
<p class="indent"> |
|
|
<tt> |
|
|
./bin.</tt><platform><tt>/klayout |
|
|
</tt> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
To integrate other build variants, a new file can be created in the |
|
|
"config" subdirectory. This is a partial Makefile that defined the |
|
|
variables specific for a certain build. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
If the build script finds a Ruby interpreter in the path and the Ruby development |
|
|
packages are installed (i.e. "ruby1.9.1-dev"), Ruby script automation capabilities (RBA) are enabled. |
|
|
It should no longer be necessary to specify the location of the libraries and |
|
|
headers. <b>Ruby 1.9.1 or later</b> is recommended for that feature. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
If the build script finds a Python interpreter in the path and the Python development |
|
|
packages are installed (i.e. "python-dev"), Python script automation capabilities (pya) are enabled. |
|
|
It should no longer be necessary to specify the location of the libraries and |
|
|
headers. <b>Python 2.7 or later</b> is required for that feature. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
For more details about RBA, see <a href="doc/programming/index.html">Programming scripts</a>. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
<b>Qt bindings are not enabled by default.</b> The Qt bindings allow you to create Qt user interfaces |
|
|
using Ruby scripts. To enable Qt bindings, you'll need Qt 4.6.2 at least and have to use the |
|
|
following build script switch: |
|
|
</p> |
|
|
|
|
|
<p class="indent"> |
|
|
<tt> |
|
|
build.sh -with-qtbinding |
|
|
</tt> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Enabling Qt bindings will significantly increase the build times and size of the final executable. |
|
|
For more details about the Qt binding, see <a href="doc/programming/qt_binding.html">The Qt Binding</a>. |
|
|
</p> |
|
|
|
|
|
<a name="build_macos"></a><h2>Building on MacOS</h2> |
|
|
|
|
|
<p> |
|
|
For building the executable on MacOS 10.5.7, the "mac-leopard-gcc-release" platform is provided. The build is based on the Xcode |
|
|
installation. This build script call was used successfully with Qt 4.5.2 from the Xcode package: |
|
|
</p> |
|
|
|
|
|
<pre> |
|
|
./build.sh -platform mac-leopard-gcc-release \ |
|
|
-qtbin /Developer/Tools/Qt \ |
|
|
-qtlib /usr/lib \ |
|
|
-rblib /usr/lib/libruby.dylib \ |
|
|
-rbinc /usr/lib/ruby/1.8/universal-darwin9.0 |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
On MacOS 10.6 this build script call was used successfully (Qt library is qt-mac-cocoa-opensource-4.6.2.dmg): |
|
|
</p> |
|
|
|
|
|
<pre> |
|
|
./build.sh -platform mac-leopard-gcc-release \ |
|
|
-qtbin /Developer/Tools/Qt \ |
|
|
-qtlib /usr/lib \ |
|
|
-rblib /usr/lib/libruby.dylib \ |
|
|
-rbinc /usr/lib/ruby/1.8/universal-darwin10.0 |
|
|
</pre> |
|
|
|
|
|
<p>Apparently, both 32 and 64 bit versions of Qt must be installed.</p> |
|
|
|
|
|
<p><b>Note:</b> to enable Qt binding for RBA, add the "-with-qtbinding" switch:</p> |
|
|
|
|
|
<pre> |
|
|
./build.sh -with-qtbinding ... |
|
|
</pre> |
|
|
|
|
|
<p> |
|
|
For compiling the Qt bindings, at least Qt 4.6.2 is required. |
|
|
Enabling Qt bindings will significantly increase the build times and size of the final executable. |
|
|
For more details about the Qt binding, see <a href="doc/programming/qt_binding.html">The Qt Binding</a>. |
|
|
</p> |
|
|
|
|
|
<a name="build_windows"></a><h2>Building KLayout for Windows 32 bit with MinGW</h2> |
|
|
|
|
|
<p> |
|
|
<b>Please note: severe issues have been observed with MinGW's gcc 4.4.0 distribution. Specifically, broken |
|
|
support for exceptions in threads may make the application crash. Possibly a new distribution may solve that |
|
|
issue. Until then, although basically functional, the use of the MinGW build is discouraged. |
|
|
</b> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
Starting with version 0.21, a build setup is provided for MinGW with the gcc. A good starting point for the |
|
|
MinGW build is the Qt SDK which comes with a Qt reaily built for MinGW and the gcc |
|
|
compiler suite. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
To enable Ruby support, the Ruby interpreter, preferably version 1.9 is required. |
|
|
A strange fact with building Ruby 1.9 is that one needs a Ruby interpreter to |
|
|
build it. One possible solution is first to build a 1.8 version, put the executable |
|
|
into the path and then run the Ruby build from the MinGW console. |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
To build KLayout on MinGW, simply open the MinGW shell (MSYS), unpack the KLayout source |
|
|
package and cd to the destination folder. Then use build.sh as on Linux. For example, if |
|
|
the Qt SDK was installed in "c:\Qt\2010.04", the build script call is |
|
|
</p> |
|
|
|
|
|
<p class="indent"> |
|
|
<tt> |
|
|
build.sh -qt /c/Qt/2010.04/qt |
|
|
</tt> |
|
|
</p> |
|
|
|
|
|
<p> |
|
|
For ruby support use the -rblib and -rbinc options accordingly to specify the ruby installation |
|
|
path. |
|
|
</p> |
|
|
|
|
|
<a name="build_vs"></a><h2>Building KLayout for Windows 32 bit and 64 bit with Visual Studio</h2> |
|
|
|
|
|
<p> |
|
|
Starting with version 0.21, a Visual Studio solution is included in the source branch of KLayout's |
|
|
source tarkit ("klayout.sln"). The solution is provided for Visual Studio 2010. |
|
|
</p> |
|
|
|
|
|
<h3>Building KLayout for Version 0.24</h3> |
|
|
|
|
|
<p>Version 0.24 is based on:</p> |
|
|
|
|
|
<ul> |
|
|
<li>Visual Studio 2010 (VC++ version 10)</li> |
|
|
<li>Qt 4.8.2</li> |
|
|
<li>Ruby 2.1.3 (get the package here: <a href="https://www.klayout.org/downloads/ruby-2.1.3.zip">ruby-2.1.3.zip</a>)</li> |
|
|
<li>Python 3.4 (get the package here: <a href="https://www.klayout.org/downloads/Python34.zip">Python34.zip</a>)</li> |
|
|
<li>STLPort 5.2.1 (get the package here: <a href="https://www.klayout.org/downloads/STLport-5.2.1.zip">STLport-5.2.1.zip</a>)</li> |
|
|
</ul> |
|
|
|
|
|
<p>A Visual Studio solution is provided (<tt>klayout.sln</tt>). The release mode configuration is |
|
|
"Release (STLPort)" which is the one used for creating the prebuild packages.</p> |
|
|
|
|
|
<p>The build requires the following environment variables to be set:</p> |
|
|
|
|
|
<ul> |
|
|
<li>$QTDIR to the installation path of Qt for 32 bit build ($QTDIR/bin being the location of the |
|
|
executables, $QTDIR/lib being the location of the libraries and $QTDIR/include being the location |
|
|
of the header files).</li> |
|
|
<li>$QTDIR64 to the installation path of Qt for 64 bit build ($QTDIR64/bin being the location of the |
|
|
executables, $QTDIR64/lib being the location of the libraries and $QTDIR64/include being the location |
|
|
of the header files).</li> |
|
|
<li>$STLPORT to the installation path of the STLPort library. $STLPORT/stlport must be |
|
|
the location of the headers. This variable is the same for 32 and 64 bit builds.</li> |
|
|
<li>$RUBY2 to the installation path of the Ruby 2.x library for the 32 bit build. $RUBY2/include/ruby-2.1.0 must be |
|
|
the location of the ruby.h header.</li> |
|
|
<li>$RUBY264 to the installation path of the Ruby 2.x library for the 64 bit build. $RUBY264/include/ruby-2.1.0 must be |
|
|
the location of the ruby.h header.</li> |
|
|
<li>$PYTHON to the installation path of the Python library for the 32 bit build. $PYTHON/include must be |
|
|
the location of the python.h header.</li> |
|
|
<li>$PYTHON64 to the installation path of the Python library for the 64 bit build. $PYTHON64/include must be |
|
|
the location of the python.h header.</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
For further details see the next section. |
|
|
</p> |
|
|
|
|
|
<h3>Building KLayout for Version 0.21 to 0.23</h3> |
|
|
|
|
|
<p> |
|
|
To build KLayout with Visual Studio, the following requirements must be fulfilled: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li>Qt for Visual Studio 2010 (VC++ version 10). Currently this version must be built manually. |
|
|
Qt version 4.7.1 is compatible with Visual Studio 2010 and building it is pretty straightforward. |
|
|
</li> |
|
|
<li>For a complete build including Ruby support, the ruby interpreter is required as well. Only version |
|
|
1.9 is supporting the 64 bit platform. Building is straightforward, except that again a ruby interpreter |
|
|
must be installed before version 1.9 can be built. If no interpreter is at hand, a 1.8 version must be |
|
|
built before. The project files currently assume Ruby version 1.9.1.<br/> |
|
|
A pre-built package for VS2010 can be downloaded here: <a href="https://www.klayout.org/downloads/ruby1.9.1-p430.zip">ruby1.9.1-p430.zip</a>. It |
|
|
contains both the 32 bit and 64 bit builds in the 1.9.1-p430/x86 and 1.9.1-p420/x64 directories. |
|
|
</li> |
|
|
<li>For full performance, it is recommended to replace the standard STL implementation of VC++ with |
|
|
the STLPort implementation which has a 2x performance impact in some cases. Building STLPort on |
|
|
VC++ is straightforward and has been tested with version 5.2.1.<br/> |
|
|
A pre-built package for VS2010 can be downloaded here: <a href="https://www.klayout.org/downloads/STLport-5.2.1.zip">STLport-5.2.1.zip</a>. It |
|
|
contains both the 32 bit and 64 bit builds. |
|
|
</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
Before building KLayout, it is required to set the following environment variables: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li>$QTDIR to the installation path of Qt for 32 bit build ($QTDIR/bin being the location of the |
|
|
executables, $QTDIR/lib being the location of the libraries and $QTDIR/include being the location |
|
|
of the header files).</li> |
|
|
<li>$QTDIR64 to the installation path of Qt for 64 bit build ($QTDIR64/bin being the location of the |
|
|
executables, $QTDIR64/lib being the location of the libraries and $QTDIR64/include being the location |
|
|
of the header files).</li> |
|
|
<li>$STLPORT to the installation path of the STLPort library (if required). $STLPORT/stlport must be |
|
|
the location of the headers. This variable is the same for 32 and 64 bit builds.</li> |
|
|
<li>$RUBY to the installation path of the Ruby library (if required) for the 32 bit build. $RUBY/include/ruby-1.9.1 must be |
|
|
the location of the ruby.h header.</li> |
|
|
<li>$RUBY64 to the installation path of the Ruby library (if required) for the 64 bit build. $RUBY64/include/ruby-1.9.1 must be |
|
|
the location of the ruby.h header.</li> |
|
|
</ul> |
|
|
|
|
|
<p> |
|
|
After this preparation, KLayout can be build from Visual Studio using the "Win32" platform for 32 bit and "x64" |
|
|
platform for 64 bit. The recommended configurations are: |
|
|
</p> |
|
|
|
|
|
<ul> |
|
|
<li>"Release (STLPort)" for the release build with Ruby support, QT bindings and using STLPort.</li> |
|
|
<li>"Debug (STLPort)" for the debug build with Ruby support, QT bindings and using STLPort.</li> |
|
|
</ul> |
|
|
|
|
|
</div> |
|
|
</body> |
|
|
</html> |
|
|
|
|
|
|