* gnu/packages/python.scm (python-2.7): Move CFLAGS to original position.
(%original-python2-configure-flags): New variable.
(python-3.10)[arguments]: Use it.
(python2-minimal)[arguments]: Likewise.
Change-Id: Ia616ec7fb3f5bdbbc478e89fcb5e319d962029ba
Avoid
/tmp/guix-build-clang-runtime-17.0.6.drv-0/source/build/lib/fuzzer/libcxx_fuzzer_x86_64/include/c++/v1/__filesystem/path.h:623:30: error: use of built-in trait '__remove_pointer(typename std::__Fuzzer::decay<_Tp>::type)' in function signature; use library traits instead
623 | _EnableIfPathable<_Source> append(const _Source& __src) {
| ^~~~~~
by using gcc-13.
* gnu/packages/llvm.scm (clang-runtime-from-llvm)[native-inputs]: Use gcc-13
for version 17.
Change-Id: I0f815e178ea2f936e680075b1153285cf920b26e
Avoid
In file included from /tmp/guix-build-clang-runtime-18.1.8.drv-0/source/build/lib/fuzzer/libcxx_fuzzer_x86_64/include/c++/v1/__exception/nested_exception.h:18,
from /tmp/guix-build-clang-runtime-18.1.8.drv-0/source/build/lib/fuzzer/libcxx_fuzzer_x86_64/include/c++/v1/exception:83,
from /tmp/guix-build-clang-runtime-18.1.8.drv-0/source/libcxxabi/src/cxa_aux_runtime.cpp:13:
/tmp/guix-build-clang-runtime-18.1.8.drv-0/source/build/lib/fuzzer/libcxx_fuzzer_x86_64/include/c++/v1/__type_traits/is_convertible.h:28:77: error: there are no arguments to ‘__is_convertible’ that depend on a template parameter, so a declaration of ‘__is_convertible’ must be available [-fpermissive]
28 | struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant<bool, __is_convertible(_T1, _T2)> {};
by using gcc-13.
* gnu/packages/llvm.scm (clang-runtime-from-llvm)[native-inputs]: Use gcc-13
for version 18.
Change-Id: Ib01403665af7a8014e6da612bc6f31257e498d88
Avoid
source/build/lib/fuzzer/libcxx_fuzzer_x86_64/include/c++/v1/__filesystem/path.h:534:52: error: use of built-in trait ‘__remove_pointer(typename std::__Fuzzer::decay<_Tp>::type)’ in function signature; use library traits instead
by reverting back to gcc-12.
* gnu/packages/llvm.scm (clang-runtime-from-llvm)[native-inputs]: Use gcc-12
for version 18.
Change-Id: Ib01403665af7a8014e6da612bc6f31257e498d88
We probably want to keep this patch "bubbling" up on top of the gcc-14 patches
until the gcc-14 transition is done, keeping every commit buildable.
* gnu/packages/gcc.scm (gcc): Define as gcc-14 for all.
(libgccjit): Define as libgccjit-14.
* gnu/packages/commencement.scm (gcc-toolchain): Define as gcc-toolchain-14
for all.
* gnu/packages/gcc.scm
Change-Id: Iaac983da8acbbb2fd1088a0469d6115b7d424dbb
Support for non-ASCII characters was mixed. Some gexp forms did support them,
while others did not. Combined with current value for
%default-port-conversion-strategy, that sometimes led to unpleasant surprises.
For example:
(scheme-file "utf8" #~(with-output-to-file #$output
(λ _ (display "猫"))))
Was written to the store as:
((? _ (display "\u732b")))
No, that is not font issue on your part, that is an actual #\? instead of the
lambda character. Which, surprisingly, does not do what it should when
executed.
The solution is to switch to C.UTF-8 locale where possible, since it is now
always available. Or to explicitly set the port encoding.
No tests are provided, since majority of tests/gexp.scm use guile in version
2, and it tends to work under it. The issues occur mostly with guile 3.
I did test it locally using:
#!/bin/sh
set -eu
set -x
[ -f guix.scm ] || { echo >&2 Run from root of Guix repo.; exit 1; }
[ -f gnu.scm ] || { echo >&2 Run from root of Guix repo.; exit 1; }
cat >猫.scm <<'EOF'
(define-module (猫)
#:export (say))
(define (say)
"nyaaaa~~~~!")
EOF
mkdir -p dir-with-utf8-file
cp 猫.scm dir-with-utf8-file/
cat >repro.scm <<'EOF'
(use-modules (guix build utils)
(guix derivations)
(guix gexp)
(guix store)
(ice-9 ftw)
(ice-9 textual-ports))
(define cat "猫")
(define (drv-content drv)
(call-with-input-file (derivation->output-path drv)
get-string-all))
(define (out-content out)
(call-with-input-file out
get-string-all))
(define (drv-listing drv)
(scandir (derivation->output-path drv)))
(define (dir-listing dir)
(scandir dir))
(define-macro (test exp lower? report)
(let ((type (car exp)))
`(false-if-exception
(let ((drv (with-store %store
(run-with-store %store
(,(if lower? lower-object identity) ,exp)))))
(format #t "~%~a:~%" ',type)
(when (with-store %store
(build-derivations %store (list drv)))
(format #t "~a~%" (,report drv)))))))
(test (computed-file "utf8"
#~(with-output-to-file #$output
(λ _ (display #$cat))))
#t drv-content)
(test (program-file "utf8"
#~((λ _ (display #$cat))))
#t drv-content)
(test (scheme-file "utf8"
#~((λ _ (display #$cat))))
#t drv-content)
(test (text-file* "utf8" cat cat cat)
#f drv-content)
(test (compiled-modules '((猫)))
#f drv-listing)
(test (file-union "utf8" `((,cat ,(plain-file "utf8" cat))))
#t drv-listing)
;;; No fix needed:
(test (imported-modules '((猫)))
#f dir-listing)
(test (local-file "dir-with-utf8-file" #:recursive? #t)
#t dir-listing)
(test (plain-file "utf8" cat)
#t out-content)
(test (mixed-text-file "utf8" cat cat cat)
#t drv-content)
(test (directory-union "utf8" (list (local-file "dir-with-utf8-file"
#:recursive? #t)))
#t dir-listing)
EOF
guix shell -CWN -D guix glibc-locales -- \
env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm
Before this commit, the output is:
+ '[' -f guix.scm ']'
+ '[' -f gnu.scm ']'
+ cat
+ mkdir -p dir-with-utf8-file
+ cp 猫.scm dir-with-utf8-file/
+ cat
+ guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm
computed-file:
?
program-file:
#!/gnu/store/mfkz7fvlfpv3ppwbkv0imb19nrf95akf-guile-3.0.9/bin/guile --no-auto-compile
!#
((? _ (display "\u732b")))
scheme-file:
((? _ (display "\u732b")))
text-file*:
???
compiled-modules:
building path(s) `/gnu/store/ay3jifyvliigfgnz67jf0kgngzpya5a5-module-import-compiled'
Backtrace:
5 (primitive-load "/gnu/store/rn7b0dq6iqfmmqyqzamix2mjmfy?")
In ice-9/eval.scm:
619:8 4 (_ #f)
In srfi/srfi-1.scm:
460:18 3 (fold #<procedure 7ffff79245e0 at ice-9/eval.scm:336:1?> ?)
In ice-9/eval.scm:
245:16 2 (_ #(#(#<directory (guix build utils) 7ffff779f320>) # ?))
In ice-9/boot-9.scm:
1982:24 1 (_ _)
In unknown file:
0 (stat "./???.scm" #<undefined>)
ERROR: In procedure stat:
In procedure stat: No such file or directory: "./???.scm"
builder for `/gnu/store/dxg87135zcd6a1c92dlrkyvxlbhfwfld-module-import-compiled.drv' failed with exit code 1
file-union:
(. .. ?)
imported-modules:
(. .. 猫.scm)
local-file:
(. .. 猫.scm)
plain-file:
猫
mixed-text-file:
猫猫猫
directory-union:
(. .. 猫.scm)
Which I think you will agree is far from optimal. After my fix the output
changes to:
+ '[' -f guix.scm ']'
+ '[' -f gnu.scm ']'
+ cat
+ mkdir -p dir-with-utf8-file
+ cp 猫.scm dir-with-utf8-file/
+ cat
+ guix shell -CWN -D guix glibc-locales -- env LANG=C.UTF-8 ./pre-inst-env guix repl -- ./repro.scm
computed-file:
猫
program-file:
#!/gnu/store/8kbmn359jqkgsbqgqxnmiryvd9ynz8w7-guile-3.0.9/bin/guile --no-auto-compile
!#
((λ _ (display "猫")))
scheme-file:
((λ _ (display "猫")))
text-file*:
猫猫猫
compiled-modules:
(. .. 猫.go)
file-union:
(. .. 猫)
imported-modules:
(. .. 猫.scm)
local-file:
(. .. 猫.scm)
plain-file:
猫
mixed-text-file:
猫猫猫
directory-union:
(. .. 猫.scm)
Which is actually what the user would expect.
I also added missing arguments to the documentation.
* guix/gexp.scm (computed-file): Set LANG to C.UTF-8 by default.
(compiled-modules): Try to `setlocale'.
(gexp->script), (gexp->file): New `locale' argument defaulting to C.UTF-8.
(text-file*): Set output port encoding to UTF-8.
* doc/guix.texi (G-Expressions)[computed-file]: Document the changes. Use
@var. Document #:guile.
[gexp->script]: Document #:locale. Fix default value for #:target.
[gexp->file]: Document #:locale, #:system and #:target.
Change-Id: Ib323b51af88a588b780ff48ddd04db8be7c729fb
Move the extra configure flags for cross building out from the build side code
and instead prepend them to the configure-flags.
Use new procedure cmake-system-name-for-target to add support for the Hurd and
bare-metal targets.
* guix/build/cmake-build-system.scm (configure): Move cross build flags from
here ...
* guix/build-system/cmake.scm (cmake-cross-build): ... to here.
(cmake-system-name-for-target): New procedure.
Signed-off-by: Janneke Nieuwenhuizen <janneke@gnu.org>
Change-Id: Ic68acc246e543491ed147e53d47cec5de46b82cb
As pyproject-build system now reads pytest config from pyproject.toml or
pytest.ini files it starts highlighting enabled "fail on warnings" which
were ignored before, this change silent it again.
* gnu/packages/python-xyz.scm (python-pydantic) [arguments]<test-flags>:
Skip 5 tests.
[phases]{pre-check}: Ignore all pytest warnings set in pyproject.toml.
Change-Id: I8551ba672d095b56f90955e4203c8a2aac270a4b
* gnu/packages/python-xyz.scm (python-bokeh)[build-system]: Use
pyproject-build-system.
[arguments]: Use #:test-flags instead of a custom 'check phase; disable one
more test.
[native-inputs]: Add python-setuptools and python-wheel.
Change-Id: I2aaa56ed578490de38685b10430535a819c2f5c5
* gnu/packages/gnome.scm (caribou)[arguments]: Use G-Expressions. Add CFLAGS
to #:configure-flags to relax gcc-14's strictness.
Change-Id: I78bf5b03029112aa17977b2947e5446e90150f11
Apparently 3.2.4 also builds with gcc-14, and 3.3.2 breaks for example libjxl.
This reverts commit d2fa9754c4542ea5cb2d4b261ad30de0ba65a303.
Change-Id: I1d0c2c6e1385e5d0311dcd416082d5f5b640e78f
Using gcc-14 produces
Compiler output for module e_switch_transform:
e_switch_transform.c: In function ‘__pyx_pf_18e_switch_transform_is_not_one’:
e_switch_transform.c:2283:5: error: duplicate case value
2283 | case 1+0:
| ^~~~
e_switch_transform.c:2282:5: note: previously used here
2282 | case 1:
| ^~~~
* gnu/packages/python-xyz.scm (python-cython-3)[native-inputs]: Add gcc-13.
Change-Id: Iaed502e4c105bb1229345288ec2f203453f65acc