[Home]Debian Lenny Compile LinuxCNC

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org


1. Disabling parallel port module
2. Installing Deb Packages
3. Compiling EMC2
3.1. Getting source
3.1.1. Getting a copy of EMC2 source
3.1.2. Updating EMC2 source
3.2. Compiling
4. Running EMC2

This page describes how to prepare Debian Lenny to compile EMC2.

To compile EMC2, you need a RTAI patched RealTime kernel and RTAI modules. Install them and boot with RTAI kernel.
See Debian Lenny Compile RTAI for more information.

1. Disabling parallel port module

NOTE: EMC2's hal drivers that use the parport devices, are now able to cooperate with the Linux parallel port module.
This also means that the Linux parport number may be used to identify the port in 'loadrt hal_parport'".
If you use 2.4 or newer version of EMC2 and if you want to use the parallel port number instead of the parallel port address,
skip this step.

Disable the kernel parallel port module, if you want to use the parallel port through EMC2 and to prevent regular Linux programs from accessing the parallel port.

 su -
 echo install parport_pc /bin/true >/etc/modprobe.d/emc2
 rmmod parport_pc

2. Installing Deb Packages

Install the packages as root

aptitude update && aptitude safe-upgrade
aptitude install git-core \
                gitk \
                git-gui \
                autoconf \
                tk-dev \
                bwidget \
                build-essential \
                gettext \
                python-dev \
                libglu1-mesa-dev \
                libxmu-dev \
                libgtk2.0-dev \
                libgnomeprintui2.2-dev \
                libxaw7-dev \
                libncurses5-dev \
                libreadline5-dev \
                python-tk \
                python-imaging \
                python-imaging-tk \
                python-numarray \
                pciutils \
                libpci-dev \
                python-glade2 \
                python-xml \

If you want to build EMC2 in simulator mode too, install the following package

aptitude install libpth-dev

If you want to build the documentations too, install the following packages

aptitude install lyx \
                texlive-extra-utils \

Close root shell


