@@ -62,9 +62,6 @@ so you should log out and log back in.
62
62
Please refer to fanquake's instructions
63
63
[ here] ( https://github.com/fanquake/core-review/tree/master/guix ) .
64
64
65
- Note that the ` Dockerfile ` is largely equivalent to running through the binary
66
- tarball installation steps.
67
-
68
65
## Option 4: Using a distribution-maintained package
69
66
70
67
Note that this section is based on the distro packaging situation at the time of
@@ -74,25 +71,15 @@ https://repology.org/project/guix/versions
74
71
75
72
### Debian / Ubuntu
76
73
77
- Guix v1.2.0 is available as a distribution package starting in [ Debian
78
- 11] ( https://packages.debian.org/bullseye/guix ) and [ Ubuntu
79
- 21.04] ( https://packages.ubuntu.com/search?keywords=guix ) .
80
-
81
- Note that if you intend on using Guix without using any substitutes (more
82
- details [ here] [ security-model ] ), v1.2.0 has a known problem when building GnuTLS
83
- from source. Solutions and workarounds are documented
84
- [ here] ( #gnutls-test-suite-fail-status-request-revoked ) .
85
-
74
+ Guix is available as a distribution package in [ Debian
75
+ ] ( https://packages.debian.org/search?keywords=guix ) and [ Ubuntu
76
+ ] ( https://packages.ubuntu.com/search?keywords=guix ) .
86
77
87
78
To install:
88
79
``` sh
89
80
sudo apt install guix
90
81
```
91
82
92
- For up-to-date information on Debian and Ubuntu's release history:
93
- - [ Debian release history] ( https://www.debian.org/releases/ )
94
- - [ Ubuntu release history] ( https://ubuntu.com/about/release-cycle )
95
-
96
83
### Arch Linux
97
84
98
85
Guix is available in the AUR as
@@ -167,80 +154,41 @@ For reference, the graphic below outlines Guix v1.3.0's dependency graph:
167
154
168
155
![ bootstrap map] ( https://user-images.githubusercontent.com/6399679/125064185-a9a59880-e0b0-11eb-82c1-9b8e5dc9950d.png )
169
156
170
- #### Consider /tmp on tmpfs
171
-
172
- If you use an NVME (SSD) drive, you may encounter [ cryptic build errors] ( #coreutils-fail-teststail-2inotify-dir-recreate ) . Mounting a [ tmpfs at /tmp] ( https://ubuntu.com/blog/data-driven-analysis-tmp-on-tmpfs ) should prevent this and may improve performance as a bonus.
173
-
174
- #### Guile
175
-
176
- ##### Choosing a Guile version and sticking to it
177
-
178
- One of the first things you need to decide is which Guile version you want to
179
- use: Guile v2.2 or Guile v3.0. Unlike the python2 to python3 transition, Guile
180
- v2.2 and Guile v3.0 are largely compatible, as evidenced by the fact that most
181
- Guile packages and even [ Guix
182
- itself] ( https://guix.gnu.org/en/blog/2020/guile-3-and-guix/ ) support running on
183
- both.
184
-
185
- What is important here is that you ** choose one** , and you ** remain consistent**
186
- with your choice throughout ** all Guile-related packages** , no matter if they
187
- are installed via the distribution's package manager or installed from source.
188
- This is because the files for Guile packages are installed to directories which
189
- are separated based on the Guile version.
190
-
191
- ###### Example: Checking that Ubuntu's ` guile-git ` is compatible with your chosen Guile version
192
-
193
- On Ubuntu Focal:
157
+ If you do not care about building each dependency from source, and Guix is
158
+ already packaged for your distribution, you can easily install only the build
159
+ dependencies of Guix. For example, to enable deb-src and install the Guix build
160
+ dependencies on Ubuntu/Debian:
194
161
195
162
``` sh
196
- $ apt show guile-git
197
- Package: guile-git
198
- ...
199
- Depends: guile-2.2, guile-bytestructures, libgit2-dev
200
- ...
163
+ sed -i ' s|# deb-src|deb-src|g' /etc/apt/sources.list
164
+ apt update
165
+ apt-get build-dep -y guix
201
166
```
202
167
203
- As you can see, the package ` guile-git ` depends on ` guile-2.2 ` , meaning that it
204
- was likely built for Guile v2.2. This means that if you decided to use Guile
205
- v3.0 on Ubuntu Focal, you would need to build guile-git from source instead of
206
- using the distribution package.
168
+ If this succeeded, you can likely skip to section
169
+ [ "Building and Installing Guix itself"] ( #building-and-installing-guix-itself ) .
207
170
208
- On Ubuntu Hirsute:
209
-
210
- ``` sh
211
- $ apt show guile-git
212
- Package: guile-git
213
- ...
214
- Depends: guile-3.0 | guile-2.2, guile-bytestructures (> = 1.0.7-3~), libgit2-dev (> = 1.0)
215
- ...
216
- ```
217
-
218
- In this case, ` guile-git ` depends on either ` guile-3.0 ` or ` guile-2.2 ` , meaning
219
- that it would work no matter what Guile version you decided to use.
171
+ #### Guile
220
172
221
173
###### Corner case: Multiple versions of Guile on one system
222
174
223
- It is recommended to only install one version of Guile, so that build systems do
175
+ It is recommended to only install the required version of Guile, so that build systems do
224
176
not get confused about which Guile to use.
225
177
226
- However, if you insist on having both Guile v2.2 and Guile v3.0 installed on
227
- your system, then you need to ** consistently** specify one of
228
- ` GUILE_EFFECTIVE_VERSION=3.0 ` or ` GUILE_EFFECTIVE_VERSION=2.2 ` to all
178
+ However, if you insist on having more versions of Guile installed on
179
+ your system, then you need to ** consistently** specify
180
+ ` GUILE_EFFECTIVE_VERSION=3.0 ` to all
229
181
` ./configure ` invocations for Guix and its dependencies.
230
182
231
183
##### Installing Guile
232
184
233
- Guile is most likely already packaged for your distribution, so after you have
234
- [ chosen a Guile version] ( #choosing-a-guile-version-and-sticking-to-it ) , install
235
- it via your distribution's package manager.
236
-
237
185
If your distribution splits packages into ` -dev ` -suffixed and
238
186
non-` -dev ` -suffixed sub-packages (as is the case for Debian-derived
239
187
distributions), please make sure to install both. For example, to install Guile
240
- v2.2 on Debian/Ubuntu:
188
+ v3.0 on Debian/Ubuntu:
241
189
242
190
``` sh
243
- apt install guile-2.2 guile-2.2 -dev
191
+ apt install guile-3.0 guile-3.0 -dev
244
192
```
245
193
246
194
#### Mixing distribution packages and source-built packages
@@ -258,16 +206,16 @@ source-built packages, you will need to augment the `GUILE_LOAD_PATH` and
258
206
` GUILE_LOAD_COMPILED_PATH ` environment variables so that Guile will look
259
207
under the right prefix and find your source-built packages.
260
208
261
- For example, if you are using Guile v2.2 , and have Guile packages in the
209
+ For example, if you are using Guile v3.0 , and have Guile packages in the
262
210
` /usr/local ` prefix, either add the following lines to your ` .profile ` or
263
211
` .bash_profile ` so that the environment variable is properly set for all future
264
212
shell logins, or paste the lines into a POSIX-style shell to temporarily modify
265
213
the environment variables of your current shell session.
266
214
267
215
``` sh
268
- # Help Guile v2.2 .x find packages in /usr/local
269
- export GUILE_LOAD_PATH=" /usr/local/share/guile/site/2.2 ${GUILE_LOAD_PATH: +: } $GUILE_LOAD_PATH "
270
- export GUILE_LOAD_COMPILED_PATH=" /usr/local/lib/guile/2.2 /site-ccache${GUILE_LOAD_COMPILED_PATH: +: } $GUILE_COMPILED_LOAD_PATH "
216
+ # Help Guile v3.0 .x find packages in /usr/local
217
+ export GUILE_LOAD_PATH=" /usr/local/share/guile/site/3.0 ${GUILE_LOAD_PATH: +: } $GUILE_LOAD_PATH "
218
+ export GUILE_LOAD_COMPILED_PATH=" /usr/local/lib/guile/3.0 /site-ccache${GUILE_LOAD_COMPILED_PATH: +: } $GUILE_COMPILED_LOAD_PATH "
271
219
```
272
220
273
221
Note that these environment variables are used to check for packages during
@@ -352,7 +300,7 @@ Relevant for:
352
300
- Those installing ` guile-git ` from their distribution where ` guile-git ` is
353
301
built against ` libgit2 < 1.1 `
354
302
355
- As of v0.4.0 , ` guile-git ` claims to only require ` libgit2 >= 0.28.0 ` , however,
303
+ As of v0.5.2 , ` guile-git ` claims to only require ` libgit2 >= 0.28.0 ` , however,
356
304
it actually requires ` libgit2 >= 1.1 ` , otherwise, it will be confused by a
357
305
reference of ` origin/keyring ` : instead of interpreting the reference as "the
358
306
'keyring' branch of the 'origin' remote", the reference is interpreted as "the
@@ -366,20 +314,6 @@ Should you be in this situation, you need to build both `libgit2 v1.1.x` and
366
314
367
315
Source: https://logs.guix.gnu.org/guix/2020-11-12.log#232527
368
316
369
- ##### ` {scheme,guile}-bytestructures ` v1.0.8 and v1.0.9 are broken for Guile v2.2
370
-
371
- Relevant for:
372
- - Those building ` {scheme,guile}-bytestructures ` from source against Guile v2.2
373
-
374
- Commit
375
- [ 707eea3] ( https://github.com/TaylanUB/scheme-bytestructures/commit/707eea3a85e1e375e86702229ebf73d496377669 )
376
- introduced a regression for Guile v2.2 and was first included in v1.0.8, this
377
- was later corrected in commit
378
- [ ec9a721] ( https://github.com/TaylanUB/scheme-bytestructures/commit/ec9a721957c17bcda13148f8faa5f06934431ff7 )
379
- and included in v1.1.0.
380
-
381
- TL;DR If you decided to use Guile v2.2, do not use ` {scheme,guile}-bytestructures ` v1.0.8 or v1.0.9.
382
-
383
317
### Building and Installing Guix itself
384
318
385
319
Start by cloning Guix:
@@ -390,6 +324,7 @@ cd guix
390
324
```
391
325
392
326
You will likely want to build the latest release.
327
+ At the time of writing (November 2023), the latest release was ` v1.4.0 ` .
393
328
394
329
```
395
330
git branch -a -l 'origin/version-*' # check for the latest release
@@ -723,26 +658,18 @@ $ bzcat /var/log/guix/drvs/../...-foo-3.6.12.drv.bz2 | less
723
658
times, it may be `/tmp/...drv-1` or `/tmp/...drv-2`. Always consult the build
724
659
failure output for the most accurate, up-to-date information.
725
660
726
- ### openssl-1.1.1l and openssl-1.1.1n
727
-
728
- OpenSSL includes tests that will fail once some certificate has expired. A workaround
729
- is to change your system clock:
730
-
731
- ```sh
732
- sudo timedatectl set-ntp no
733
- sudo date --set "28 may 2022 15:00:00"
734
- sudo --login guix build --cores=1 /gnu/store/g9alz81w4q03ncm542487xd001s6akd4-openssl-1.1.1l.drv
735
- sudo --login guix build --cores=1 /gnu/store/mw6ax0gk33gh082anrdrxp2flrbskxv6-openssl-1.1.1n.drv
736
- sudo timedatectl set-ntp yes
737
- ```
738
-
739
661
### python(-minimal): [Errno 84] Invalid or incomplete multibyte or wide character
740
662
741
663
This error occurs when your `$TMPDIR` (default: /tmp) exists on a filesystem
742
664
which rejects characters not present in the UTF-8 character code set. An example
743
665
is ZFS with the utf8only=on option set.
744
666
745
- More information: https://bugs.python.org/issue37584
667
+ More information: https://github.com/python/cpython/issues/81765
668
+
669
+ ### openssl-1.1.1l and openssl-1.1.1n
670
+
671
+ OpenSSL includes tests that will fail once some certificate has expired.
672
+ The workarounds from the GnuTLS section immediately below can be used.
746
673
747
674
### GnuTLS: test-suite FAIL: status-request-revoked
748
675
@@ -778,13 +705,41 @@ authorized.
778
705
This workaround was described [here](https://issues.guix.gnu.org/44559#5).
779
706
780
707
Basically:
781
- 1. Turn off networking
782
708
2. Turn off NTP
783
709
3. Set system time to 2020-10-01
784
710
4. guix build --no-substitutes /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv
785
711
5. Set system time back to accurate current time
786
712
6. Turn NTP back on
787
- 7. Turn networking back on
713
+
714
+ For example,
715
+
716
+ ` ` ` sh
717
+ sudo timedatectl set-ntp no
718
+ sudo date --set " 01 oct 2020 15:00:00"
719
+ guix build /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv
720
+ sudo timedatectl set-ntp yes
721
+ ` ` `
722
+
723
+ # ### Workaround 3: Disable the tests in the Guix source code for this single derivation
724
+
725
+ If all of the above workarounds fail, you can also disable the ` tests` phase of
726
+ the derivation via the ` arguments` option, as described in the official
727
+ [` package`
728
+ reference](https://guix.gnu.org/manual/en/html_node/package-Reference.html).
729
+
730
+ For example, to disable the openssl-1.1 check phase:
731
+
732
+ ` ` ` diff
733
+ diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
734
+ index f1e844b..1077c4b 100644
735
+ --- a/gnu/packages/tls.scm
736
+ +++ b/gnu/packages/tls.scm
737
+ @@ -494,4 +494,5 @@ (define-public openssl-1.1
738
+ (arguments
739
+ ` (# :parallel-tests? #f
740
+ + # :tests? #f
741
+ # :test-target "test"
742
+ ` ` `
788
743
789
744
# ## coreutils: FAIL: tests/tail-2/inotify-dir-recreate
790
745
@@ -793,7 +748,7 @@ The inotify-dir-create test fails on "remote" filesystems such as overlayfs
793
748
as non-remote.
794
749
795
750
A relatively easy workaround to this is to make sure that a somewhat traditional
796
- filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds), see [/tmp on tmpfs](#consider-tmp-on-tmpfs) . For
751
+ filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds). For
797
752
Docker users, this might mean [using a volume][docker/volumes], [binding
798
753
mounting][docker/bind-mnt] from host, or (for those with enough RAM and swap)
799
754
[mounting a tmpfs][docker/tmpfs] using the `--tmpfs` flag.
0 commit comments