The third hurdle that you face when you begin to set up the EMC2 is getting and installing the EMC2 software itself. All of EMC2 has been placed on cvs.linuxcnc.org in a concurrent versioning (CVS) repository. EMC2 is also available as a precompiled package (for various platforms) for download from that site.
Installation can be a daunting task to people new to Linux. The hardest part is getting the Real Time Linux patch up and running. After that, installing EMC is pretty easy. With that said, we recently provided a completely new experience for users, they only need to install Ubuntu (a very friendly linux distribution), then run a single install script, and they already should have the Real Time part and EMC2 working. Information how to access this can be found on the www.linuxcnc.org page under Download.
You will find the most recent releases of EMC2 announced on www.linuxcnc.org. The releases of EMC2 will be done in two ways (sources and binary package). The sources (described furtheron) consist of a tarball (emc2-version.tar.gz), which you should download and unpack into your home directory.
EMC2 will be using a release model similar to (but simpler than) the one used by Debian. At any one time there will be three versions of EMC2. Debian uses "stable", "testing", and "unstable". We will be using "Released", "Testing", and "Head". For the latest information, click on the version you are interested in.
Released is exactly that, a released version of EMC2 with a version number. It is tested by both developers and beta users before being released, and is suitable for the average user. Most developers and IRC/mailing list regulars are able to help support people running a released version. "Released" is available in several forms, including .debs for Ubuntu and source tarballs for local compilation. There will be a debian repository which will always have the latest released version (and thus allows for easy upgrades from one stable release to the next).
Testing is a version of EMC2 that is ready for "beta testing" but not for general release. Before a version is labeled testing it will be known to compile and run on several different platforms, but there will probably be various limitations and known problems. The Testing wiki page will attempt to list known problems and workarounds, but there will probably also be undiscovered bugs. Since Testing is "beta" software, it should not be used for anything critical. Users of Testing need to understand that it is beta software, and must be willing to give detailed bug reports if things go wrong. Testing is available primarily as a tag in CVS, although for convenience of testers, a "testing" debian repository and/or tarballs may also be available. The EMC Board of Directors will decide when "Testing" is worthy of becoming "Released". This is a formal decision, made by motion and voting on the board mailing list or board IRC channel.
TRUNK is a CVS term for where all the primary development takes place. TRUNK can be broken at any time. When TRUNK reaches a state that is deemed worthy of testing by a larger number of people, the "Testing" tag will be moved. This is an informal decision, made by concensus of lead developers, usually on IRC. Development will immediately continue, and TRUNK will once again diverge from Testing. TRUNK has no "version number", and on a busy weekend it can literally change every 10 minutes.
The following few section will describe how to get EMC2, and compile it.
To download, simply go to www.linuxcnc.org to the Download page, and get the latest release or testing tarball.
Once you have it, extract it to your home folder:
$ tar xzvf emc2-version.tar.gz
If you wish to use the TRUNK version of emc2, please follow the instructions on our wiki to obtain the source code: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?CVS
EMC2 followes the standard way of compiling linux software. To compile it simply go to the sources folder:
If you want only to test the software before installing it, or if you're worried about overwriting an existing installation, there is a Run-In-Place (RIP) mode which you can try out. In this mode, there is no installation step, and no files are placed outside the top directory , ~/emc2 in this example.
To install EMC2 on a system without a realtime kernel, add -enable-simulator to the configure commandline. In this mode, EMC2 runs as a purely userspace program. No hardware can be controlled and realtime scheduling is not guaranteed, but the other features of HAL, EMC and its various user interfaces are available. When using -enable-run-in-place, the sudo make setuid step is unneeded.
You may need to recompile the EMC2 code for a number of reasons. You may have modified the source code, or you may have downloaded just a few new files. To recompile, do the following: