You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That will probably fail! That doesn't make you a bad person, it just
29
-
means you should read this whole document to find out how to fix your
30
-
problems. Especially the section on <<Satisfying-Build-Dependencies,
31
-
Satisfying Build Dependencies>>.
38
+
That will probably fail! That doesn't make you a bad person,
39
+
it just means you should read this whole document to find out how to fix your problems.
40
+
Especially the section on <<Satisfying-Build-Dependencies, Satisfying Build Dependencies>>.
32
41
33
42
If you are running on a realtime-capable system (such as an install from
34
43
the LinuxCNC Live/Install Image, see the <<sub:realtime,Realtime>> section
@@ -50,11 +59,8 @@ on <<Setting-up-the-environment,Setting up the test environment>>.
50
59
51
60
== Supported Platforms
52
61
53
-
The LinuxCNC project targets modern Debian-based distributions, including
54
-
Debian, Ubuntu, and Mint.
55
-
56
-
We continuously test on the platforms listed at
57
-
http://buildbot.linuxcnc.org.
62
+
The LinuxCNC project targets modern Debian-based distributions, including Debian, Ubuntu, and Mint.
63
+
We continuously test on the platforms listed at http://buildbot.linuxcnc.org.
58
64
59
65
LinuxCNC builds on most other Linux distributions, though dependency
60
66
management will be more manual and less automatic. Patches to improve
@@ -63,36 +69,34 @@ portability to new platforms are always welcome.
63
69
[[sub:realtime]]
64
70
=== Realtime
65
71
66
-
LinuxCNC is a machine tool controller, and it requires a realtime platform
67
-
to do this job. This version of LinuxCNC supports three realtime platforms
72
+
LinuxCNC is a machine tool controller, and it requires a realtime platform to do this job.
73
+
FIXME: Give a reference to a section to read this up.
74
+
This version of LinuxCNC supports three realtime platforms
68
75
69
76
RTAI::
70
-
From https://www.rtai.org. A Linux kernel with the RTAI patch is
71
-
available from the Debian archive at https://linuxcnc.org. See
72
-
<<cha:getting-linuxcnc,Getting LinuxCNC>> for installation instructions.
77
+
From https://www.rtai.org.
78
+
A Linux kernel with the RTAI patch is available from the Debian archive at https://linuxcnc.org.
79
+
See <<cha:getting-linuxcnc,Getting LinuxCNC>> for installation instructions.
73
80
74
81
Xenomai::
75
-
From https://xenomai.org. You will have to compile or obtain a Xenomai
76
-
kernel yourself.
82
+
From https://xenomai.org. You will have to compile or obtain a Xenomai kernel yourself.
77
83
78
84
Preempt-RT::
79
-
From https://rt.wiki.kernel.org. A Linux kernel with the
80
-
Preempt-RT patch is occasionally available from the Debian
81
-
archive at https://www.debian.org, and from the wayback machine at
82
-
https://snapshot.debian.org.
85
+
From https://rt.wiki.kernel.org.
86
+
A Linux kernel with the Preempt-RT patch is occasionally available from the Debian archive at https://www.debian.org, and from the wayback machine at https://snapshot.debian.org.
83
87
84
-
To make use of the realtime capabilities of LinuxCNC, certain parts of
85
-
LinuxCNC need to run with root privileges. To enable root for these
86
-
parts, run this extra command after the `make` that builds LinuxCNC:
88
+
To make use of the realtime capabilities of LinuxCNC, certain parts of LinuxCNC need to run with root privileges.
89
+
To enable root for these parts, run this extra command after the `make` that builds LinuxCNC:
87
90
88
91
-----
89
92
$ sudo make setuid
90
93
-----
91
94
95
+
FIXME: This does not belong here. Focus should be on building.
92
96
=== Non-realtime
93
97
94
-
LinuxCNC can also be built and run on non-realtime platforms, such as
95
-
a regular install of Debian or Ubuntu without any special realtime kernel.
98
+
LinuxCNC can also be built and run on non-realtime platforms,
99
+
such as a regular install of Debian or Ubuntu without any special realtime kernel.
96
100
97
101
In this mode LinuxCNC is not useful for controlling machine tools,
98
102
but it is useful for simulating the execution of G-code and for testing the non-realtime parts of the system
@@ -165,18 +169,15 @@ The most commonly used arguments are:
165
169
The `make` command takes two useful optional arguments.
166
170
167
171
Parallel compilation::
168
-
`make` takes an optional argument `-jN` (where N is a number).
169
-
This enables parallel compilation with N simultaneous processes, which
170
-
can significantly speed up your build.
172
+
`make` takes an optional argument `-j` _N_ (where _N_ is a number).
173
+
This enables parallel compilation with N simultaneous processes, which can significantly speed up your build.
171
174
+
172
-
A useful value for N is the number of CPUs in your build system. You can
173
-
discover the number of CPUs by running `nproc`.
175
+
A useful value for _N_ is the number of CPUs in your build system.
176
+
You can discover the number of CPUs by running `nproc`.
174
177
175
178
Building just a specific target::
176
-
If you want to build just a specific part of LinuxCNC, you can name
177
-
the thing you want to build on the `make` command line. For example,
178
-
if you are working on a component named `froboz`, you can build its
179
-
executable by running:
179
+
If you want to build just a specific part of LinuxCNC, you can name the thing you want to build on the `make` command line.
180
+
For example, if you are working on a component named `froboz`, you can build its executable by running:
180
181
+
181
182
-----
182
183
$ cd linuxcnc-source-dir/src
@@ -185,32 +186,31 @@ $ make ../bin/froboz
185
186
186
187
=== Building Debian Packages
187
188
188
-
When building Debian packages, the LinuxCNC programs are compiled from
189
-
source and then stored in a Debian package, complete with dependency
190
-
information. This takes more time, and the programs can't be used until
191
-
the Debian package is installed on a target machine.
189
+
When building Debian packages, the LinuxCNC programs are compiled from source and then stored in several Debian packages.
190
+
This packages separate different parts, like the documentation from the executables, and come with a description
191
+
of themselves that describes what the package is providing and what other packages are also required to be installed
192
+
to make use of what the package provides, i.e. the run-time dependencies.
193
+
The programs can't be used until the Debian package is installed on a target machine.
192
194
193
-
This build mode is primarily useful when packaging the software for
194
-
delivery to end users, and when building the software for a machine
195
-
that doesn't have the build environment installed, or that doesn't have
196
-
internet access.
195
+
To build packages is primarily useful when packaging the software for delivery to end users.
196
+
Developers among themselves exchange only the source code.
197
+
Also, when building the software for a machine that doesn't have the build environment installed,
198
+
or that doesn't have internet access, one happily accepts a prebuilt package.
197
199
198
-
Building Debian packages requires the `dpkg-buildpackage` tool, from the
199
-
`dpkg-dev` package:
200
+
Building Debian packages requires the `dpkg-buildpackage` tool, from the `dpkg-dev` package.
201
+
But when building a Debian package, is generally expected to have all scripts in place that would commonly be expected.
202
+
This has been formally manifested as a virtual "build-essential" package:
200
203
201
204
----
202
-
$ sudo apt-get install dpkg-dev
205
+
$ sudo apt-get install build-essential
203
206
----
204
207
205
-
Building Debian packages also requires that all build dependencies are
206
-
installed, as described in the section <<Satisfying-Build-Dependencies,
207
-
Satisfying Build Dependencies>>.
208
+
Building Debian packages also requires that all package-specific build dependencies are installed,
209
+
as described in the section <<Satisfying-Build-Dependencies,Satisfying Build Dependencies>>.
208
210
209
-
Once those prerequisites are met, building the Debian packages consists
210
-
of two steps.
211
+
Once those prerequisites are met, building the Debian packages consists of two steps.
211
212
212
-
The first step is generating the Debian package scripts and meta-data
213
-
from the git repo by running this:
213
+
The first step is generating the Debian package scripts and meta-data from the git repo by running this:
214
214
215
215
----
216
216
$ cd linuxcnc-source-dir/debian
@@ -235,7 +235,7 @@ $ dpkg-buildpackage -b -uc
235
235
[NOTE]
236
236
====
237
237
`dpkg-buildpackage` needs to run from the `linuxcnc-source-dir` directory, *not* from `linuxcnc-source-dir/debian`. +
238
-
`dpkg-buildpackage` takes an optional argument `-jN` (where N is a number). This enables to run multiple jobs simultaneously.
238
+
`dpkg-buildpackage` takes an optional argument ``-j``_N_ (where _N_ is a number). This enables to run multiple jobs simultaneously.
239
239
====
240
240
241
241
[[debian-configure-arguments]]
@@ -252,38 +252,32 @@ The regular values for this argument are:
252
252
Skip building documentation.
253
253
254
254
`uspace`::
255
-
Configure the Debian package for Preempt-RT realtime or for
256
-
non-realtime (these two are compatible).
255
+
Configure the Debian package for Preempt-RT realtime or for non-realtime (these two are compatible).
257
256
258
257
`noauto`::
259
258
`rtai`::
260
259
`xenomai`::
261
-
Normally, the lists of RTOSes for uspace realtime to support is detected
262
-
automatically. However, if you wish, you may specify one or more of these
263
-
after `uspace` to enable support for these RTOSes. Or, to disable
264
-
autodetection, specify `noauto`.
260
+
Normally, the lists of RTOSes for uspace realtime to support is detected automatically.
261
+
However, if you wish, you may specify one or more of these after `uspace` to enable support for these RTOSes.
262
+
Or, to disable autodetection, specify `noauto`.
265
263
+
266
-
If you want just the traditional RTAI "kernel module" realtime, use
267
-
`-r` or `$KERNEL_VERSION` instead.
264
+
If you want just the traditional RTAI "kernel module" realtime, use `-r` or `$KERNEL_VERSION` instead.
268
265
269
266
`rtai=<package name>`::
270
-
If the development package for rtai lxrt does not start with
271
-
"rtai-modules", or if the first such package listed by apt-cache search
272
-
is not the desired one, then explicitly specify the package name.
267
+
If the development package for rtai lxrt does not start with "rtai-modules",
268
+
or if the first such package listed by apt-cache search is not the desired one,
269
+
then explicitly specify the package name.
273
270
274
271
`-r`::
275
272
Configure the Debian package for the currently running RTAI kernel.
276
-
You must be running an RTAI kernel on your build machine for this
277
-
to work!
273
+
You must be running an RTAI kernel on your build machine for this to work!
278
274
279
275
`$KERNEL_VERSION`::
280
-
Configure the debian package for the specified RTAI kernel version
281
-
(for example "3.4.9-rtai-686-pae"). The matching kernel headers
282
-
debian package must be installed on your build machine (for example
283
-
"linux-headers-3.4.9-rtai-686-pae"). Note that you can _build_
284
-
LinuxCNC in this configuration, but if you are not running the
285
-
matching RTAI kernel you will not be able to _run_ LinuxCNC, including
286
-
the test suite.
276
+
Configure the debian package for the specified RTAI kernel version (for example "3.4.9-rtai-686-pae").
277
+
The matching kernel headers debian package must be installed on your build machine (for example "linux-headers-3.4.9-rtai-686-pae").
278
+
Note that you can _build_ LinuxCNC in this configuration,
279
+
but if you are not running the matching RTAI kernel you will not be able to _run_ LinuxCNC,
280
+
including the test suite.
287
281
288
282
[[Satisfying-Build-Dependencies]]
289
283
==== Satisfying Build Dependencies
@@ -315,25 +309,23 @@ and it should be fine, but it reports missing build-deps only after patches in d
315
309
are applied (if any), and if you are new to Linux and git version management,
316
310
for a clean start it may be preferable to check first.
317
311
318
-
Hereto, install the `dpkg-checkbuilddeps` program by running:
312
+
The `dpkg-checkbuilddeps` (also from the dpkg-dev package that is installed as part of the build-essential dependencies)
313
+
program can be ask `dpkg-checkbuilddeps` to do its job
314
+
(note that it needs to run from the `linuxcnc-source-dir` directory, *not* from `linuxcnc-source-dir/debian`):
319
315
320
316
-----
321
-
$ sudo apt-get install dpkg-dev
317
+
$ dpkg-checkbuilddeps
322
318
-----
323
319
324
-
Finally ask `dpkg-checkbuilddeps` to do its job (note that it needs to
325
-
run from the `linuxcnc-source-dir` directory, *not* from `linuxcnc-source-dir/debian`):
320
+
It will emit a list of packages that are required to build LinuxCNC on your system, but that are not installed yet.
321
+
You can now install missing build-dependencies
326
322
327
-
-----
328
-
$ dpkg-checkbuilddeps
329
-
-----
323
+
manually:: Install them all with `sudo apt-get install`, followed by the package names.i
324
+
You can rerun `dpkg-checkbuilddeps` any time you want, to list any missing packages, which has no effect on the source tree.
330
325
331
-
It will emit a list of packages that are required to build LinuxCNC
332
-
on your system, but that are not installed yet. Install them all with
333
-
`sudo apt-get install`, followed by the package names.
326
+
automated:: Run `sudo apt build-dep .` .
334
327
335
-
You can rerun `dpkg-checkbuilddeps` any time you want, to list any
336
-
missing packages, which has no effect on the source tree.
328
+
If in doubt about what a particular package of a build-dep may be providing, check out the package's description with ``apt-cache show`` _packagename_.
0 commit comments