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
@@ -125,7 +125,7 @@ It takes many optional arguments.
125
125
List all arguments to `src/configure` by running this:
126
126
127
127
-----
128
-
$ cd linuxcnc-dev/src
128
+
$ cd linuxcnc-source-dir/src
129
129
$ ./configure --help
130
130
-----
131
131
@@ -142,8 +142,7 @@ The most commonly used arguments are:
142
142
these real-time kernels will also be enabled.
143
143
144
144
`--with-realtime=/usr/realtime-$VERSION`::
145
-
Build for the RTAI realtime platform using the older "kernel realtime"
146
-
model.
145
+
Build for the RTAI realtime platform using the older "kernel realtime" model.
147
146
This requires that you have an RTAI kernel and the RTAI modules
148
147
installed in `/usr/realtime-$VERSION`. The resulting LinuxCNC
149
148
executables will only run on the specified RTAI kernel. As of
@@ -180,7 +179,7 @@ Building just a specific target::
180
179
executable by running:
181
180
+
182
181
-----
183
-
$ cd linuxcnc-dev/src
182
+
$ cd linuxcnc-source-dir/src
184
183
$ make ../bin/froboz
185
184
-----
186
185
@@ -214,7 +213,7 @@ The first step is generating the Debian package scripts and meta-data
214
213
from the git repo by running this:
215
214
216
215
----
217
-
$ cd linuxcnc-dev/debian
216
+
$ cd linuxcnc-source-dir/debian
218
217
$ ./configure uspace
219
218
$ cd ..
220
219
----
@@ -235,21 +234,22 @@ $ dpkg-buildpackage -b -uc
235
234
236
235
[NOTE]
237
236
====
238
-
`dpkg-buildpackage` needs to run from the `linuxcnc-dev` directory, *not* from `linuxcnc-dev/debian`. +
237
+
`dpkg-buildpackage` needs to run from the `linuxcnc-source-dir` directory, *not* from `linuxcnc-source-dir/debian`. +
239
238
`dpkg-buildpackage` takes an optional argument `-jN` (where N is a number). This enables to run multiple jobs simultaneously.
240
239
====
241
240
242
241
[[debian-configure-arguments]]
243
-
==== `debian/configure` arguments
242
+
==== LinuxCNC's `debian/configure` arguments
244
243
245
-
The `debian/configure` script configures the Debian packaging.
246
-
It must be run before `dpkg-checkbuilddeps` and `dpkg-buildpackage` can be run.
244
+
The LinuxCNC source tree has a debian directory with all the info about how the Debian package shall be built,
245
+
but some key files within are only distributed as templates. The `debian/configure` script readies those build instructions
246
+
for the regular Debian packaging utilities and must thus be run prior to `dpkg-checkbuilddeps` or `dpkg-buildpackage`.
247
247
248
-
It takes a single argument which specifies the realtime or non-realtime platform to build for.
249
-
The normal values for this argument are:
248
+
The `debian/configure` script takes a single argument which specifies the underlying realtime or non-realtime platform to build for.
249
+
The regular values for this argument are:
250
250
251
251
`no-docs`::
252
-
Skip building documentation.
252
+
Skip building documentation.
253
253
254
254
`uspace`::
255
255
Configure the Debian package for Preempt-RT realtime or for
@@ -286,36 +286,43 @@ If you want just the traditional RTAI "kernel module" realtime, use
286
286
the test suite.
287
287
288
288
[[Satisfying-Build-Dependencies]]
289
-
== Satisfying Build Dependencies
289
+
==== Satisfying Build Dependencies
290
290
291
-
On Debian-based platforms we provide packaging meta-data that knows
292
-
what external software packages need to be installed in order to build
293
-
LinuxCNC. This is called the Build Dependencies of LinuxCNC. You can
294
-
use this meta-data to easily list the required packages missing from
295
-
your build system.
291
+
On Debian-based platforms we provide packaging meta-data that knows what
292
+
external software packages need to be installed in order to build LinuxCNC.
293
+
This is called the Build Dependencies of LinuxCNC. These differ between
294
+
platforms that LinuxCNC is configured for, so first run the following code
295
+
sniplet in the root of your LinuxCNC git checkout to generate its Debian
296
+
package meta-data:
296
297
297
-
Debian systems provide a program called `dpkg-checkbuilddeps` that
298
+
-----
299
+
$ cd linuxcnc-source-dir/debian
300
+
$ ./configure uspace
301
+
$ cd ..
302
+
-----
303
+
304
+
This generates the file `debian/control` in a user-readable yaml-format
305
+
which lists the build-dependencies close to the top.
306
+
You can use this meta-data to easily list the required packages missing from
307
+
your build system. You may decide to manually inspecting those files if you
308
+
have a good understanding what is already installed.
309
+
310
+
Alternatively, Debian systems provide a program called `dpkg-checkbuilddeps` that
298
311
parses the package meta-data and compares the packages listed as build
299
312
dependencies against the list of installed packages, and tells you
300
-
what's missing.
313
+
what's missing. Also, `dpkg-buildpackage` would inform you about what is missing,
314
+
and it should be fine, but it reports missing build-deps only after patches in debian/patches
315
+
are applied (if any), and if you are new to Linux and git version management,
316
+
for a clean start it may be preferable to check first.
301
317
302
-
First, install the `dpkg-checkbuilddeps` program by running:
318
+
Hereto, install the `dpkg-checkbuilddeps` program by running:
303
319
304
320
-----
305
321
$ sudo apt-get install dpkg-dev
306
322
-----
307
323
308
-
Then ask your LinuxCNC git checkout to generate its Debian package
309
-
meta-data:
310
-
311
-
-----
312
-
$ cd linuxcnc-dev/debian
313
-
$ ./configure uspace
314
-
$ cd ..
315
-
-----
316
-
317
324
Finally ask `dpkg-checkbuilddeps` to do its job (note that it needs to
318
-
run from the `linuxcnc-dev` directory, *not* from `linuxcnc-dev/debian`):
325
+
run from the `linuxcnc-source-dir` directory, *not* from `linuxcnc-source-dir/debian`):
319
326
320
327
-----
321
328
$ dpkg-checkbuilddeps
@@ -326,7 +333,53 @@ on your system, but that are not installed yet. Install them all with
326
333
`sudo apt-get install`, followed by the package names.
327
334
328
335
You can rerun `dpkg-checkbuilddeps` any time you want, to list any
329
-
missing packages.
336
+
missing packages, which has no effect on the source tree.
337
+
338
+
==== Options for `dpkg-buildpackage`
339
+
340
+
For a typical Debian package to build, you would run dpkg-buildpackage without any arguments.
341
+
As introduced above, the command has two extra options passed to it.
342
+
Like for all good Linux tools, the man page has all the details with `man dpkg-buildpackage`.
343
+
344
+
`-uc`:: Do not sign the resulting binaries. You would want to sign your packages with a GPG key of yours only if you would wanted to distribute them to others. Having that option not set and then failing to sign the package would not affect the .deb file.
345
+
346
+
`-b`:: Only compiled the architecture-dependent packages (like the `linuxcnc` binaries and GUIs). This is very helpful to avoid compiling what is hardware-independent, which for LinuxCNC is the documentation. That documentation is available online anyway.
347
+
348
+
If you happen to run into difficulties while compiling, check the LinuxCNC forum online.
349
+
Currently emerging is the support for the DEB_BUILD_OPTIONS environment variable.
350
+
Set it to
351
+
352
+
`nodocs`:: to skip the building of the documentation. This is yet mostly untested, the `-b` flag to dpkg-buildpackage has the same effect, albeit formally a different semantics.
353
+
354
+
`nocheck`:: to skip the self-tests of the LinuxCNC build process. This has no notable speed advantage but reduces the demand for a few software packages that may not be available for your system, i.e. the xvfb in particular. Do not set this unless running into difficulties with the dependencies.
355
+
356
+
An environment variable can be set together with the execution of the command, e.g.
0 commit comments