Building ASCEND

From ASCEND
Revision as of 23:09, 14 March 2012 by Jpye (talk | contribs) (Fedora 11)
Jump to navigation Jump to search

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

Building ASCEND (as of March 2006) 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

Python interface

See PythonWrapper for more information. 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 11.10

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

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn

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.

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn

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

There is currently a problem with building ASCEND on this platform, due to an error thrown by SWIG version 1.3.40 (ASCEND bug 403). This error is not seen when running SWIG version 1.3.38 or earlier. A temporary workaround is to install the Ubuntu Karmic version if SWIG, available from here. (this bug is now fixed in the subversion repo)

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):

  • subversion
  • swig (see note above)
  • g++
  • gfortran
  • python-dev
  • scons

The following are optional but recommended:

  • flex
  • bison
  • graphviz-dev
  • libsundials-serial-dev
  • liblapack-dev (used by IPOPT)
  • tcl8.5-dev
  • tk8.5-dev
  • libtktable2.9
  • libblas-dev

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

  • 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 9.10

Ongoing development of ASCEND is primarily done on this Ubuntu 9.10. Although ASCEND builds against the standard Ubuntu packages for Sundials, you will obtain better functionality with the IDA solver if you use a version built from latest 2.4.0 source code. The latest release fixes problems with boundary-crossing during integration.

To build ASCEND on a clean Ubuntu 9.10 box, the following packages are required (as of trunk r2667):

  • scons
  • swig
  • python-dev
  • scons
  • g++
  • gfortran

The following packages are optional:

  • libsundials-serial-dev
  • graphviz-dev
  • flex
  • bison
  • libblas-dev
  • tcl8.5-dev
  • tk8.5-dev
  • tktable2.9

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

  • ipython
  • python-matplotlib

For the IPOPT solver, you will also need to build that separately from source -- see IPOPT for details. For the CONOPT and CMSlv solvers, you must obtain libconsub3.so, see CONOPT for details.

Ubuntu 9.04

ASCEND should build on this system without any problems, providing the prerequisited that you need are installed. Watch closely the 'scons' output for fleeting comments which may suggest that you're missing a library or a header file, etc. Prereqs should be the same as for Ubuntu 8.04.

Note that after updating to Ubuntu 9.04, you will probably need to rebuild and reinstall things like IPOPT and CONOPT, as gfortran errors seem to arise otherwise.

For the IDA solver, you may need to add the scons option SUNDIALS_CPPPATH=/usr/include/sundials to make this integrator build correctly.

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.

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.

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn

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

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn

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

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn

Fedora 16

Fedora 16 builds ASCEND 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.

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):

Invalid language.

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn

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.

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 Genereal 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 &quot;NoneType&quot;) 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

The only currently-supported way to build ASCEND on Windows is using MinGW/MSYS and the GCC compiler. There has previously been partial success with the Microsoft compiler tools, but these are not currently actively being used or tested.

Windows 7 (64-bit target, with 64-bit Python and 64-bit GTK+)

This is now supported! See Building ASCEND for 64-bit Windows. We haven't yet released a binary though, due to a few minor outstanding tasks to do with building the installer package.

Windows 7 (32-bit target)

(ongoing!)

Windows 7 64-bit with 32-bit Python

We are currently in the process of testing the ASCEND build on 64-bit Windows 7, running via Virtual Box on a Dell Optiplex 980, with the host OS being Ubuntu 10.04.2 LTS.

  • install 'mingw-get-inst', selecting to install C, C++ and Fortran compilers, plus the MSYS Basic System and the MinGW Developer Toolkit.
  • install the win32svn package from SF.net
  • check out the source code from our svn trunk.
  • download Python 2.7.1 32-bit version and install with default settings. Python 3 is likely still to cause problems with our code, and we haven't tested it yet. We tried using the 64-bit version of Python 2.7.1, but SCons didn't seem to be able to detect it.
  • download Glade3 and install it.
  • download SCons 2.0.1 and install it by right-clicking and 'run as administrator' (note that failing to do this might have been the reason that we failed with the 64-bit version of Python, above -- if you get 64-bit Python to work, let us know).
  • Add c:\Python27 and c:\Python27\Scripts to your PATH.
  • download swigwin 1.3.40 and unzip it into your MSYS home directory, then add ~/swigwin-1.3.40 to your PATH.
  • download Flex 2.5.4a and Bison 2.4.1 from gnuwin32.sf.net, and install them. Add the c:\Program Files (x86)\GnuWin32\bin location to your PATH.
  • run scons from within your ASCEND working directory.
  • the build process completes successfully

