How to install EMC2 on Ubuntu 10.10 (x86_64) in simulator-only mode?

  1. Update your system. (This is done as a matter of precaution only.)

    sudo -s;
    apt-get update;
    apt-get upgrade;

  2. Reboot.
  3. 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;

  4. Download and install EMC2 sources.
    1. 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).
    2. Download and unpack the source package:

      cd /usr/local/src/;
      wget http://www.linuxcnc.org/lucid/dists/lucid/emc2.4/source/emc2_2.4.6.tar.gz;
      tar -xzf emc2_2.4.6.tar.gz;
      mv build/ emc2_2.4.6/; # All content got unpacked as build/ first, so tidy up.

  5. Compile EMC2 in simulator mode.
    1. Execute:

      cd /usr/local/src/emc2-2.4.6/src/;
      ./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/

    2. Execute:

      make clean;
      make;

    3. 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.

    4. 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 /usr/local/share/applications/ instead of /usr/local/src/.
  6. Run EMC2
    1. Run EMC2:

      cd /usr/local/src/emc2_2.4.6/;
      . ./scripts/emc-environment; # Note the additional dot and space before it; necessary!
      emc;

    2. 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: 

      #!/bin/bash
      ./usr/local/src/emc2-2.4.6/scripts/emc-environment;
      emc;

    3. 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:

      #!/bin/bash
      ./usr/local/share/applications/emc2-2.4.6/scripts/emc-environment;
      emc /usr/local/src/emc2-2.4.6/configs/sim/axis_mm.ini

    4.  


Posted

in

,

by

Tags:

Comments

2 responses to “How to install EMC2 on Ubuntu 10.10 (x86_64) in simulator-only mode?”

  1. M. Thomas

    I can’t get this to work. When installing the dependencies, I got this error:

    Package libreadline5-dev is not available, but is referred to by another package.

    However the following packages replace it:
    libreadline-gplv2-dev:i386 lib64readline-gplv2-dev:i386
    libreadline-gplv2-dev

    So I installed libreadline-gplv2-dev, however I then had undefined reference errors when it compiled. How do I fix this?

  2. Hemal

    There is a simple way to do this, get the install script file from http://linuxcnc.org/index.php?option=com_content&task=view&id=21&Itemid=4&lang=en, I used the ‘lucid-install’ file, execute as root, you have emc2 installed.
    I’ve not tried it on the machine yet.
    when you reboot choose the rtai kernel in GRUB menu, if GRUB menu is hidden and OS boots directly, press shift key to get the GRUB menu, and if you want to make the grub menu always visible
    go to /etc/default edit the grub file comment the GRUB_HIDDEN_TIMEOUT=0 line, save it and run the command update-grub

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.