Because of dependencies the following packages will be installed too

 autoconf		-> m4
 tk-dev			-> libice-dev libpthread-stubs0 libpthread-stubs0-dev libsm-dev libx11-dev libxau-dev
			-> libxcb-xlib0-dev libxcb1-dev libxdmcp-dev libxt-dev tcl-dev tcl8.4-dev tk
			-> tk8.4 tk8.4-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev xtrans-dev
 build-essential	-> binutils dpkg-dev g++ g++-4.3 gcc gcc-4.3 libc6-dev libgomp1 libstdc++6-4.3-dev
			-> libtimedate-perl linux-libc-dev make patch
 gettext		-> gettext-base libgomp1
 python-dev		-> python2.5-dev
 libglu1-mesa-dev	-> libgl1-mesa-dev mesa-common-dev
 libxmu-dev		-> libxext-dev libxmu-headers x11proto-xext-dev
 libgtk2.0-dev		-> debhelper html2text intltool-debian liba52-0.7.4 libatk1.0-dev libcairo2-dev libcompress-raw-zlib-perl
			-> libcompress-zlib-perl libdigest-hmac-perl libdigest-sha1-perl libdirectfb-dev libdirectfb-extra libexpat1-dev
			-> libfile-remove-perl libfontconfig1-dev libfreetype6-dev libglib2.0-dev libgtk2.0-dev libio-compress-base-perl
			-> libio-compress-zlib-perl libio-stringy-perl libjpeg62-dev libmail-box-perl libmail-sendmail-perl libmailtools-perl
			-> libmime-types-perl libmpeg3-1 libmpeg3-dev libobject-realize-later-perl libpango1.0-dev libpixman-1-dev
			-> libpng12-dev libsys-hostname-long-perl libsysfs-dev liburi-perl libuser-identity-perl libxcb-render-util0-dev
			-> libxcb-render0-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev
			-> libxml2-utils libxrandr-dev libxrender-dev pkg-config po-debconf x11proto-composite-dev x11proto-damage-dev
			-> x11proto-fixes-dev x11proto-randr-dev x11proto-render-dev x11proto-xinerama-dev zlib1g-dev
 libgnomeprintui2.2-dev	-> gnome-icon-theme libart-2.0-2 libart-2.0-dev libgail-common libgail-dev libgail18 libglade2-0
			-> libgnomecanvas2-0 libgnomecanvas2-common libgnomecanvas2-dev libgnomecups1.0-1 libgnomeprint2.2-0
			-> libgnomeprint2.2-data libgnomeprint2.2-dev libgnomeprintui2.2-0 libgnomeprintui2.2-common
			-> librsvg2-common libxml2-dev
 libxaw7-dev		-> libxpm-dev
 python-tk		-> blt
 python-numarray	-> libblas3gf libgfortran3 liblapack3gf
 pciutils		-> libpci3
 python-glade2		-> libffi5 python-cairo python-gobject python-gtk2 python-numeric
 libpth-dev		-> libpth20
 lyx			-> aspell aspell-en djvulibre-desktop doc-base dvipdfmx dvipng esound-clients esound-common evince
			-> fam gconf2 gconf2-common ghostscript gnome-keyring gnome-mime-data gnome-mount gs-common gsfonts
			-> hal hal-info imagemagick lacheck latex-beamer latex-xcolor latex-xft-fonts libaiksaurus-1.2-0c2a
			-> libaiksaurus-1.2-data libaspell15 libaudio2 libaudiofile0 libavahi-glib1 libbonobo2-0 libbonobo2-common
			-> libbonoboui2-0 libbonoboui2-common libboost-filesystem1.34.1 libboost-regex1.34.1 libboost-signals1.34.1
			-> libcupsimage2 libdbus-glib-1-2 libdjvulibre21 libeel2-2.20 libeel2-data libenchant1c2a libesd0 libfam0
			-> libfreezethaw-perl libgconf2-4 libgd2-noxpm libgnome-keyring0 libgnome-menu2 libgnome2-0 libgnome2-common
			-> libgnomeui-0 libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra libgraphviz4 libgs8
			-> libhal-storage1 libicu38 libidl0 libilmbase6 libjasper1 libkpathsea4 libltdl3 libmagick10 libmalaga7
			-> libmldbm-perl libmng1 libnautilus-extension1 libnotify1 libopenexr6 liborbit2 libpam-gnome-keyring
			-> libpaper-utils libpaper1 libpoppler-glib3 libpoppler3 libqt4-dbus libqt4-designer libqt4-network
			-> libqt4-qt3support libqt4-script libqt4-sql libqt4-sql-mysql libqt4-xml libqtcore4 libqtgui4 libsexy2
			-> libsmbclient libsmbios-bin libsmbios2 libspectre1 libsplashy1 libt1-5 libtalloc1 libuuid-perl
			-> libvoikko1 libwbclient0 libwmf0.2-7 libwnck-common libwnck22 libx86-1 libxres1 lmodern lyx-common
			-> notification-daemon pgf pm-utils portmap powermgmt-base preview-latex-style prosper ps2eps psfontmgr
			-> psutils qt4-qtconfig radeontool shared-mime-info tex-common texlive-base texlive-base-bin
			-> texlive-base-bin-doc texlive-common texlive-doc-base texlive-extra-utils texlive-fonts-recommended
			-> texlive-fonts-recommended-doc texlive-generic-recommended texlive-latex-base texlive-latex-base-doc
			-> texlive-latex-recommended texlive-latex-recommended-doc texlive-pstricks texlive-pstricks-doc tipa
			-> uswsusp vbetool xdg-utils
 groff			-> ghostscript-x gs libnetpbm10 netpbm

3. Compiling EMC2

You don't need to use root account to do the followings.

3.1. Getting source

3.1.1. Getting a copy of EMC2 source

EMC2 source is stored in a system called Git. Get a copy of EMC2 source from the git server.
Do this step only once. Don't repeat this step everytime you compile EMC2.

 mkdir emc2
 cd emc2
 git clone git://git.linuxcnc.org/git/emc2.git emc2-dev

3.1.2. Updating EMC2 source

 cd ~/emc2/emc2-dev
 git checkout master
 git pull --rebase

3.2. Compiling

Don't use EMC2 git directory to compile EMC2 if you want to keep this directory clean. Use its copy.

 cd ~/emc2
 cp -r emc2-dev myplace
 cd myplace/src
 ./autogen.sh ;# (not required on EMC2 2_3_X and earlier)
 ./configure --enable-run-in-place
 su -c "make setuid" 

if you want to build the documentations, use --enable-build-documentation with ./configure
if you want to build in simulator mode, use --enable-simulator with ./configure

NOTE: To compile a particular version of EMC2, use git checkout RELEASE_X_Y_Z after the cd myplace/src command.
For instance, to compile released version 2.3.3, use:
git checkout RELEASE_2_3_3

NOTE: Use EMC2 2.2.0 or newer in Debian Lenny.

4. Running EMC2

 source ~/emc2/myplace/scripts/emc-environment

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited March 9, 2010 6:25 am by Acemi (diff)
Published under a Creative Commons License