It's useful to see the link directives and other options passed to the
compiler when debugging build issues.
* guix/build/meson-build-system.scm (build): Invoke ninja with its --verbose
option.
Change-Id: Iab11eeb29351a1d6a954576e3a916e2d536058d9
(cherry picked from commit d9b9670b05)
Fixesguix/guix#1162.
This solves two issues: Not having to wait for the network timeout (same as the
nodownload) option and also disabling meson to fall back to predownloaded
subprojects.
If desired, this behaviour can be overridden by adding --wrap-mode=MODE to #:configure-flags.
* guix/build/meson-build-system.scm (configure): Add --wrap-mode=nofallback.
Change-Id: Ibf1d6ac60a4c47cd71574a96ceb8773e6d8cf60b
(cherry picked from commit fe8dded27f)
* guix/build-system/mix.scm (mix-build): Add test-flags keyword
argument and pass it on.
* guix/build/mix-build-system.scm (check): Add test-flags keyword
argument and pass it to Mix.
Change-Id: Ib8243aaaf7a7d02df993cee44f33b36566049e83
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The current error is very uninformative, use a proper exception to
give more information when this happens:
`In procedure map: Wrong type argument: #f`
After this patch:
`In procedure raise-exception:
ERROR:
1. &no-wheels-found`
* guix/build/pyproject-build-system.scm (&no-wheels-found): Add exception.
(install): Handle exception.
Change-Id: Ie72d3b50dfededb2d598162672cdb4321c42b632
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
In some rare cases, the dest-path can be an elf-file, which are
unreadable by substitute*, leading to an error instead of just
continuing which makes more sense in this case.
* guix/build-system/pyproject.scm (check): Guard substitution attempt
with basic readability guarantees.
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Using rename-file, the destination had to be empty otherwise it would error
out. This has been fixed by the use of copy-recursively, really merging them.
Changing this makes merge-directories mostly a duplicate of
copy-recursively, thus fully switch to copy-recursively.
* guix/build/pyproject-build-system.scm (install)
<python-hashbang>: Remove it, used only once.
<merge-directories>: Remove it, replace its calls by copy-recursively
and delete-file-recursively.
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/build/pyproject-build-system(check): Add python test-backend.
This will help in cases where a simple `python -m module args` call has
to be made instead of fully replacing the 'check phase, e.g. unittest
or django. This is never enabled unless #:test-backend 'python is set,
so it doesn't break anything.
As an example, the following snippet...
(arguments
(list #:phases #~(modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "python" "-m" "unittest"
"diff_match_patch.tests")))))))
...can be transformed like this:
(arguments
'(#:test-backend 'python
#:test-flags (list "-m" "unittest" "diff_match_patch.tests")))
Change-Id: I4919a3e01d64864e3c328609fbcce7df5b3dfe51
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/build/pyproject-build-system.scm: Hide the 'delete' symbol from
the imported (guix build utils) module to avoid a naming clash warning.
Change-Id: I48f97bf29b5282de1440c68d533c8300d4d11362
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Using rename-file, the destination had to be empty otherwise it would
error out. By using copy-recursively, a directory can be copied onto a
pre-existing directory, really merging them. This problem manifested
itself attempting to build the python-pyre package.
Solving #596.
* guix/build/pyproject-build-system.scm (install)
<merge-directories>: Use copy-recursively instead of rename-file.
Change-Id: Iceb8609a86f29b17e5fbe6a9629339d0bc26e11f
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
The change was automated via:
git grep -l maxim.cournoyer@gmail.com |
xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'
* .mailmap: New entry.
Change-Id: Iaa88b1e51c94159c49138fb43910badb990eb169
* guix/build/emacs-utils.scm (emacs-makeinfo): New variable.
* gnu/packages/emacs-xyz.scm (emacs-show-font, emacs-mct, emacs-corfu)
(emacs-cape, emacs-embark, emacs-orderless, emacs-consult, emacs-marginalia)
(emacs-logos, emacs-tmr, emacs-beframe, emacs-tempel, emacs-lin, emacs-pulsar)
(emacs-dired-preview, emacs-modus-themes, emacs-org-glossary, emacs-vertico)
(emacs-org-margin, emacs-osm)[#:phases]<makeinfo>: Use it.
Move before ‘install’ if it was previously after ‘install’.
* guix/build/tree-sitter-build-system.scm (install): Switch to
building with -std=c11.
Fixes: guix/guix#2215
Change-Id: I04f3ede07aeaaa9cf95272611d6346295f603b69
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
* guix/build/download.scm (url-fetch): don't pass the return value from a
content-addressed-mirror procedure to 'string->uri' if it is #f.
Change-Id: Ic4f94f86fcfebe6f2e60cb3c4330ce57886ab647
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/packages/tree-sitter.scm (tree-sitter): Update to 0.25.3.
[arguments]<#:phases>: Add 'patch-_ts_dup-visibility for linking with Rust
bindings.
(tree-sitter-cli)[source]: Keep files required for building bindings.
[inputs]: Use ‘cargo-inputs’.
[arguments]: Remove #:cargo-inputs, #:cargo-development-inputs.
<#:cargo-test-flags>: Adjust failing tests to skip.
<#:cargo-install-paths>: Add "cli".
<#:phases>: Merge 'patch-node and 'patch-dot into 'patch-references.
Update their references and use ‘search-input-file’.
Remove modification of 'install, #:cargo-install-paths now takes care of the
installation.
* gnu/packages/rust-crates.scm (lookup-cargo-inputs)[tree-sitter-cli]: New
entry.
* guix/build/tree-sitter-build-system.scm
(patch-dependencies): Drop `peerDependencies' from package.json.
(build): Remove deprecated ‘--no-bindings’ option.
(check): Set CC.
(install): Add `src' to include directories in order for external
scanners to find `tree_sitter/parser.h'.
Co-authored-by: Hilton Chain <hako@ultrarare.space>
Change-Id: I3941a1785be8deb60f288fcd5983255f075f9215
Signed-off-by: Hilton Chain <hako@ultrarare.space>
This is a workaround to support Rust cross-compilation in build systems other
than cargo-build-system. Since there's no interface for target-inputs, using
native-inputs makes most sense.
* guix/build-system/cargo.scm (lower)[bag]<target-inputs>: Label rust-sysroot
with its package name.
* guix/build/cargo-build-system.scm (configure): Use it.
When cross-compiling, accept rust-sysroot from native-inputs if there's none
in inputs.
Change-Id: I5cb63c8c815d3a2c9f0ece01857254f6d0090dd1
No special value is required for this environment variable.
* guix/build/cargo-build-system.scm (configure): Set GETTEXT_SYSTEM
unconditionally.
Change-Id: Id40fecaf75fa76c7b7f1404db226fa1ca6a45a5e
* guix/build/cargo-build-system.scm (crate-src?): Also don't try to
check python scripts for Cargo.toml.
Change-Id: I001a89b83d2e472706b1263007be45d1153c140f
This will make it easier to use these phases in other bulid systems.
* guix/build/cargo-build-system.scm (unpack-rust-crates, configure, build)
(package, install): Set default value for arguments specific to this build
system.
Change-Id: I1dde1b063d8eee57967903abd2fce94574211a0a
*guix/build-system/cargo.scm (cargo-build, cargo-cross-build)
[#:cargo-install-paths]: New argument.
* guix/build/cargo-build-system.scm (install): Use it.
* doc/guix.texi (Build Systems)[cargo-build-system]: Document it.
Change-Id: I74ed1972a5716da05afeac8edb2b0e4b6834bf40
* guix/build-system/cargo.scm (cargo-build, cargo-cross-build)
[#:cargo-package-crates]: New argument.
* guix/build/cargo-build-system.scm (package): Use it.
* doc/guix.texi (Build Systems)[cargo-build-system]: Document it.
Change-Id: I45ccd95e90827d47127015cb0bda2d41f792335b
* guix/build/cargo-build-system.scm (%standard-phases): Move
‘unpack-rust-crates’ after ‘unpack’.
Move ‘check-for-pregenerated-files’ after ‘configure’.
(check-for-pregenerated-files): Only check non-empty files.
Print out binary files.
Run in parallel.
Don't fail to keep compatibility for phase order change.
Change-Id: I0a332fe843e97687324bd908fa111422a63e475d
This will make error messages more helpful.
* guix/build/cargo-build-system.scm (build, check, package, install): Pass
‘--offline’ to cargo.
Change-Id: Ic95f603b793319f99c9c1fbce43f773bfc8126c0
* guix/build/cmake-build-system.scm (configure): Add and use generator
field to configure the build system. Create and use CMake variable cache
file. Set the CMake variable BUILD_TESTING to the value of TESTS? so
that a package can optionally build tests. Set CMAKE_COLOR_DIAGNOSTICS
to ON. Set max load for parallel builds.
(build, install): New function.
(check): Replace call to gnu-build's non-parallelizable check with
function using cmake's ctest.
(%standard-phase): Add new build and install functions as phases.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build),
* guix/build-system/qt.scm (qt-build, qt-cross-build): Add generator
and test-exclude fields and remove unused test-target field.
* doc/guix.texi: Document new parameters.
* guix/build-system/cmake.scm (cmake-build),
* guix/build-system/qt.scm (qt-build): Add ninja to build-inputs.
Change-Id: Ifa8174c91f0fdc030ac5813e98f7c21cba1a7725
Since qtwebengine and qtbase are not installed into the same prefix,
the default path for QtWebEngineProcess won't work. Fix it so that
we no longer need to set QTWEBENGINEPROCESS_PATH anymore.
* gnu/packages/qt.scm (qtwebengine-5, qtwebengine) [arguments]:
Substitute 'QLibraryInfo::LibraryExecutablesPath' in substitute-source phase.
[native-search-paths]: Remove QTWEBENGINEPROCESS_PATH.
* guix/build/qt-utils.scm (variables-for-wrapping): Remove
QTWEBENGINEPROCESS_PATH.
Change-Id: Ie0dfaf8c2355a679e2a3ddeacf09654830f9ab2f
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>
A nice feature of offload builds is that Guix will throttle the start of
new jobs based on the overload-threshold. There is no equivalent for
local builds, so one must either run builds in serial (--max-jobs=1) and
endure single-threaded builds or run concurrent builds and watch the
system overload as it runs multiple multi-threaded builds.
From a benchmark comparing the compilation of concurrent Folly builds,
the "max-load" option reduced the overall time by 8.3%. Memory use also
drops considerably since we are only running 1/4 of the processes at any
time.
* guix/build/gnu-build-system.scm (build, check): Set max load.
Change-Id: I97f1e3e59880b6ed23faed2038eb5279415e9c95
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/build/gnu-build-system.scm (configure): Use ‘search-input-file’
instead of ‘assoc-ref’ when looking for bash.
* gnu/packages/commencement.scm (%boot-gash-inputs): Update comment.
Change-Id: Ie95e95cfeb9f004fd304ff2af471ea5840af2b2e
* guix/build/utils.scm (wrap-program): Set the value of the -a option of
`exec' in the wrapper to ${0##*/} instead of $0, to use its base name instead
of the complete file name.
Fixes: https://issues.guix.gnu.org/73405
Change-Id: Iec5984d4d934c8df88a90ff653947f7d07413ae4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Defaults should be set in guix/build-system/guile.scm rather than
guix/build/guile-build-system.scm, to disambiguate at first sight
where those defaults are set.
* guix/build-system/guile.scm (guile-build)
<#:not-compiled-file-regexp>: Add default.
* guix/build/guile-build-system.scm (build): Remove unused keyword
defaults.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/packages/patches/luanti-paths.patch: New file.
* gnu/packages/luanti.scm (luanti)[source]: Use it.
[#:phases]<check>: Use LUANTI_GAME_PATH.
[native-search-paths]: Rename “MINETEST_GAME_PATH” to “LUANTI_GAME_PATH”.
Rename “MINETEST_MOD_PATH” to “LUANTI_MOD_PATH”.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* guix/build/luanti-build-system.scm (check): Use LUANTI_MOD_PATH.
* guix/build/emacs-utils.scm (emacs-compile-directory): Display the filename
of each file before compiling.
Change-Id: I275a086ed92f7cfb2907aea9b4feb59012cc8dd5
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
* guix/build/gnu-dist.scm (build): Add a configure-flag during the
distcheck rebuild to use a shell we have in the build environment.
Change-Id: I3519ab498ef47728729297a70ac1dce8e1b922ee