|
|
@ -18,23 +18,17 @@ Table of contents |
|
|
1.5.3 Options Useful for Debugging Ngspice |
|
|
1.5.3 Options Useful for Debugging Ngspice |
|
|
1.6 Installation on Red Hat, Oracle or CentOS Linux |
|
|
1.6 Installation on Red Hat, Oracle or CentOS Linux |
|
|
2 Compilers and Options |
|
|
2 Compilers and Options |
|
|
3 Compiling For Multiple Architectures |
|
|
|
|
|
4 Installation Names |
|
|
|
|
|
5 Optional Features |
|
|
|
|
|
6 Specifying the System Type |
|
|
|
|
|
7 Sharing Defaults |
|
|
|
|
|
8 Operation Controls |
|
|
|
|
|
9 NGSPICE COMPILATION UNDER WINDOWS OS |
|
|
|
|
|
9.1 How to make ngspice with MINGW and MSYS |
|
|
|
|
|
9.2 make ngspice with MS Visual Studio 2022 |
|
|
|
|
|
9.3 make ngspice with pure CYGWIN |
|
|
|
|
|
9.4 ngspice console app with MINGW or CYGWIN |
|
|
|
|
|
9.5 cross compiling ngspice for Windows from LINUX |
|
|
|
|
|
10 NGSPICE COMPILATION UNDER macOS |
|
|
|
|
|
10.1 Use precompiled binary package |
|
|
|
|
|
10.2 Compile NGSPICE manually from a tarball |
|
|
|
|
|
10.3 Compile NGSPICE manually from git |
|
|
|
|
|
10.4 About compilers |
|
|
|
|
|
|
|
|
3 NGSPICE COMPILATION UNDER WINDOWS OS |
|
|
|
|
|
3.1 How to make ngspice with MINGW and MSYS |
|
|
|
|
|
3.2 make ngspice with MS Visual Studio 2022 |
|
|
|
|
|
3.3 make ngspice with pure CYGWIN |
|
|
|
|
|
3.4 ngspice console app with MINGW or CYGWIN |
|
|
|
|
|
3.5 cross compiling ngspice for Windows from LINUX |
|
|
|
|
|
4 NGSPICE COMPILATION UNDER macOS |
|
|
|
|
|
4.1 Use precompiled binary package |
|
|
|
|
|
4.2 Compile NGSPICE manually from a tarball |
|
|
|
|
|
4.3 Compile NGSPICE manually from git |
|
|
|
|
|
4.4 About compilers |
|
|
|
|
|
|
|
|
This file describes the procedures to install ngspice from sources. |
|
|
This file describes the procedures to install ngspice from sources. |
|
|
|
|
|
|
|
|
@ -133,7 +127,7 @@ This file describes the procedures to install ngspice from sources. |
|
|
|
|
|
|
|
|
1.3 Install from the git repository |
|
|
1.3 Install from the git repository |
|
|
|
|
|
|
|
|
This section describes how to install from source code taken directly |
|
|
|
|
|
|
|
|
This section describes how to install from source code taken directly |
|
|
from the git repository. It is intended for those who want to use the most |
|
|
from the git repository. It is intended for those who want to use the most |
|
|
recent enhancements of ngspice and for developers. For user install |
|
|
recent enhancements of ngspice and for developers. For user install |
|
|
instructions using source from a released distributions, please see the |
|
|
instructions using source from a released distributions, please see the |
|
|
@ -182,11 +176,8 @@ This file describes the procedures to install ngspice from sources. |
|
|
|
|
|
|
|
|
1.4 ngspice as a shared library |
|
|
1.4 ngspice as a shared library |
|
|
|
|
|
|
|
|
The relevant configure option for the ngspice shared library is: |
|
|
|
|
|
--with-ngshared |
|
|
|
|
|
(used instead of --with-x) |
|
|
|
|
|
--enable-cider |
|
|
|
|
|
may be selected optionally. |
|
|
|
|
|
|
|
|
The relevant configure options for the ngspice shared library are: |
|
|
|
|
|
$ --with-ngshared --enable-cider |
|
|
|
|
|
|
|
|
Typically the two aliases libngspice.so, libngspice.so.0 and the compiled |
|
|
Typically the two aliases libngspice.so, libngspice.so.0 and the compiled |
|
|
library libngspice.so.0.0.1 are made. The install locations depend on |
|
|
library libngspice.so.0.0.1 are made. The install locations depend on |
|
|
@ -277,7 +268,7 @@ This file describes the procedures to install ngspice from sources. |
|
|
"tclspice" is compiled and installed instead of |
|
|
"tclspice" is compiled and installed instead of |
|
|
plain ngspice. |
|
|
plain ngspice. |
|
|
|
|
|
|
|
|
1.5.3 Options Useful for Debugging Ngspice |
|
|
|
|
|
|
|
|
1.5.3 Options Useful for Debugging ngspice (but not used often) |
|
|
|
|
|
|
|
|
--enable-ansi |
|
|
--enable-ansi |
|
|
Configure will try to find an option for your compiler so that |
|
|
Configure will try to find an option for your compiler so that |
|
|
@ -305,7 +296,7 @@ This file describes the procedures to install ngspice from sources. |
|
|
Debug pole/zero code. |
|
|
Debug pole/zero code. |
|
|
|
|
|
|
|
|
--enable-sensdebug |
|
|
--enable-sensdebug |
|
|
Debug sensitivity code *SENSDEBUG*. |
|
|
|
|
|
|
|
|
Debug sensitivity code *SENSDEBUG*. |
|
|
|
|
|
|
|
|
--enable-smltmsdebug |
|
|
--enable-smltmsdebug |
|
|
Debug distortion code *SMALLTIMES* |
|
|
Debug distortion code *SMALLTIMES* |
|
|
@ -340,148 +331,16 @@ This file describes the procedures to install ngspice from sources. |
|
|
2 Compilers and Options |
|
|
2 Compilers and Options |
|
|
===================== |
|
|
===================== |
|
|
|
|
|
|
|
|
Some systems require unusual options for compilation or linking that |
|
|
|
|
|
the `configure' script does not know about. You can give `configure' |
|
|
|
|
|
initial values for variables by setting them in the environment. Using |
|
|
|
|
|
a Bourne-compatible shell, you can do that on the command line like |
|
|
|
|
|
this: |
|
|
|
|
|
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure |
|
|
|
|
|
|
|
|
|
|
|
Or on systems that have the `env' program, you can do it like this: |
|
|
|
|
|
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure |
|
|
|
|
|
|
|
|
|
|
|
On CentOS with older GCC it might be necessary to add -std=c99 |
|
|
On CentOS with older GCC it might be necessary to add -std=c99 |
|
|
to the CFLAGS in ./compile_linux.sh . |
|
|
to the CFLAGS in ./compile_linux.sh . |
|
|
|
|
|
|
|
|
3 Compiling For Multiple Architectures |
|
|
|
|
|
==================================== |
|
|
|
|
|
|
|
|
|
|
|
You can compile the package for more than one kind of computer at the |
|
|
|
|
|
same time, by placing the object files for each architecture in their |
|
|
|
|
|
own directory. To do this, you must use a version of `make' that |
|
|
|
|
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the |
|
|
|
|
|
directory where you want the object files and executables to go and run |
|
|
|
|
|
the `configure' script. `configure' automatically checks for the |
|
|
|
|
|
source code in the directory that `configure' is in and in `..'. |
|
|
|
|
|
|
|
|
|
|
|
If you have to use a `make' that does not supports the `VPATH' |
|
|
|
|
|
variable, you have to compile the package for one architecture at a time |
|
|
|
|
|
in the source code directory. After you have installed the package for |
|
|
|
|
|
one architecture, use `make distclean' before reconfiguring for another |
|
|
|
|
|
architecture. |
|
|
|
|
|
|
|
|
|
|
|
4 Installation Names |
|
|
|
|
|
================== |
|
|
|
|
|
|
|
|
|
|
|
By default, `make install' will install the package's files in |
|
|
|
|
|
`/usr/local/bin', `/usr/local/man', etc. You can specify an |
|
|
|
|
|
installation prefix other than `/usr/local' by giving `configure' the |
|
|
|
|
|
option `--prefix=PATH'. |
|
|
|
|
|
|
|
|
|
|
|
You can specify separate installation prefixes for |
|
|
|
|
|
architecture-specific files and architecture-independent files. If you |
|
|
|
|
|
give `configure' the option `--exec-prefix=PATH', the package will use |
|
|
|
|
|
PATH as the prefix for installing programs and libraries. |
|
|
|
|
|
Documentation and other data files will still use the regular prefix. |
|
|
|
|
|
|
|
|
|
|
|
In addition, if you use an unusual directory layout you can give |
|
|
|
|
|
options like `--bindir=PATH' to specify different values for particular |
|
|
|
|
|
kinds of files. Run `configure --help' for a list of the directories |
|
|
|
|
|
you can set and what kinds of files go in them. |
|
|
|
|
|
|
|
|
|
|
|
If the package supports it, you can cause programs to be installed |
|
|
|
|
|
with an extra prefix or suffix on their names by giving `configure' the |
|
|
|
|
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. |
|
|
|
|
|
|
|
|
|
|
|
When installed on MinGW with MSYS alternative paths are not fully supported. |
|
|
|
|
|
See 'How to make ngspice with MINGW and MSYS' below for details. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 Optional Features |
|
|
|
|
|
================= |
|
|
|
|
|
|
|
|
|
|
|
Some packages pay attention to `--enable-FEATURE' options to |
|
|
|
|
|
`configure', where FEATURE indicates an optional part of the package. |
|
|
|
|
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE |
|
|
|
|
|
is something like `gnu-as' or `x' (for the X Window System). The |
|
|
|
|
|
`README' should mention any `--enable-' and `--with-' options that the |
|
|
|
|
|
package recognizes. |
|
|
|
|
|
|
|
|
|
|
|
For packages that use the X Window System, `configure' can usually |
|
|
|
|
|
find the X include and library files automatically, but if it doesn't, |
|
|
|
|
|
you can use the `configure' options `--x-includes=DIR' and |
|
|
|
|
|
`--x-libraries=DIR' to specify their locations. |
|
|
|
|
|
|
|
|
|
|
|
6 Specifying the System Type |
|
|
|
|
|
========================== |
|
|
|
|
|
|
|
|
|
|
|
There may be some features `configure' can not figure out |
|
|
|
|
|
automatically, but needs to determine by the type of host the package |
|
|
|
|
|
will run on. Usually `configure' can figure that out, but if it prints |
|
|
|
|
|
a message saying it can not guess the host type, give it the |
|
|
|
|
|
`--host=TYPE' option. TYPE can either be a short name for the system |
|
|
|
|
|
type, such as `sun4', or a canonical name with three fields: |
|
|
|
|
|
CPU-COMPANY-SYSTEM |
|
|
|
|
|
|
|
|
|
|
|
See the file `config.sub' for the possible values of each field. If |
|
|
|
|
|
`config.sub' isn't included in this package, then this package doesn't |
|
|
|
|
|
need to know the host type. |
|
|
|
|
|
|
|
|
|
|
|
If you are building compiler tools for cross-compiling, you can also |
|
|
|
|
|
use the `--target=TYPE' option to select the type of system they will |
|
|
|
|
|
produce code for and the `--build=TYPE' option to select the type of |
|
|
|
|
|
system on which you are compiling the package. |
|
|
|
|
|
|
|
|
|
|
|
7 Sharing Defaults |
|
|
|
|
|
================ |
|
|
|
|
|
|
|
|
|
|
|
If you want to set default values for `configure' scripts to share, |
|
|
|
|
|
you can create a site shell script called `config.site' that gives |
|
|
|
|
|
default values for variables like `CC', `cache_file', and `prefix'. |
|
|
|
|
|
`configure' looks for `PREFIX/share/config.site' if it exists, then |
|
|
|
|
|
`PREFIX/etc/config.site' if it exists. Or, you can set the |
|
|
|
|
|
`CONFIG_SITE' environment variable to the location of the site script. |
|
|
|
|
|
A warning: not all `configure' scripts look for a site script. |
|
|
|
|
|
|
|
|
|
|
|
8 Operation Controls |
|
|
|
|
|
================== |
|
|
|
|
|
|
|
|
|
|
|
`configure' recognizes the following options to control how it |
|
|
|
|
|
operates. |
|
|
|
|
|
|
|
|
|
|
|
`--cache-file=FILE' |
|
|
|
|
|
Use and save the results of the tests in FILE instead of |
|
|
|
|
|
`./config.cache'. Set FILE to `/dev/null' to disable caching, for |
|
|
|
|
|
debugging `configure'. |
|
|
|
|
|
|
|
|
|
|
|
`--help' |
|
|
|
|
|
Print a summary of the options to `configure', and exit. |
|
|
|
|
|
|
|
|
|
|
|
`--quiet' |
|
|
|
|
|
`--silent' |
|
|
|
|
|
`-q' |
|
|
|
|
|
Do not print messages saying which checks are being made. To |
|
|
|
|
|
suppress all normal output, redirect it to `/dev/null' (any error |
|
|
|
|
|
messages will still be shown). |
|
|
|
|
|
|
|
|
|
|
|
`--srcdir=DIR' |
|
|
|
|
|
Look for the package's source code in directory DIR. Usually |
|
|
|
|
|
`configure' can determine that directory automatically. |
|
|
|
|
|
|
|
|
|
|
|
`--version' |
|
|
|
|
|
Print the version of Autoconf used to generate the `configure' |
|
|
|
|
|
script, and exit. |
|
|
|
|
|
|
|
|
|
|
|
`configure' also accepts some other, not widely useful, options. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 NGSPICE COMPILATION UNDER WINDOWS OS |
|
|
|
|
|
|
|
|
3 NGSPICE COMPILATION UNDER WINDOWS OS |
|
|
==================================== |
|
|
==================================== |
|
|
|
|
|
|
|
|
9.1 How to make ngspice with MINGW and MSYS2 |
|
|
|
|
|
|
|
|
3.1 How to make ngspice with MINGW and MSYS2 |
|
|
|
|
|
|
|
|
Creating ngspice with MINGW is a straight forward procedure, |
|
|
|
|
|
|
|
|
Creating ngspice with MINGW is a straight forward procedure, |
|
|
if you have MSYS2/MINGW installed properly. A modern environment is |
|
|
if you have MSYS2/MINGW installed properly. A modern environment is |
|
|
offered by MSYS2 (https://www.msys2.org/). An installation procedure for |
|
|
offered by MSYS2 (https://www.msys2.org/). An installation procedure for |
|
|
gcc in MSYS2 is decribed in |
|
|
gcc in MSYS2 is decribed in |
|
|
@ -493,14 +352,14 @@ This file describes the procedures to install ngspice from sources. |
|
|
Unfortunately compiling with MINGW is slow. Compiling with Visual Studio |
|
|
Unfortunately compiling with MINGW is slow. Compiling with Visual Studio |
|
|
may be more than 10 times faster! |
|
|
may be more than 10 times faster! |
|
|
|
|
|
|
|
|
Installing from the tarball, e.g. ngspice-44.tar.gz, is simple: After |
|
|
|
|
|
|
|
|
Installing from the tarball, e.g. ngspice-44.tar.gz, is simple: After |
|
|
expanding, you may just run ./compile_min.sh from the ngspice directory. |
|
|
expanding, you may just run ./compile_min.sh from the ngspice directory. |
|
|
|
|
|
|
|
|
The default installation location of ngspice is the Windows path |
|
|
|
|
|
|
|
|
The default installation location of ngspice is the Windows path |
|
|
C:\spice. The install path can be altered by passing --prefix=NEWPATH |
|
|
C:\spice. The install path can be altered by passing --prefix=NEWPATH |
|
|
as an argument to ./configure during the build process. |
|
|
as an argument to ./configure during the build process. |
|
|
|
|
|
|
|
|
Put the install path you desire inside "", e.g. "D:/NewSpice". Be |
|
|
|
|
|
|
|
|
Put the install path you desire inside "", e.g. "D:/NewSpice". Be |
|
|
careful to use forward slashes "/", not backward slashes "\" (something |
|
|
careful to use forward slashes "/", not backward slashes "\" (something |
|
|
still to be fixed). Then add --prefix="D:/NewSpice" as an argument to |
|
|
still to be fixed). Then add --prefix="D:/NewSpice" as an argument to |
|
|
./configure in the normal way. |
|
|
./configure in the normal way. |
|
|
@ -595,7 +454,7 @@ This file describes the procedures to install ngspice from sources. |
|
|
script compile_min_shared.sh. |
|
|
script compile_min_shared.sh. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9.2 make ngspice with MS Visual Studio 2022 |
|
|
|
|
|
|
|
|
3.2 make ngspice with MS Visual Studio 2022 |
|
|
|
|
|
|
|
|
ngspice may be compiled with MS Visual Studio 2022 or newer. |
|
|
ngspice may be compiled with MS Visual Studio 2022 or newer. |
|
|
|
|
|
|
|
|
@ -674,8 +533,7 @@ This file describes the procedures to install ngspice from sources. |
|
|
ngspice\visualc\sharedspice\ReleaseOMP.x64. |
|
|
ngspice\visualc\sharedspice\ReleaseOMP.x64. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9.3 make ngspice with pure CYGWIN |
|
|
|
|
|
|
|
|
3.3 make ngspice with pure CYGWIN |
|
|
|
|
|
|
|
|
If you don't have libdl.a you may need to link libcygwin.a |
|
|
If you don't have libdl.a you may need to link libcygwin.a |
|
|
to libdl.a symbolically. |
|
|
to libdl.a symbolically. |
|
|
@ -688,7 +546,7 @@ This file describes the procedures to install ngspice from sources. |
|
|
The procedure of compiling is the same as with OS Linux. |
|
|
The procedure of compiling is the same as with OS Linux. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9.4 ngspice console app with MINGW or CYGWIN |
|
|
|
|
|
|
|
|
3.4 ngspice console app with MINGW or CYGWIN |
|
|
|
|
|
|
|
|
Omitting the configure flag --with-wingui will yield a console ngspice. |
|
|
Omitting the configure flag --with-wingui will yield a console ngspice. |
|
|
You then will not have any graphics interface. In CYGWIN you may add --with-x |
|
|
You then will not have any graphics interface. In CYGWIN you may add --with-x |
|
|
@ -697,25 +555,25 @@ This file describes the procedures to install ngspice from sources. |
|
|
./configure --enable-cider --disable-debug CFLAGS=-m64 LDFLAGS=-m64 prefix=C:/Spice64 |
|
|
./configure --enable-cider --disable-debug CFLAGS=-m64 LDFLAGS=-m64 prefix=C:/Spice64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9.5 cross compiling ngspice for Windows from LINUX |
|
|
|
|
|
|
|
|
3.5 cross compiling ngspice for Windows from LINUX |
|
|
|
|
|
|
|
|
Two scripts are available in the ngspice directory that allow cross |
|
|
|
|
|
compiling for NMS Windows, if you are running LINUX. ngspice.exe or |
|
|
|
|
|
ngspice.dll may be made. For details please see cross-compile.sh or |
|
|
|
|
|
cross-compile-shared.sh. |
|
|
|
|
|
|
|
|
Two scripts are available in the ngspice directory that allow cross |
|
|
|
|
|
compiling for NMS Windows, if you are running LINUX. ngspice.exe or |
|
|
|
|
|
ngspice.dll may be made. For details please see cross-compile.sh or |
|
|
|
|
|
cross-compile-shared.sh. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 NGSPICE COMPILATION UNDER macOS |
|
|
|
|
|
================================== |
|
|
|
|
|
|
|
|
4 NGSPICE COMPILATION UNDER macOS |
|
|
|
|
|
================================== |
|
|
|
|
|
|
|
|
10.1 Use precompiled binary package |
|
|
|
|
|
|
|
|
4.1 Use precompiled binary package |
|
|
1. Install an X11 interface (like Xquartz) |
|
|
1. Install an X11 interface (like Xquartz) |
|
|
2. Packages are available from Homebrew or MacPorts |
|
|
2. Packages are available from Homebrew or MacPorts |
|
|
Install the downloaded NGSPICE package |
|
|
Install the downloaded NGSPICE package |
|
|
It may happen though that a package has been compiled without graphics support |
|
|
It may happen though that a package has been compiled without graphics support |
|
|
3. Open a terminal window and start using NGSPICE |
|
|
3. Open a terminal window and start using NGSPICE |
|
|
|
|
|
|
|
|
10.2 Compile NGSPICE manually from a tarball |
|
|
|
|
|
|
|
|
4.2 Compile NGSPICE manually from a tarball |
|
|
1. Install an X11 interface (like Xquartz) |
|
|
1. Install an X11 interface (like Xquartz) |
|
|
2. Install MacPorts from https://www.macports.org |
|
|
2. Install MacPorts from https://www.macports.org |
|
|
3. Execute this command: |
|
|
3. Execute this command: |
|
|
@ -730,7 +588,7 @@ cross-compile-shared.sh. |
|
|
6. Compile NGSPICE invoking "make -j4" |
|
|
6. Compile NGSPICE invoking "make -j4" |
|
|
7. Install NGSPICE invoking "make install" or "sudo make install" |
|
|
7. Install NGSPICE invoking "make install" or "sudo make install" |
|
|
|
|
|
|
|
|
10.3 Compile NGSPICE manually from git |
|
|
|
|
|
|
|
|
4.3 Compile NGSPICE manually from git |
|
|
1. Install an X11 interface (like Xquartz) |
|
|
1. Install an X11 interface (like Xquartz) |
|
|
2. Install MacPorts from https://www.macports.org |
|
|
2. Install MacPorts from https://www.macports.org |
|
|
3. Execute this command: |
|
|
3. Execute this command: |
|
|
@ -762,10 +620,10 @@ Resulting dependencies of ngspice |
|
|
/usr/lib/libSystem.B.dylib |
|
|
/usr/lib/libSystem.B.dylib |
|
|
/usr/local/lib/gcc/11/libgcc_s.1.dylib |
|
|
/usr/local/lib/gcc/11/libgcc_s.1.dylib |
|
|
|
|
|
|
|
|
10.4 About compilers |
|
|
|
|
|
A compile script compile_macos_clang.sh contains all necessary steps for compiling |
|
|
|
|
|
with the Xcode clang/llvm compiler. This compiler however does not support -fopenmp. |
|
|
|
|
|
Therefore you may download and install gcc, e.g. from Homebrew and run the new |
|
|
|
|
|
compile script compile_macos_gcc.sh. OpenMp enables parallel processing of |
|
|
|
|
|
BSIM3/4 model evaluation, thus speeding up simulation. |
|
|
|
|
|
|
|
|
4.4 About compilers |
|
|
|
|
|
A compile script compile_macos_clang.sh contains all necessary steps for compiling |
|
|
|
|
|
with the Xcode clang/llvm compiler. This compiler however does not support -fopenmp. |
|
|
|
|
|
Therefore you may download and install gcc, e.g. from Homebrew and run the new |
|
|
|
|
|
compile script compile_macos_gcc.sh. OpenMp enables parallel processing of |
|
|
|
|
|
BSIM3/4 model evaluation, thus speeding up simulation. |
|
|
|
|
|
|