Installing OBC release 2.9
This page contains the materials and instructions you need to install release 2.9 of the Oxford Oberon-2 Compiler and associated programs on your own computer.
Note that there is a later release of the compiler
- Instructions for using the compiler are given in the user manual, which consists mainly of sections extracted from the lab manual for the Imperative Programming course.
- There is also a page with a general description of the compiler and associated tools, including licencing information and acknowledgements.
Compared with release 2.8, this new release features a simplified and hopefully more robust garbage collector, and fixes a number of minor problems in the JIT.
Debian, Ubuntu and similar x86 or amd64 Linux systems
The compiler and associated software is packaged as a Debian
archive that is installed under
You need the file (32 bits) or (64 bits).
Copy it to your machine, then issue the command
$ sudo dpkg -i obc_2.9.7_i386.deb
(or the equivalent for amd64). That's all there is to it!
Even on an amd64 system, the compiler implements the INTEGER type with 32 bits.
(This package was built on an Ubuntu 14.04 system.)
Other x86 Linux systems
The compiler and associated software is packaged as a binary
tarball, which can be installed in a place of your choice.
You need the file
$ tar xfz obc-linux-2.9.7.tar.gz $ cd obc-linux-2.9.7 $ ./configure $ make $ sudo make install
The above package was linked on an Ubuntu 14.04 system. If it doesn't work because you have a different version of glibc, let me know, and I'll see if we can do something about it.
The GUI debugger depends on the GTK libraries (including
gtksourceview-2.0) to display its interface, and you will need to have them installed in order to use it. If you have a recent version of the Gnome editor
gedit installed, then you probably have the necessary libraries already. On amd64 systems, you will need to build from source in order for the GUI to use the 64-bit version of the GTK libraries.
Raspberry Pi under Raspbian
The same as other Debian-based systems, except that you need the filefor the ARM architecture. Note: this build has no JIT translator but only a bytecode interpreter. Everything, including the debugger, still works, though. Watch out for the forthcoming release of version 3, which will feature a JIT for the ARM.
Other Unix systems
The source code for the compiler and associated software is
packaged as a source tarball. You need the file
INSTALL. Building the compiler
requires OCaml and TCL, both of which come as standard packages on all good Unix distributions. Building the debugger (which is selected by giving the option
--enable-debugger) requires development versions of the GTK libraries.
The bytecode interpreter assumes that pointers are 32 bits wide, and won't build on architectures that have 64-bit pointers. On common 64-bit architectures, however, it is simple to build it in 32-bit compatibility mode. Just specify
CC='gcc -m32' at the configure stage.
On x86 machines, the default runtime system includes a JIT translator. We don't have much experience yet with porting it to different Unix systems.
For all modern (read: 32-bit or 64-bit) Windows systems such as Windows 2000
and Windows XP, Windows Vista, Windows 7 (and probably Windows 8 (and very likely Windows 10)), you need the installer
obc at the Command Prompt.
Since Windows makes a fuss about installing applications that have not been digitally signed, I'll show you some screen shots so you know what to expect. The screenshots are from Windows 7; no doubt those from later versions of Windows will be similar but more scarily worded. If you download the installer, then double-click on the downloaded file, you will see this warning:
It's OK to click on Run here. Next you will see another warning:
You can safely click on Yes, and the installer will start.
From this point on, you can safely accept the default answer to every question.
The default is to install OBC under Program Files.
Ready to go.
Installation almost complete.
There's a README file that gives a few details.
The installer is finished; now you may have to restart Windows before using the compiler.
You need the package
/usr/local. To use the compiler, you'll need to have
/usr/local/bin in your path. You can set this up by including the line
in the file
- Programs that use SYSTEM.VAL to do unsafe type conversions between LONGREAL and LONGINT can result in bytecode that confuses the JIT's register allocator. Workaround: help out the register allocator by assigning the result of SYSTEM.VAL to a local variable.
- Bugfix: GC maps for dynamic arrays containing pointers; bugfix: taking address of a cast; bugfix: JIT runs out of registers.
- Bugfix: code buffer overflow handled bettter; bugfix: NIL is allowed as a procedural parameter; FOR loops with step 0 now result in a warning.
- Added XFlush call to XYPlane.
obdumpcopes with larger linecounts; bugfix: empty comments
(**); Windows runtimes are stripped to reduce executable sizes; minor build fixes.
- Bugfix: LEN(a, 0) is the first dimension; bugfix: constant folding of ASH function; changes needed to build on Raspberry Pi; fixed formatting of runtime errors reported via debugger; source files may have extension
.modin addition to
- Fixed a bug in the garbage collector; fixed rounding error that sometimes caused Random.Roll(n) to return n; a couple of other minor bug fixes.
- Improved code for array indexing; implemented missing LDIF and STIF instructions; added Mac OS build.