Browse Source

Notes

master
pjotrp 3 years ago
parent
commit
6081bf394f
  1. 16
      DLANG.org
  2. 41
      HACKING.org
  3. 5
      INSTALL.org

16
DLANG.org

@ -57,21 +57,33 @@ env -i /bin/bash --login --noprofile --norc
cd /tmp/guix-build-ldc-$ver.drv-2/
. environment-variables
cd ldc-$ver
rm -rf CMakeFiles CMakeCache.txt
cmake .
make clean
make -j 24
make test -j 24
#+END_SRC sh
alternatively you may want to use a build container (no network by default)
alternatively you may want to use a build container (no network by default and note you need to pull
in all build dependencies)
#+BEGIN_SRC sh
~/.config/guix/current/bin/guix environment -C guix ldc clang llvm unzip gdb ncurses vim git cmake which less
~/.config/guix/current/bin/guix environment -C guix --ad-hoc ldc clang llvm unzip gdb ncurses vim git make cmake which less tzdata binutils
cd ldc-$ver
rm -rf CMakeFiles CMakeCache.txt
cmake .
make clean
make -j 24
#+END_SRC
to run the tests
: cmake .
to run one
: ctest -R dmd-testsuite-debug
to make one test set (note this is not in the build directory, but in the ldc source)
: make -j 24 phobos2-test-runner-debug

41
HACKING.org

@ -25,6 +25,7 @@
- [[#dependencies][Dependencies]]
- [[#building-the-package][Building the package]]
- [[#debugging-the-package][Debugging the package]]
- [[#log-files][Log files]]
- [[#environment][Environment]]
- [[#inside-guile-repl][Inside Guile (REPL)]]
- [[#using-the-debugger][Using the debugger]]
@ -379,10 +380,16 @@ The version is located in the package definition. E.g.
** Updating the HASH value
#+begin_src scheme
#+begin_src sh
guix download http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.3.tar.gz
#+end_src
if you have downloaded a package or checked out a git repo you can also do
#+begin_src sh
~/.config/guix/current/bin/guix hash /gnu/store/ddg95a3q30qiiqz4gdkmmldj46s9bfmp-gemma-gn2-0.98-6b1e007-checkout -r
#+end_src sh
** Use import to convert other packages from GNU, pypi, rubygems and Nix
Guix can read package definitions from other sources and write a Guix expression to stdout.
@ -454,6 +461,38 @@ the destination
#+end_src
* Debugging the package
** Log files
You can find the log files generated during the build process with
: guix build --log-file something
Ricardo wrote: does this also work for failed builds - without
rebuilding it again? It does seem to work. To test this I added
(error "foo") to a build phase in the “diamond” package and ran
: guix package -i diamond
This ends with
: Build failed: /gnu/store/wk9qbhmdzs62mp40casrndcgm3p50m3b-diamond-0.9.22.drv
: guix package: error: build failed: build of `/gnu/store/wk9qbhmdzs62mp40casrndcgm3p50m3b-diamond-0.9.22.drv' failed
So I ran
: guix build --log-file /gnu/store/wk9qbhmdzs62mp40casrndcgm3p50m3b-diamond-0.9.22.drv
which gave me
: /var/log/guix/drvs/wk/9qbhmdzs62mp40casrndcgm3p50m3b-diamond-0.9.22.drv.bz2
which contains the build log for this failed build, including the "foo"
error message.
I would like this error log file location to be shown unprompted, but
I think we would need to change build.cc, so that BuildError prints it
in addition to the error message.
** Environment
Before debugging it is important to have a clean environment.

5
INSTALL.org

@ -43,6 +43,7 @@
- [[#trouble-shooting][Trouble shooting]]
- [[#failed-to-connect-to-daemon][Failed to connect to daemon]]
- [[#x509-certificate-error][X.509 certificate error]]
- [[#guix-pull-error-git-error-the-ssl-certificate-is-invalid][guix pull: error: Git error: the SSL certificate is invalid]]
- [[#error-build-failed-substituter-substitute-died-unexpectedly][error: build failed: substituter `substitute' died unexpectedly]]
- [[#error-in-procedure-scm-error-no-code-for-module-gcrypt-hash][ERROR: In procedure scm-error: no code for module (gcrypt hash)]]
- [[#packagesscm-error][packages.scm error]]
@ -983,6 +984,10 @@ export GIT_SSL_CAINFO="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt${GI
export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs${SSL_CERT_DIR:+:}$SSL_CERT_DIR"
#+end_src
** guix pull: error: Git error: the SSL certificate is invalid
Solution, see above X.509 certificate error
** error: build failed: substituter `substitute' died unexpectedly
Make sure the keys are working. The real error appears to be related

Loading…
Cancel
Save