Building ASCEND

From ASCEND
Jump to: navigation, search

This page contains specific instructions for building ASCEND on systems that we know about. First you should read about our version management for information on how to get hold of the source code.

Building ASCEND requires the SCons build tool. In our opinion, SCons is a significant advance on Autotools, so we encourage you to give it a chance, if you're not familiar with it. If you are interested in the implementation details of our build scripts, please see our developer's manual.

Note: If you are having trouble building ASCEND, it might be worth checking out the BuildBot (link here) to see if the latest sources have compiled correctly on our test server.

General instructions

Building with SCons (as of Jun 2010, we recommend version 1.x) should be as simple as typing

scons

Get info on the current build options by typing scons -Qh. To clean up after your build, type scons -c. To include any building options, type scons followed by options. For instance, type scons WITH_LOCAL_HELP = /usr/local/share/ascend/manual.

Any build option that you see in scons -Qh can be entered into a file config.py that you can create in the root source directory (ie ~/src/ascend/trunk). For example, you might create a config.py file like this:

WITH_LOCAL_HELP = /usr/local/share/ascend/manual
DEFAULT_ASCENDLIBRARY = /usr/local/share/ascend/models

So, if you want to set configuration options so that they always get applied, edit your config.py file.

On top of that, you should also be aware that the SCons build will cache your build options in a file called options.cache. That means that if you type a scons command with command-line options, then later without those command line options, the options from the first run will still be there, because they will have been saved in the cache.

A major fiddle with SCons, especially on Windows, is ensuring that all the required programs are present in your path. You need to install Bison (from the GnuWin32 project). For SCons to run correctly from the MSYS command line, you will also need to add /c/Python25/Scripts:/c/Python25 to your path, so that the 'scons' script is discovered.

The SCons system will manage the building of FORTRAN components and is able to link to an installed version of CONOPT.

For instructions on building with Autotools, see the old versions of this page. We're not actively supporting the Autotools build any more.

