- Update your system. (This is done as a matter of precaution only.)
- Download and install build utilities and accessory.
sudo apt-get install \
build-essential crash kexec-tools makedumpfile \
libncurses5 libncurses5-dev binutils-dev libelf-dev asciidoc xmlto \
debhelper libpth-dev libgtk2.0-dev \
tcl8.5-dev tk8.5-dev bwidget python2.6-dev python-tk python-dev \
mesa-common-dev libglu1-mesa-dev libgtk2.0-dev libgnomeprintui2.2-dev \
libncurses5-dev libxaw7-dev gettext libreadline5-dev \
lyx texlive-extra-utils imagemagick groff;
- Download and install EMC2 sources.
- Look up the location of the source package for the latest EMC2 release. To do so, browse in http://www.linuxcnc.org/lucid/ (resp. supply the codename of the latest Ubuntu release supported by EMC2).
- Download and unpack the source package:
tar -xzf emc2_2.4.6.tar.gz;
mv build/ emc2_2.4.6/; # All content got unpacked as build/ first, so tidy up.
- Compile EMC2 in simulator mode.
./configure --enable-run-in-place --enable-simulator --with-tclConfig=/usr/lib/tcl8.5/tclConfig.sh --with-tkConfig=/usr/lib/tk8.5/tkConfig.sh --with-kernel-headers=/usr/src/linux-headers-2.6.33-29-realtime/
- It would be better to omit the “–run-in-place” argument to configure and later install the program with “checkinstall make install”. However, this produces the following error:
Makefile:410: *** You configured run-in-place, but are trying to install.
For an installable version, run configure without --enable-run-in-place and rebuild. Stop.
make: Leaving directory `/usr/local/src/emc2_2.4.6/src'
**** Installation failed. Aborting package creation.
- Note that you cannot move the directory with a “run-in-place” compiled EMC2 around after compiling, as EMC2 would not run any more. (There are some dependencies to Tcl/Tk stuff, using absolute paths.) So you better do that whole process in
- Run EMC2
- Run EMC2:
. ./scripts/emc-environment; # Note the additional dot and space before it; necessary!
- Remember to switch off compositing before running the “Axis” GUI. As with compositing, resizing the window can crash X11 and eventually your whole system.
Make it possible to run EMC2 more comfortably by creating an executeable file /usr/local/bin/emc with the following content:
- You can also have a similar file where you pass an argument to EMC2 to directly start with one of the example simulator configurations (or an own simulator configuration), by using content like this:
- Run EMC2: