bug#38263: Bug in srfi-11

2019-11-19 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language
Hi,
I had a look today into the srfi-11 specificiation. It requires that the
variables are bound to fresh locations so let me rephrase the bug:

> (let ((a 1)
>   (b (let-values (((a . b) (values 2 3))
>(c (begin (set! a 9) 4)))
>(list a b c
>   (cons a b))

Evaluates to `(1 9 (3) (4))` while it should evaluate to
`(9 2 (3) (4))`.

Hope this helps,
Tim.





bug#38269: SSAX incorrect handling of in CDATA

2019-11-19 Thread Andrew Gierth
The bug:

> (xml->sxml "")
$2 = (*TOP* (e ">"))

The expected result is (*TOP* (e "")).

In upstream/SSAX.scm:

; procedure+:   ssax:read-cdata-body PORT STR-HANDLER SEED
[...]
; Within a CDATA section all characters are taken at their face value,
; with only three exceptions:
[..]
;is treated as an embedded #\> character

This handling of  is contrary to the XML specification, in which
there are no special character sequences inside CDATA except newline and
the "]]>" closing tag. I have confirmed this by checking other XML
parsers. The code seems to be based on a wild misreading of another
section of the specification that does not apply here. (And
unfortunately, the W3C validation suite for XML happens not to contain
any instances of  inside CDATA.)

I believe the fix should be as simple as removing the entire (#\&) case
from the function (and fixing the test cases).

This bug seems to exist in all versions of SSAX.

-- 
Andrew.





bug#36811: Guix fails to build with libgc 8.0.4

2019-11-19 Thread Jonathan Brielmaier

This failed with the same result:

/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash:
line 7: 25584 Aborted (core dumped)
XDG_CACHE_HOME=/nowhere host=x86_64-unknown-linux-gnu srcdir="."
./pre-inst-env
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/bin/guile -L "."
-L "." --no-auto-compile -s "."/build-aux/compile-all.scm [*.scm]

Core was generated by
`/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/bin/guile -L .
-L . --n'.
Program terminated with signal SIGABRT, Aborted.
#0  0x778bd7fa in raise () from
/gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib/libc.so.6
[Current thread is 1 (LWP 25883)]
(gdb) bt
#0  0x778bd7fa in raise () from
/gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib/libc.so.6
#1  0x778be891 in abort () from
/gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib/libc.so.6
#2  0x77e404ee in GC_unmap () from
/gnu/store/ak1jbgi0pfrvyqkgl1y1k1gl4qadjiqv-libgc-8.0.4/lib/libgc.so.1
#3  0x77e405d1 in GC_unmap_old.part.30 ()
   from
/gnu/store/ak1jbgi0pfrvyqkgl1y1k1gl4qadjiqv-libgc-8.0.4/lib/libgc.so.1
#4  0x77e47882 in GC_finish_collection ()
   from
/gnu/store/ak1jbgi0pfrvyqkgl1y1k1gl4qadjiqv-libgc-8.0.4/lib/libgc.so.1
#5  0x77e47cf5 in GC_try_to_collect_inner ()
   from
/gnu/store/ak1jbgi0pfrvyqkgl1y1k1gl4qadjiqv-libgc-8.0.4/lib/libgc.so.1
#6  0x77e4b570 in GC_grow_table ()
   from
/gnu/store/ak1jbgi0pfrvyqkgl1y1k1gl4qadjiqv-libgc-8.0.4/lib/libgc.so.1
#7  0x77e4bc8a in GC_register_finalizer_inner ()
   from
/gnu/store/ak1jbgi0pfrvyqkgl1y1k1gl4qadjiqv-libgc-8.0.4/lib/libgc.so.1
#8  0x77ef55f1 in scm_i_set_finalizer ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#9  0x77f12b3e in scm_logior ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#10 0x77f66062 in vm_regular_engine ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#11 0x77f69fd7 in scm_call_n ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#12 0x77edd3b8 in scm_call_with_unblocked_asyncs ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#13 0x77f6779f in vm_regular_engine ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#14 0x77f69fd7 in scm_call_n ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#15 0x77f57726 in really_launch ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#16 0x77ee635a in c_body ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#17 0x77f6779f in vm_regular_engine ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#18 0x77f69fd7 in scm_call_n ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#19 0x77f58c12 in catch ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#20 0x77ee6940 in scm_i_with_continuation_barrier ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#21 0x77ee69d5 in scm_c_with_continuation_barrier ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#22 0x77f5784c in with_guile ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#23 0x77e3ec78 in GC_call_with_stack_base ()
   from
/gnu/store/ak1jbgi0pfrvyqkgl1y1k1gl4qadjiqv-libgc-8.0.4/lib/libgc.so.1
#24 0x77f56ebd in launch_thread ()
   from
/gnu/store/xrcl2csd0ps5n0zwj8r7knkxjnz4pfbh-guile-2.2.6/lib/libguile-2.2.so.1
#25 0x77e15015 in start_thread ()
   from
/gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib/libpthread.so.0
#26 0x7797b91f in clone () from
/gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib/libc.so.6





bug#36811: Guix fails to build with libgc 8.0.4

2019-11-19 Thread Jonathan Brielmaier

On 18.11.19 15:13, Ludovic Courtès wrote:

To isolate the problem, how about:

   1. Defining a Guix package for libgc 8.0.4;

   2. Running “guix build guile --with-input=libgc@7=libgc@8” (or
  defining a package along these lines).


I did this and the build was fine as I expected. Guile builds fine
against libgc-8. But building Guix with a guile-libgc8 goes wrong.

I got now this little patch and try to build guix with:
./pre-inst-env guix build guix -K

```
diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index 7196ffcd32..172833780f 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -91,6 +91,19 @@ C or C++ programs, though that is not its primary goal.")

(license (x11-style (string-append home-page "license.txt")

+(define-public libgc-8
+  (package
+(inherit libgc)
+(version "8.0.4")
+(name "libgc")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/ivmai/bdwgc/releases;
+"/download/v" version "/gc-" version
".tar.gz"))
+(sha256
+ (base32
+  "1798rp3mcfkgs38ynkbg2p47bq59pisrc6mn0l20pb5iczf0ssj3"))
+
 (define-public libgc/back-pointers
   (package
 (inherit libgc)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 4419c48d1a..bc69488fa2 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -250,6 +250,14 @@ without requiring the source code to be rewritten.")
 (variable "GUILE_LOAD_COMPILED_PATH")
 (files '("lib/guile/2.2/site-ccache")))

+(define-public guile-2.2-libgc8
+  (package
+(inherit guile-2.2)
+(propagated-inputs
+ `(("libgc" ,libgc-8)
+   ,@(srfi-1:alist-delete "bdw-gc"
+  (package-propagated-inputs guile-2.2))
+
 (define-public guile-2.2/fixed
   ;; A package of Guile 2.2 that's rarely changed.  It is the one used
   ;; in the `base' module, and thus changing it entails a full rebuild.
diff --git a/gnu/packages/package-management.scm
b/gnu/packages/package-management.scm
index 1daab4e879..d80e71749d 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -285,7 +285,7 @@
  ("sqlite" ,sqlite)
  ("libgcrypt" ,libgcrypt)

- ("guile" ,guile-2.2)
+ ("guile" ,guile-2.2-libgc8)

  ;; Some of the tests use "unshare" when it is available.
  ("util-linux" ,util-linux)
```