The following build steps for Ubuntu 11.10 and 12.04 will also work for Ubuntu 10.04 with one principal difference. In Ubuntu 10.04 three packages must be installed to enable the git command set.
From the Installing LinuxCNC page,
sudo apt-get install git-core gitk git-gui
As well, for Ubuntu 10.04 it is not necessary to remove the tcl8.4 and tk8.4 packages before compilation.
There are no precompiled packages for 11.10. These steps will make a working simulator with a fresh Ubuntu 11.10 installation.
Credit goes to Anders Wallin who made the first steps with the simulator and 11.10.
sudo apt-get install gitIntall dpkg-dev.
sudo apt-get install dpkg-devMake a directory, for example git, in your favourite location.
mkdir gitGo into the git directory and get a copy of the LinuxCNC source.
cd git git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc
cd linuxcnc/debian ./configure simGo back to the linuxcnc folder and check dependencies
cd .. dpkg-checkbuilddepsWhich will output something similar to:
dpkg-checkbuilddeps: Unmet dependencies: debhe...Now the dependency check threw a number of missing artifacts, install them all with apt-get.
Editor's note 1: These are the packages I had to install to get it running. This list is illustrative but dependencies may well differ for your installation---it's best explicitly to check them as shown above.
sudo apt-get install libpth-dev dvipng tcl-dev tk-dev tcl8.4-dev tk8.4-dev bwidget libxaw7-dev libncurses-dev libreadline-dev asciidoc source-highlight dblatex groff python-dev python-tk python-lxml libglu1-mesa-dev libgl1-mesa-dev libgl1-mesa-swx11-dev libgtk2.0-dev libgnomeprintui2.2-dev autoconf libboost-python-dev texlive-lang-cyrillic
Editor's note 2: There can only be one libgl development package installed at the time. If there are any conflicts, remove (purge) the installed package and retry.
Editor's note 3: The apt-get install command above is almost working as is in a Ubuntu 12.04 as well. The libgl1-mesa-dev is provided in other packages, but apt-get will hint which one to install get it running. Install that package separately, remove libgl1-mesa-dev from the long install command and go for it. Please note that the extra packages needed might differ for your machine, depending on your setup and hardware.
Here's an example of a command that worked on 12.04:
sudo apt-get install libpth-dev dvipng tcl-dev tk-dev tcl8.4-dev tk8.4-dev bwidget libxaw7-dev libncurses-dev libreadline-dev asciidoc source-highlight dblatex groff python-dev python-tk python-lxml libglu1-mesa-dev libgl1-mesa-swx11-dev libgtk2.0-dev libgnomeprintui2.2-dev autoconf libboost-python-dev texlive-lang-cyrillic texlive-lang-french texlive-lang-german texlive-lang-spanish texlive-lang-polish libmodbus-dev python-support
When the command dpkg-checkbuilddeps returns silent you can go to next step.
The tcl8.4 and tk8.4 packages are only needed to get the dependencies check working, they will conflict with the configure.
Remove them again.
sudo apt-get purge tcl8.4-dev tk8.4-dev
Now it's finally time to compile linuxcnc
cd src ./autogen.sh ./configure --enable-simulator make
Add following to your path (such as .profile)
export PATH=$PATH:[path to the linuxcnc dir]/linuxcnc/scripts/rip-environment
Linuxcnc can now be started with the command
Don't forget to use a simulator configuration (sim tree in the config selector).