Running scons will create a locally-executable version of ASCEND that can be run from the source tree (pygtk/ascdev or tcltk/generic/interface/ascend4, possibly subject to some environment variable settings. Alternatively, you can install ASCEND and run it from a 'proper' location such as ~/bin/ascend or /usr/bin/ascend, etc. To install files for ASCEND, run

scons install INSTALL_PREFIX=/usr/local

The above will install the PyGTK GUI at /usr/local/bin/ascend and the Tcl/Tk GUI at /usr/local/bin/ascend4. Other sensible values of INSTALL_PREFIX include ~/ascend or ~, which will install the PyGTK GUI at ~/ascend/bin/ascend and ~/bin/ascend respectively. These latter ones are good if you don't have root privileges on your system. There are a range of other INSTALL_* options available with our build script, type scons -qH to see them. Also note the importance of the ABSOLUTE_PATHS option for our build script. Note then when you run 'scons install' you don't get all the files in the model library, you only get a filter set according to the PACKAGE metafiles contained in the ModelLibrary.

Some more details on the implementation of the ASCEND build process via SCons is given in Developer's_Manual#Build_system.

Tcl/Tk GUI

In order to build the original Tck/Tk GUI, you need a Tcl/Tk distribution. Recently we have modified ASCEND so that it can run with Tcl/Tk 8.4. Standard Tcl/Tk binary packages can be used, such as those included in Fedora Core 5 (Note, the tcl-devel and tk-devel packages required as well). For Windows they available from ActiveState, see:

http://www.activestate.com/activetcl

At present, detection of Tcl/Tk is not particularly sophisticated. SConstruct just looks for tcl.h in your standard include path. So you might need to tweak. Check the scons -h list of configuration options for more. On Debian-based systems, try something like scons TCL_CPPPATH=/usr/include/tcl8.4

PyGTK GUI

You will need to have SWIG 1.3.24 or newer and Python 2.4 or newer installed. These are both easy to install for both Windows and Linux.

To run the PyGTK interface requires more dependencies, see the PythonWrapper page for full details.

Instructions for Linux

In general, see Prerequisites for Linux. You will be using scons to build ASCEND. We update these distribution-specific notes at the time that we implement support for that particular distro, so it's possible that if you're using an old distro, you may need to go back and use an old version of the code.

Ubuntu

Ubuntu 16.04 LTS

As of changeset 3106, ASCEND builds with

sudo apt-get install subversion gcc g++ gfortran flex bison scons swig doxygen \
 tcl8.5 tcl8.5-dev tk8.5 tk8.5-dev tk-table graphviz graphviz-dev \
 python2.7 python2.7-dev libgtk2.0-0 python-gtk2 python-matplotlib python-numpy ipython \
 liblapack-dev libblas-dev libsundials-serial-dev coinor-libipopt-dev \
 libcunit1-dev libmumps-seq-dev python-gtksourceview2
svn co http://svn.ascend4.org/trunk ascend
cd ascend
scons -j4
pygtk/ascdev models/johnpye/fprops/rankine_fprops.a4c -m rankine_water

As noted below, currently an earlier version of SUNDIALS is needed if you want to be able to run the IDA solver. Alternatively, you can use the ksenija2: branch, which has support for SUNDIALS 2.5.0 already (Ksenija can tell you more).

As noted below, ASCEND may have difficulties if your computer is in a locale where your decimal separate is not ".". See below for locale setting changes that can be made in that case, to work around this issue.

If you wish to install ASCEND properly on your system, use scons dist and our Template:Dtar tool to create .deb packages.

Ubuntu 14.04.4 LTS

The following packages are needed for setting up Ascend:

sudo apt-get install subversion gcc g++ gfortran flex bison scons swig doxygen \
 tcl8.5 tcl8.5-dev tk8.5 tk8.5-dev tk-table graphviz graphviz-dev \
 python2.7 python2.7-dev libgtk2.0-0 python-gtk2 python-matplotlib python-numpy ipython \
 liblapack-dev libblas-dev libsundials-serial-dev coinor-libipopt-dev \
 libcunit1-dev libmumps-seq-dev

If you want to use SUNDIALS you have to download version 2.4.0 from the SUNDIALS webpage: http://computation.llnl.gov/casc/sundials/download/download.php

tar xzf sundials-2.4.0.tar.gz
cd sundials-2.4.0
./configure
make
sudo make install

The installation process for Ascend looks as follows (go to your home folder /home/USERNAME/):

svn co http://svn.ascend4.org/trunk ascend

cd ascend/

scons $WITH_GRAPHVIZ = /usr/lib/graphviz WITH_DOC=0

The last command gives the following output:

scons: Reading SConscript files ...
{'DISTRIB_CODENAME': 'trusty', 'DISTRIB_RELEASE': '14.04', 'DISTRIB_ID': 'Ubuntu', 'DISTRIB_DESCRIPTION': '"Ubuntu 14.04.4 LTS"'}
GRAPHVIZ_LIBS = ['gvc', 'cgraph', 'cdt']
GRAPHVIZ_LIBPATH = None
GRAPHVIZ_CPPPATH = ['/usr/include/graphviz']
CHECKING SUNDIALS
SUNDIALS_LIBS = ['sundials_ida', 'sundials_nvecserial', 'm']
SUNDIALS_LIBPATH = ['/usr/local/lib']
SUNDIALS_CPPPATH = ['/usr/local/include']
IPOPT_LIBS = ['ipopt', 'lapack', 'dmumps', 'mpi', 'gfortran', 'gcc_s', 'quadmath', 'blas', 'm', 'dl']
IPOPT_LIBPATH = ['/usr/lib/gcc/x86_64-linux-gnu/4.8', '/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu', '/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib', '/lib/../lib', '/usr/lib/../lib', '/usr/lib/gcc/x86_64-linux-gnu/4.8/../../..']
IPOPT_CPPPATH = ['/usr/include/coin']
Checking C compiler ('gcc')... (cached) yes
Checking C++ compiler ('g++')... (cached) yes
Checking for AddressSanitizer... (cached) no
Checking for C header file stdio.h... (cached) yes
Checking size of unsigned long long ... (cached) yes
Checking size of unsigned long ... (cached) yes
Checking size of int ... (cached) yes
Checking size of void * ... (cached) yes
Checking size of long ... (cached) yes
Checking size of unsigned int ... (cached) yes
Checking size of long long ... (cached) yes
Checking for C function sprintf()... (cached) yes
Checking for erf... (cached) yes
Checking for C function strdup()... (cached) yes
Checking for C function snprintf()... (cached) yes
Checking for C function cpow()... (cached) yes
Checking for IEEE math library... (cached) yes
Checking for malloc...(cached) yes
Checking for C function isnan()... (cached) yes
Checking for GCC... (cached) yes
Checking for GCC 'visibility' capability... (cached) yes
Checking SIGINT is catchable... (cached) yes
Checking C99 FPE behaviour... (cached) yes
Checking signal handler reset... (cached) not required
Checking for Yacc ('bison')... (cached) yes
Checking for Lex ('flex')... (cached) yes
Checking for yylex_destroy... (cached) yes
Checking for tcl... (cached) yes
Checking Tcl version... (cached) 8.4.20, good
Checking for tk... (cached) yes
Checking Tk version... (cached) 8.4.20 (good)
Checking for libpython... (cached) yes
Checking version of SWIG... (cached) ok, 2.0.11
Checking for cunit... (cached) yes
Checking for graphviz cgraph... (cached) yes
Checking for graphviz 'boolean' definition... (cached) yes
Checking for cxsparse... (cached) no
Checking for SUNDIALS... 2.4.0, good
Checking for IDA... no
Checking for CONOPT... no
Checking for IPOPT... yes
Checking for C library blas... yes
Checking Fortran compiler ('gfortran')...yes
DYNAMIC TCL/TK PROGRAM LINKAGE
ASC4DEV
PYTHON_CPPPATH = ['/usr/include/python2.7']
OBJS = ['integrator.os', 'samplelist.os']
Skipping... BLAS won't be built: Found BLAS installed on system
Skipping... IDA won't be built: Unable to compile/link against SUNDIALS/IDA
FOUND 'PACKAGE' file in ....
Skipping... Windows installer isn't being built: NSIS not found
Skipping... Documentation isn't being built: disabled by with_doc
Building targets: /usr/lib/graphviz
scons: done reading SConscript files.
scons: Building targets ...
scons: `/usr/lib/graphviz' is up to date.
scons: done building targets.

The AddressSanitizer and cxsparse were experimental tools that could probably well be removed from ASCEND. The former was an attempt to track down some really tricky crashes when ASCEND was ported to 64-bit Windows. The latter was used to export matrices from the solver, for example for sparsity plotting and validation. CXSparse would actually be quite a useful basis for writing a new solver for ASCEND.

As mentioned above running scons will create a locally-executable version of ASCEND that can be run from the source tree (pygtk/ascdev or tcltk/generic/interface/ascend4; possibly subject to some environment variable settings).

scons

pygtk/ascdev PATHtoMODEL.a4c

You have to change the locale setting (e.g. en_US.UTF-8) which uses a point as a decimal separator when running Ascend otherwise you will get an error message which states that your system uses a comma character as a decimal separator. Restart your shell after changing your locale settings.

sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8


Alternatively, you can install ASCEND and run it from a 'proper' location such as ~/bin/ascend or /usr/bin/ascend, etc. To install files for ASCEND, run

scons install INSTALL_PREFIX=/usr/local

Read the General instructions paragraph for more information.

Ubuntu 13.10

At changeset 4605, ASCEND builds fine with the instructions for Ubuntu 12.04 LTS below. The modification to ipopt.pc is still required. This was tested on a 64-bit Ubuntu 13.10 system (in VirtualBox) and there is a still a 64-bit issue present in ASCEND at the current revision. We presume this is still some form of bug 564.

Ubuntu 12.04 LTS

Tested with trunk changeset 4077 on Ubuntu 12.04 LTS Precise (beta 2, 32-bit, VirtualBox), 11 Apr 2012.

sudo apt-get install subversion swig g++ gfortran python-dev scons flex bison \
 graphviz-dev libsundials-serial-dev liblapack-dev libblas-dev ipython \
 python-matplotlib coinor-libipopt-dev libmumps-seq-dev
svn co http://svn.ascend4.org/trunk/ ascend
cd ascend
scons
pygtk/ascdev models/johnpye/testlog10.a4c

IDA works correctly using the packaged versions from Ubuntu. To get support for IPOPT, you need to manually edit /usr/lib/pkgconfig/ipopt.pc and replace -ldmumps with -ldmumps_seq. See launchpad bug 978196. If you use libmumps-dev instead of libmumps-seq-dev you will get a crash, because ASCEND doesn't attempt to set up an MPI instance around IPOPT. CUnit works correctly following these instructions.

To enable building of the documentation (PDF from LyX sources) you also should install lyx and lmodern. Currently the documentation requires LyX 2.1, so in the case of Ubuntu 12.04, you will need to install this more recent version of LyX from ppa:lyx-devel/release.

We are still testing CONOPT and CMSlv.

Yet to test: dtar. Some new package dependencies (libmumps-seq-dev, and the changes to ipopt.pc) could make this difficult.

Ubuntu 11.10

Tested with trunk changeset 3840 on Ubuntu Oneiric 11.10 32-bit in a VirtualBox machine.

sudo apt-get install subversion swig g++ gfortran python-dev scons flex bison \
 graphviz-dev libsundials-serial-dev liblapack-dev libblas-dev ipython \
 python-matplotlib
svn co svn://ascend4.org/code/trunk ascend
cd ascend
scons
pygtk/ascdev models/johnpye/testlog10.a4c

There are some warnings 'Unable to locate theme engine in module_path: "pixmap"' if gtk-engines-pixbuf is not installed, but basically seems to be working fine. If you want to create a binary package suitable for this release,see dtar, but note that currently (Oct 2011) we haven't yet made the necessary changes to related debian file(s). Note that Oneiric comes with SWIG 1.3.40, so no problems with bug 517 at this stage.

Note yet tested: IDA, IPOPT, CONOPT, dtar.

Ubuntu 11.04

Tested with trunk changeset 3618 on Ubuntu Natty 11.04 32-bit.

sudo apt-get install subversion swig g++ gfortran python-dev scons flex bison \
 graphviz-dev libsundials-serial-dev liblapack-dev tcl8.5-dev tk8.5-dev \
 libtktable2.9 libblas-dev ipython python-matplotlib
scons -j2

Not yet tested: CONOPT, IPOPT, IDA, dtar. Otherwise all appears fine when running with pygtk/ascdev.

To install, try sudo scons install INSTALL_PREFIX=/usr/local. After that, you may need to export LD_LIBRARY_PATH=/usr/local/lib (or lib64) before it runs (with the command ascend).

An ASCEND package can be created using scons dist and dtar. This package seems to work fine, except for some missing integration into the new Unity GUI shell.

If IPOPT 3.9.x is also installed (see instructions for 10.04 below) then ASCEND will fail to load external libraries unless the correct LD_LIBRARY_PATH has bee set for IPOPT (/usr/lib/coin:/usr/lib/coin/ThirdParty). It is expected that testing with IPOPT 3.10 will resolve this problem.

Ubuntu 10.10

ASCEND compiles fine on Ubuntu 10.10, but you need to use the latest code from the 'trunk' of our subversion repo. Subversion r3082 corrects a bug that was preventing use of SCons 2.x, as supplied as part of this distro. Otherwise, required packages are the same as for 10.04, see below. It is recommended that all 'optional' packages are installed at the time of building ASCEND.

For IPOPT, which is an optional component of ASCEND, you should see the build instructions here.

It appears that in Ubuntu 10.10, GraphViz has been upgraded and is not longer compatible with ASCEND. ASCEND should build fine without it, although you will be missing the incidence graph feature as a result (see bug 443).

Ubuntu 10.04 LTS

For IPOPT, which is an optional solver that can be used by ASCEND, you should additionally see the build instructions here.

To build ASCEND on a clean Ubuntu 10.04 box, the following packages were required (as of trunk r2777):

sudo apt-get install subversion swig g++ gfortran python-dev scons flex bison

The following are optional but recommended:

sudo apt-get install graphviz-dev libsundials-serial-dev liblapack-dev tcl8.5-dev tk8.5-dev libtktable2.9 libblas-dev

Build ASCEND using

scons -j2

At runtime, the following packages will add capability to ASCEND:

sudo apt-get install ipython python-matplotlib

Kubuntu 10.04

Building on Kubuntu (KDE) is identical to Ubuntu (GNOME) with the exception that python-gtk2 and python-glade2 must be installed before running the resulting program. This was tested with trunk r3039. At this point in time, building also requires the package libgsl0-dev, because of some dependencies in FPROPS which need to be removed/made optional.

Ubuntu 8.04 LTS

ASCEND built fine on Ubuntu 8.0.4 LTS when we last tried it. Numerous prerequisites must be installed, but all of these except IPOPT and CONOPT are currently available from the Ubuntu repositories. Specifically, check libsundials-serial-dev, swig, flex, bison, python-dev, tk-dev, libtktable2.9. Haven't yet tested with CONOPT, so conditional modelling has not yet been checked.

Special treatment for the gfortran compiler is no longer required (as was required for Ubuntu 7.10).

Building of a .deb package can be performed using the dtar tool included in the source distribution. Usage: scons dist && ~/ascend/tools/dtar/dtar ~/ascend/dist/ascend-0.9.5.116.tar.bz2 ~/ascend/dist/debian.tar.gz.

Ubuntu 8.04 uses GtkSourceView2 instead of the earlier version, with the result that source code highlighting in GEdit using a different .lang file. We have written a new version of this file, see the page on syntax highlighting for more info.

Currently, LyX 1.5 is not available on Ubuntu, and the manual .lyx files require this newer version. So for the moment, you must use scons WITH_DOC_BUILD=0.

ASCEND has been runninng on earlier Ubuntu versions, right back to version 5.10.

Fedora / RHEL / CentOS

Fedora 20

Note: ASCEND is now included in the standard Fedora respositories! Thanks to Antonio Trande for his help with this! (Packaging details are here).

(We tested with 64-bit Fedora 20 in a VirtualBox VM). The following steps are required to build a local working copy of ASCEND:

sudo yum install @development-tools fedora-packager scons subversion tk-devel \
 flex bison gcc-gfortran gcc-c++ python-devel sundials-devel graphviz-devel \
 swig python-matplotlib ipython blas-devel pygtksourceview lyx \
 texlive-epstopdf coin-or-Ipopt-devel MUMPS-devel
svn co svn://ascend4.org/code/trunk ascend
cd ascend
scons -j2
pygtk/ascdev models/testlog10.a4c

Currently, the IPOPT and IDA solvers are not being built correctly. The former because IPOPT in Fedora 20 is parallel-only; no serial version provided. The latter because ASCEND (trunk code) is still requiring SUNDIALS 2.4.0, but Fedora 20 provides SUNDIALS 2.5.0. User:Ksenija did some work with SUNDIALS 2.5.0, which we need to integrate into trunk before this solver can be used again in this distro (or you can manually install the older SUNDIALS)

Fedora 18

(We tested with the 64-bit version with our trunk code at changeset 4424). First you need to build SUNDIALS 2.4.0. Follow the instructions at Building a SUNDIALS RPM for Fedora or download our RPMs which we have uploaded here.

Next you need IPOPT. Follow that link for build instructions, or see if there are suitable RPMs for your platform here.

The following steps will download and compile the ASCEND stuff:

sudo yum install @development-tools fedora-packager scons subversion tk-devel \
 flex bison gcc-gfortran gcc-c++ python-devel sundials-devel graphviz-devel \
 swig python-matplotlib ipython blas-devel pygtksourceview
svn co svn://ascend4.org/code/trunk ascend
cd ascend
scons -j2
pygtk/ascdev models/testlog10.a4c

You can install ASCEND as an RPM with the following extra steps:

sudo yum install lyx texlive-collection-fontsrecommended texlive-epstopdf textlive-ulem texlive-lm-math
scons dist

That should build a tarball including documentation PDF (that PDF is included in our tarballs, but this process builds the tarball from our SVN repository, which does not include the PDF). Then,

cd ~/rpmbuild/SOURCES
ln -s ~/ascend/dist/ascend-*.bz2
cd ~/rpmbuild/SPECS
ln -s ~/ascend/ascend.spec
rpmbuild -ba ascend.spec
sudo yum install ~/rpmbuild/RPMS/x86_64/ascend*.rpm

At this stage (changeset 4424), the ascend-tcltk package is not installing because of wrong permissions on libascendtcl.so (we think). But the PyGTK GUI (package 'ascend') is working fine.

Fedora 17

Our recent ASCEND solver IDA depends on SUNDIALS 2.4+ which is not yet available in the Fedora repositories. If we've built the right version for your architecture, you can possibly get the needed RPMs from here. Otherwise you need to build a SUNDIALS RPM as detailed here Building a SUNDIALS RPM for Fedora.

One that is done, follow instructions as for Fedora 16 (below).

Tktable appears not to be available by default in the Fedora repositories. A binary package may be available here: http://koji.fedoraproject.org/koji/packageinfo?packageID=3995. Not yet carefully tested.

IPOPT RPMs for Fedora 17 are here or see IPOPT to build your own.

Fedora 16

Tested with changeset 4018 on Fedora 16 64-bit in a VirtualBox VM. Builds and runs without problems. We recently put in place a workaround for bug 494 so that the current SWIG 2.0.4 with Fedora works.

First install needed packages:

yum install scons subversion tk-devel flex bison gcc-gfortran gcc-c++ python-devel sundials-devel graphviz-devel swig

Next build the code:

scons -j4

You might also want to install ipython and python-matplotlib to get some extra features in the PyGTK GUI.

The version of SUNDIALS in Fedora is still 2.3.0, which at changeset 4108 is too old now for ASCEND, since addition of IDA boundary detection that relies on SUNDIALS 2.4+. Also, IPOPT is not provided in the Fedora repositories, but 3.10.2 can be compiled manually and works with Fedora 16 without issues. Both of these issues make it difficult to release a nice package for ASCEND for this platform.

CentOS 5.6

The following steps have been tested using a clean virtual machine created using the CentOS 5.6 net installer for x86_64.

# log in as root...
su
yum install scons subversion tk-devel flex bison gcc-gfortran gcc-c++ python-devel sundials-devel graphviz-devel 
wget http://pkgs.repoforge.org/scons/scons-1.2.0-1.el5.rf.noarch.rpm
rpm -i scons-1.2.0-1.el5.rf.noarch.rpm
exit

Now, back as 'normal' user, obtain a copy of the ASCEND source code from our svn info as folder 'ascend' (we tried with trunk revision 3601), then

cd ascend
scons
# ascend now runs via 'pygtk/ascdev'

If you want to use Matplotlib for plotting in ASCEND with CentOS, try using http://repoforge.org/use/ and

install python-matplotlib python-numpy

Fedora 11

The following steps build ASCEND on a clean Fedora 11 machine (I tested using the Live CD installed to a qemu/kvm virtual machine):

su
yum install scons subversion tk-devel flex bison gcc-gfortran gcc-c++ python-devel sundials-devel graphviz-devel swig
scons

Currently (as of 16 Jun 2009), the above results in a error message from g++ while compiling the SWIG output. See bug 403. Testing on Windows has shown that SWIG 1.3.39 and 1.3.40 have this problem, but 1.3.36 does not have this problem. This bug is fixed in the pre-0.9.8 code from our SVN server.

Fedora 9

ASCEND builds without any problems on Fedora 9. You need to install several packages first, including swig, tk-devel, python-devel, scons, flex, bison, gcc-gfortran, gcc-c++. There may be some problems getting the GraphViz and CUnit-related functionality working, let us know if you have problems with that. -- JP, Jun 2008.

You can build an RPM version of ASCEND using scons dist followed by rpm -ta ascend-0.9.5.116.tar.bz2, providing you have RPM correctly set up. See also Building an RPM Package for ASCEND.

Raspbian (Raspberry Pi)

ASCEND works great on Raspberry Pi! We used the Ubuntu 12.04 instructions above, and everything basically just worked. We haven't yet succeeded in creating .deb packages, but the GUI and command-line tools all seem to work well (Mar 2015).

The following packages are needed for running Ascend under Raspbian:

sudo apt-get install subversion gcc g++ gfortran flex bison scons swig doxygen
sudo apt-get install tcl8.5 tcl8.5-dev tk8.5 tk8.5-dev tk-table graphviz graphviz-dev
sudo apt-get install python2.7 python2.7-dev libgtk2.0-0 python-gtk2 python-matplotlib python-numpy ipython
sudo apt-get install liblapack-dev libblas-dev
sudo apt-get install libsundials-serial-dev coinor-libipopt-dev
sudo apt-get install libcunit1-dev libmumps-seq-dev lyx

You can skip installing lyx and turn off installing the documentation for Ascend. This is recommended for new users as the whole latex+lyx toolchain is huge and shouldn't be necessary for starting with ascend. There are also version issues with LyX.

The installation process looks as follows (go to your home folder /home/USERNAME/):

svn co http://svn.ascend4.org/trunk ascend

cd ascend/

scons $WITH_GRAPHVIZ = /usr/lib/graphviz WITH_DOC=0

scons

or

scons install

OpenSUSE

OpenSUSE does not provide an up to date version of SCons (as of this writing, suse 10.2 comes with scons-0.96.91-37). You will need to download a newer version (0.96.93) (from SF.net. Do not try 0.97 SCons, as it is not yet supported by the ASCEND SConscripts on the SUSE platform.

Update (Mar 2010) it is suggested that you try latest SCons 1.x if possible, and report your experiences here.

Arch Linux

To build ASCEND on Arch Linux, follow these steps:

sudo pacman -S gcc gcc-fortran flex bison python scons swig tcl tk graphviz blas

Download and build sundials manually (see Prerequisites for Linux).

Then follow the General instructions (running scons and scons install).

If you have problem with SWIG 1.3.40 (scons reports that SWIG package was not found), download older version of SWIG(1.3.38 worked for me, 1.3.24 didn't) and build it manually (./configure, make, make install). Then re-run swig with parameter SWIG=/usr/local/bin/swig (or different location where you installed SWIG).

When running ascend script:

LDPATH = [INSTALL_LIB] + GTKLIBPATH + LDPATH
TypeError: can only concatenate list (not "NoneType") to list

LDPATH = [INSTALL_LIB] + GTKLIBPATH + LDPATH

if GTKLIBPATH:
	LDPATH = [INSTALL_LIB] + GTKLIBPATH + LDPATH
else:

	LDPATH = [INSTALL_LIB] + LDPATH

(found here).

Gentoo

Some details for build ASCEND on Gentoo Linux are on a sub-page at Building ASCEND/Gentoo.

Instructions for Windows

64-bit executable for 64-bit Windows, using MinGW-w64/MSYS

32-bit executable for 64-bit or 32-bit Windows, using MinGW/MSYS

ASCEND will also build using the standard MinGW 32-bit toolset. This is quite a bit easier than setting up the MinGW-w64 build environment because you can get your compiler and most of the needed tools using mingw-get. However, until we can update our instructions, it is suggested that you follow our instructions for the MinGW-w64, and just substitute 32-bit stuff wherever you see 64-bit stuff mentioned.

Using MSYS2

MSYS2 is a new generation of MSYS that works with the pacman package manager. This is new, and we're still experimenting!

This project is currently being worked on during Google Summer of Code 2016.

For details please see Implement MSYS2 based build process and improve packaging for Mac

pacman -Syu
pacman -S vim
pacman -S mingw-w64-x86_64-gtk2 mingw-w64-x86_64-gcc \ 
 mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-python2-numpy \ 
 mingw-w64-x86_64-python2-pygtk subversion swig \ 
 flex bison python2 scons pkgconfig \ 
 mingw-w64-i686-python2
svn co svn://ascend4.org/code/trunk ascend
cd ascend
scons

A challenge with this approach looks to be that it uses versions of Python and GTK2 that are not standard Windows system packages, so creating a distributable version of ASCEND will require rather a different set-up to the current approach (we will need to bundle all dependent packages). And if we do that, the resulting packages will not be compatible or interoperable with another Python installed on the user's system. But it still may be useful as a development tool/environment? Or maybe we should not recommend the 'standard' Python installer any more..?

Another challenge is that when installing 'scons' as above, it is tied to the MSYS version of Python, which is not the same as the MinGW64 version of Python for which the developer libraries are installed. So it's very problematic to build Python extensions using SWIG. However it may be a current area of development in MSYS2; we will have to wait and see.

Still to be resolved: the following packages don't yet exist in MSYS2, and would have to be built manually: graphviz-dev libsundials-serial-dev liblapack-dev libblas-dev ipython python-matplotlib coinor-libipopt-dev libmumps-seq-dev

MSVS and other compilers

Although 'libascend' has been built with Microsoft tools in the past, it's been a long time since we tested this, and so we don't currently support these compilers. They probably can be made to work, so if you make any progress with this please let us know.

Some very early efforts were made to support free Borland 5.5 were made; the core engine basically compiles but there is more work to be done. With MinGW now pretty complete and reliable, there's not much reason to bother with this.

We would be interested to know about efforts to build ASCEND with any other Windows-based compilers, especially anything that works well in a unified package management environment or an IDE.

Instructions for Mac

Mac OS X 10.5

ASCEND runs fine on Mac OS X 10.5, and probably other versions. Currently we haven't completed the job of bundling ASCEND into a convenient distributable form, but the work is now well underway. See Porting to Mac for details.

There has been no attempt to build or test the Tcl/Tk GUI on Mac at this stage.

See also