To actually run the resulting binary, you need to also have PyGTK and GTK+ installed on your machine. The best way to do that is via the new PyGTK All-in-One installer.

The resulting binary can then be run from the MSYS prompt using the following, providing GTK is available in the PATH:

cd ~/ascend
pygtk/ascdev

We have a mechanism for building a installer for ASCEND on Windows that makes use of NSIS. We are in the process of testing it on Windows 7.

As an aside, the above highlights that it would be desirable to move from the use of libglade to GtkBuilder (as noted bug 493). We would then be able to use standard PyGTK installers again, rather than needing the huge PyGTK-All-In-One with the optional libglade.dll that it includes.

Windows XP with MinGW/MSYS

It is currently suggested that you attempt the same process as given above for Windows 7, instead of that given below.

The following instructions were tested on 32 bit Windows XP running on a DELL Precision (Core 2 Duo) machine in Nov 2009 and 32 bit Windows VISTA running on a ThinkPad X61 (Core 2 Duo) machine in March 2010.

First install the MinGW/MSYS environment. Download MinGW-5.1.6.exe, and select the basic options plus 'g++' (the C++ compiler). Then download and install MSYS-1.0.11.exe.

Now install Python-2.6.4.msi.

Install pywin32-214.win32-py2.6.exe.

Next, download and install SCons, scons-1.2.0.win32.exe.

Download swigwin-1.3.36 (later versions are OK) and unzip it in your root directory (it's just a folder with that name).

Download and install Flex (2.5.4a-1) and Bison (2.4.1) from GnuWin32, installing in the default location.

Download GFortran 'native installer' for MinGW from [1]. Our release was dated '2009-04-21'.

With a right-click on the My Computer icon, then in the Advanced tab, add the following to your PATH environment variable (no quotes): ';c:\Python26;c:\Python26\Scripts;c:\swigwin-1.3.36;c:\Program Files\GnuWin32\bin;C:\Program Files\gfortran\bin'. For Windows VISTA system, right-click on the Computer icon, choose Properties. In Advance System Settings, you can configure PATH environment variable.

Install NSIS 2.45.

Download 'book.pdf' and save it as 'book.pdf' in ~/ascend/doc.

In MSYS, run scons WITH_DOC_BUILD=0 installer.

The above will allow you to build ASCEND (and also to build the ASCEND installer using nsis/installer.nsi) but not to run it. For that, you additionally need to complete the following steps:

  • Download and install the GTK Glade3 windows installer [2]
  • Download and install PyGTK [3]
  • Download and install PyCairo [4]
  • Download and install PyGObject [5]

The above Glade3 installer should have added 'c:\Program Files\Gtk+\bin' to your PATH; you can check that if necessary.

To test the installer, it is recommended you remove GTK Glade3, PyGTK, PyCairo, PyGObject, Tcl/Tk and Python. Then run the installer, and it should discover all those missing things and proceed to reinstall them for you.

File:Mingw-1.png File:Mingw-6.png

SUNDIALS. If you want to use the IDA integrator (recommended) then you should download and install SUNDIALS. See building SUNDIALS on Windows.

Everything should build and you should end up with a file dist/ascend-{version}.exe which is your 'setup' program. Run that then find ASCEND in your Start menu.

MSVC

We don't currently support the use of Microsoft compilers. They probably can be made to work, but we don't see any good reason to work on that.

Windows / Borland C Builder

Some very early efforts to support free Borland 5.5 were made; the core engine basically compiles but there is more work to be done.

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