From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:46322) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ie4ma-0001SX-6J for guix-patches@gnu.org; Sun, 08 Dec 2019 17:12:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ie4mY-0002TD-3B for guix-patches@gnu.org; Sun, 08 Dec 2019 17:12:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46394) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ie4mX-0002Rw-UU for guix-patches@gnu.org; Sun, 08 Dec 2019 17:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ie4mX-0006ef-QS for guix-patches@gnu.org; Sun, 08 Dec 2019 17:12:01 -0500 Subject: [bug#38390] Gash 0.2.0 Resent-Message-ID: From: Timothy Sample References: <87muc8g68f.fsf@ngyro.com> <87eexk1mag.fsf@gnu.org> <878snped7a.fsf@ngyro.com> <87tv6bv9ds.fsf@ngyro.com> <87d0cyh96s.fsf@gnu.org> Date: Sun, 08 Dec 2019 17:11:10 -0500 In-Reply-To: <87d0cyh96s.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Sun, 08 Dec 2019 21:08:27 +0100") Message-ID: <877e36v56p.fsf@ngyro.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Jan Nieuwenhuizen Cc: 38390@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Jan, Jan Nieuwenhuizen writes: > Timothy Sample writes: > > [cc: 38390@debbugs.gnu.org] > > Hi Timothy, > >> There=E2=80=99s one last thing I need from you (besides an OK on your te= st >> whenever you get to it). > > I just found two things I'm not too happy about. Both stem from using > our bootstrap guile-2.0.9. Previously, I used guile-2.0 (=3D 2.0.14) to > compile the .go files that were later used during bootstrap. I did all of my bootstrapping tests with the bootstrap Guile. I=E2=80=99ve attached my package definition for reference (it belongs in =E2=80=9Ccommencement.scm=E2=80=9D). The reason I say this is to reassure = you that going from 2.0.14 to 2.0.9 shouldn=E2=80=99t be too disruptive. > When I build `gash-boot' on my real experimental `wip-boot' guix branch > at gitlab (https://gitlab.com/janneke/guix/tree/wip-boot) like so > > ./pre-inst-env guix build -e '(@@ (gnu packages commencement) gash-bo= ot)' > > and run gash, I get: > > 20:44:25 janneke@dundal:~/src/guix/wip-boot [env] > $ ./pre-inst-env guix build -e '(@@ (gnu packages commencement) gash-boot= )' > /gnu/store/hihv59xdpqfnijb5i2mi0g8wg09qphi4-gash-boot-0.1.50-c1b8 > 20:44:32 janneke@dundal:~/src/guix/wip-boot [env] > $ /gnu/store/8bl7iqln6qaajr3d6kwbyvkzy2gvr4rf-gash-boot-0.1.50-c1b8/bin/g= ash --version > %% Shift/Reduce conflict (shift 1, reduce 106) on 'NEWLINE' in state 242 > Snipping a thousand more =E2=80=9CShift/Reduce=E2=80=9D warnings.... > > Backtrace: > In ice-9/boot-9.scm: > 3966: 19 [#] > 1645: 18 [%start-stack load-stack ...] > 1650: 17 [#] > In unknown file: > ?: 16 [primitive-load "/gnu/store/8bl7iqln6qaajr3d6kwbyvkzy2gvr4rf-gas= h-boot-0.1.50-c1b8/bin/gash"] > In ice-9/eval.scm: > 505: 15 [# (define # # = #)] > In ice-9/psyntax.scm: > 1101: 14 [expand-top-sequence ((define (main args) (setenv "SHELL" #) ...= )) () ...] > 1259: 13 [#] > 1605: 12 [expand-simple-lambda (# . #) () (()) ...] > 1509: 11 [parse ((# . #) (# . #)) () () ...] > In ice-9/boot-9.scm: > 625: 10 [map # (# #)] > In ice-9/psyntax.scm: > 1257: 9 [# (# . #)] > 1186: 8 [syntax-type (# #) (# #) (# # #) ...] > 579: 7 [syntax-type main (# #) (#) ...] > 293: 6 [get-global-definition-hook main (public gash gash)] > In ice-9/boot-9.scm: > 2708: 5 [# # ...] > 2981: 4 [try-module-autoload (gash gash) #f] > 2320: 3 [save-module-excursion #] > 3001: 2 [#] > In unknown file: > ?: 1 [primitive-load-path "gash/gash" ...] > ?: 0 [setlocale 6 ""] > > ERROR: In procedure setlocale: > ERROR: In procedure setlocale: Invalid argument > [1]20:44:45 janneke@dundal:~/src/guix/wip-boot [env] > $=20 > > If I set LC_ALL=3DC=20 > > LC_ALL=3DC > /gnu/store/8bl7iqln6qaajr3d6kwbyvkzy2gvr4rf-gash-boot-0.1.50-c1b8/bin/gash > --version > > then I (of course) still get the Shift/Reduce warnings and everything > "seems" to work. It seems that the empty locale is problematic for > guile 2.0.9 or our bootstrap environment. I just tried a patch and > pushed to my wip-0.2.0. I added (at the last minute) the call to =E2=80=9Csetlocale=E2=80=9D to nor= malize some differences between Guile 2 and Guile 2.2 (I was getting test failures without it). From reading Guile=E2=80=99s NEWS, version 2.2 started initializing the locale automatically, so I =E2=80=9Cbackported=E2=80=9D th= at to Guile 2 by calling =E2=80=9Csetlocale=E2=80=9D with an empty string (as discussed i= n the manual). Anyway, this is definitely my fault! Perhaps it should try that and then fall back on =E2=80=9C(setlocale LC_ALL "C")=E2=80=9D if ther= e is a problem. I=E2=80=99ll figure it out before releasing. > I am less cheerful about the Shift/Reduce warnings; I am afraid they > might break something somewhere during the bootstrap build. Any ideas > why these surface at this time? I'll play some more with > lalr.upstream.scm versions... My understanding is that these are spurious. There is upstream commit 92b64f9b3c02b0086a4aea7cbe7dc38376768150 which is not included in Guile 2.0.9 but included in later versions (maybe starting with 2.0.10 =E2=80=93 I don=E2=80=99t recall). The commit message is =E2=80=9CNo more unexpected s= hift-reduce conflicts with LR driver.=E2=80=9D See . Since the newer versions are fine with the parser, and I have parsed oodles of shell script using Guile 2.0.9, I think the these warnings are just the result of a bug. :) -- Tim --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=gash-boot.scm (define gash-boot (package-with-bootstrap-guile (package (inherit gash) (name "gash-boot") (source (origin (method url-fetch) ;; This should point to the result of `make dist' from ;; commit b5831f715eabd857a17d10ea6ce06439aecf8014. (uri "file:///home/debian/gash/gash-0.1.40-b583.tar.gz") (sha256 (base32 "04cm8y39wgcvx83b38yndi1d9fwf1ahvvzzpd54h7p18r43irmkl")))) (arguments `(#:implicit-inputs? #f #:guile ,%bootstrap-guile #:phases (modify-phases %standard-phases (delete 'patch-source-shebangs) (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (guile-dir (assoc-ref inputs "guile")) (guile (string-append guile-dir "/bin/guile")) (moddir (string-append out "/share/guile/site/" (effective-version))) (godir (string-append out "/lib/guile/" (effective-version) "/site-ccache"))) (format #t "Configuring gash/config.scm.in~%") (copy-file "gash/config.scm.in" "gash/config.scm") (substitute* "gash/config.scm" (("@VERSION@") ,(package-version gash))) (format #t "Configuring scripts/gash.in~%") (copy-file "scripts/gash.in" "scripts/gash") (substitute* "scripts/gash" (("@GUILE@") guile) (("@MODDIR@") moddir) (("@GODIR@") godir)) #t))) (delete 'patch-generated-file-shebangs) (replace 'build (lambda _ (add-to-load-path (getcwd)) (for-each (lambda (scm) (let* ((base (string-drop-right scm 4)) (go (string-append base ".go")) (dir (dirname scm))) (format #t "Compiling ~a~%" scm) (compile-file scm #:output-file go))) (find-files "gash" "\\.scm$")) #t)) (delete 'check) (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (guile-dir (assoc-ref inputs "guile")) (guile (string-append guile-dir "/bin/guile")) (moddir (string-append out "/share/guile/site/" (effective-version))) (godir (string-append out "/lib/guile/" (effective-version) "/site-ccache"))) (for-each (lambda (scm) (let* ((base (string-drop-right scm 4)) (go (string-append base ".go")) (dir (dirname scm))) (format #t "Installing ~a~%" scm) (install-file scm (string-append moddir "/" dir)) (format #t "Installing ~a~%" go) (install-file go (string-append godir "/" dir)))) (find-files "gash" "\\.scm$")) (format #t "Installing scripts/gash~%") (install-file "scripts/gash" (string-append out "/bin")) (chmod (string-append out "/bin/gash") #o555) (symlink (string-append out "/bin/gash") (string-append out "/bin/sh")) (symlink (string-append out "/bin/gash") (string-append out "/bin/bash")) #t)))))) (inputs `(("guile" ,%bootstrap-guile))) (native-inputs `(("coreutils" ,%bootstrap-coreutils&co)))))) --=-=-=--