📄 compiling_emc2.lyx
字号:
#LyX 1.3 created this file. For more info see http://www.lyx.org/\lyxformat 221\textclass book\language english\inputencoding default\fontscheme bookman\graphics default\float_placement h\paperfontsize 10\spacing single \papersize Default\paperpackage a4wide\use_geometry 0\use_amsmath 0\use_natbib 0\use_numerical_citations 0\paperorientation portrait\secnumdepth 5\tocdepth 5\paragraph_separation skip\defskip smallskip\quotes_language english\quotes_times 2\papercolumns 1\papersides 2\paperpagestyle default\layout ChapterCompiling from Source\layout SectionIntroduction\layout StandardThe third hurdle that you face when you begin to set up the EMC2 manually 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. Again the easiest install is the Live-CD.\layout StandardInstallation 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. \layout SectionEMC Download Page\layout StandardYou will find the most recent releases of EMC2 announced on the Download page at:\begin_inset LatexCommand \url{http://www.linuxcnc.org/index.php}\end_inset \layout StandardThe releases of EMC2 will be done in three ways the Live-CD, sources and binary package. The sources (described further on) consist of a tarball (emc2-version.tar.gz), which you should download and unpack into your home directory.\layout SectionEMC2 Release Description\layout StandardEMC2 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.\layout Standard\series bold Released\series default 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. \series bold "Released"\series default 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). \layout Standard\series bold Testing\series default is a version of EMC2 that is ready for "beta testing" but not for general release. Before a version is labeled \series bold testing\series default it will be known to compile and run on several different platforms, but there will probably be various limitations and known problems. The \series bold Testing\series default wiki page will attempt to list known problems and workarounds, but there will probably also be undiscovered bugs. Since \series bold Testing\series default is "beta" software, it should not be used for anything critical. Users of \series bold Testing\series default need to understand that it is beta software, and must be willing to give detailed bug reports if things go wrong. \series bold Testing\series default 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. \layout Standard\series bold TRUNK\series default is a CVS term for where all the primary development takes place. \series bold TRUNK\series default can be broken at any time. When \series bold TRUNK\series default reaches a state that is deemed worthy of testing by a larger number of people, the \series bold "Testing"\series default tag will be moved. This is an informal decision, made by consensus of lead developers, usually on IRC. Development will immediately continue, and \series bold TRUNK\series default will once again diverge from \series bold Testing\series default . \series bold TRUNK\series default has no "version number", and on a busy weekend it can literally change every 10 minutes. \layout SectionDownload and source preparation.\layout StandardThe following few section will describe how to get EMC2, and compile it.\layout StandardTo download, simply go to www.linuxcnc.org to the Download page, and get the latest release or testing tarball.\layout StandardOnce you have it, extract it to your home folder:\layout LyX-Code$ cd ~/\layout LyX-Code$ tar xzvf emc2-version.tar.gz\layout StandardNext you'll need to decide what kind of install you want. There are two ways to try EMC2 out:\layout DescriptionInstalled Like most other software on Linux, the files are placed in system directories, and is automatically available to all users of that computer.\layout DescriptionRun-in-place All the files for EMC2 are kept inside the \family typewriter emc2\family default directory. This is useful for trying out EMC2, especially when there is another version of EMC2 already installed on the system.\layout StandardThe pre-built packages for Ubuntu Linux use the \begin_inset Quotes eld\end_inset Installed\begin_inset Quotes erd\end_inset method\layout SubsectionDownloading the CVS version\layout StandardIf you wish to use the TRUNK version of EMC2 or the latest branch version of EMC2, please follow the instructions on our wiki site to obtain the source code: \layout Standard\begin_inset LatexCommand \url{http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?CVS}\end_inset \layout SectionInstalled\layout StandardEMC2 follows the standard way of compiling Linux software. To compile it simply go to the sources folder:\layout LyX-Code~$ cd ~/emc2/src\layout Standardand issue these commands:\layout LyX-Code~/emc2/src$ ./configure\layout LyX-Code~/emc2/src$ make && sudo make install\layout StandardTo run it simply type 'emc'.\layout SectionRun-in-place\layout StandardIf 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 , \family typewriter ~/emc2\family default in this example.\layout LyX-Code~$ cd ~/emc2/src\layout Standardand issue these commands:\layout LyX-Code~/emc2/src$ ./configure --enable-run-in-place\layout LyX-Code~/emc2/src$ make && sudo make setuid\layout StandardIn a shell session where you want to use the run-in-place version of EMC, execute\layout LyX-Code~/emc2/src$ . ~/emc2/scripts/emc-environment\layout StandardBy putting this command in a shell start-up script, such as \family typewriter ~/.bash_profile\family default , you do not need to manually run it in each terminal window.\layout Standard\begin_inset Notecollapsed false\layout Standardfind or make a reference to shell start up scripts\end_inset \layout StandardUntil you close that terminal, it will be set up so that the programs and manual pages from the Run-In-Place directory are available without referring to the path each time. After that you can run EMC2 by issuing:\layout LyX-Code~/emc2/src$ emc\layout SectionSimulator\layout StandardTo install EMC2 on a system without a real time kernel, add \family typewriter --enable-simulator\family default to the \family typewriter configure\family default command line. In this mode, EMC2 runs as a purely userspace program. No hardware can be controlled and real time scheduling is not guaranteed, but the other features of HAL, EMC and its various user interfaces are available. \begin_inset Notecollapsed false\layout Standardis the following line incorrect or is it in the wrong section???\end_inset When using \family typewriter --enable-run-in-place\family default , the \family typewriter sudo make setuid\family default step is not needed.\layout SectionEditing and Recompiling\layout StandardYou 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:\layout LyX-Code~$ cd ~/emc2/src\layout LyX-Code~/emc2/src$ make && sudo make install # for run-installed\layout LyX-Code~/emc2/src$ make && sudo make setuid # for run-in-place\layout LyX-Code~/emc2/src$ make # for run-in-place, simulator\layout StandardThe build process is smart enough to only rebuild things that are affected by your changes.\the_end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -