unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: pkill9@runbox.com
Cc: 29774@debbugs.gnu.org
Subject: bug#29774: Compilation error on git master: `gzip: unbound variable`
Date: Sun, 28 Jan 2018 02:12:50 -0800	[thread overview]
Message-ID: <874ln6s34t.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <E1eUhOh-0001lp-1S@rmmprod06.runbox> (pkill9@runbox.com's message of "Thu, 28 Dec 2017 23:15:34 +0000 (GMT)")

[-- Attachment #1: Type: text/plain, Size: 4475 bytes --]

<pkill9@runbox.com> writes:

>> Compiling Scheme modules...
>>
>> ...
>>
>>   LOAD     guix/scripts/pack.scm
>> Backtrace:
>> In ice-9/r4rs.scm:
>>   90: 19 [dynamic-wind #<procedure 1744360 at ice-9/eval.scm:416:20 ()> ...]
>>   90: 18 [dynamic-wind #<procedure 17442d0 at ice-9/eval.scm:416:20 ()> ...]
>> In ice-9/eval.scm:
>>  432: 17 [eval # #]
>>  432: 16 [eval # #]
>>  481: 15 [lp (#<fluid 16>) (#<output: void 11b7a90>)]
>> In ice-9/boot-9.scm:
>> 2864: 14 [resolve-interface (guix scripts pack) #:select ...]
>> 2789: 13 [#<procedure 1381ae0 at ice-9/boot-9.scm:2777:4 (name #:optional autoload version #:key ensure)> # ...]
>> 3065: 12 [try-module-autoload (guix scripts pack) #f]
>> 2401: 11 [save-module-excursion #<procedure 69daed0 at ice-9/boot-9.scm:3066:17 ()>]
>> 3085: 10 [#<procedure 69daed0 at ice-9/boot-9.scm:3066:17 ()>]
>> In unknown file:
>>    ?: 9 [primitive-load-path "guix/scripts/pack" ...]
>> In ice-9/eval.scm:
>>  453: 8 [eval # ()]
>>  387: 7 [eval # ()]
>>  387: 6 [eval # ()]
>>  387: 5 [eval # ()]
>>  387: 4 [eval # ()]
>>  387: 3 [eval # ()]
>>  387: 2 [eval # ()]
>>  393: 1 [eval #<memoized gzip> ()]
>> In unknown file:
>>    ?: 0 [memoize-variable-access! #<memoized gzip> #<directory # 6d10bd0>]
>>  
>> ERROR: In procedure memoize-variable-access!:
>> ERROR: gzip: unbound variable

I can reproduce this error when attempting to build Guix 0.14.0 from
source, using system-provided and custom built dependencies.  I cannot
reproduce it when using Guix-provided dependencies (e.g., by running
'guix environment guix' and then manually building it).

I may have a work-around for you.  Let me know if it works.  Please try
the following:

1) Run a command like "make V=1".  Because Guix uses GNU Automake, you
can get verbose output by adding "V=1" to the command ((automake)
Automake Silent Rules).  This will cause make to print the commands that
are being run.

2) Find the exact "compile-all.scm" invocation being used (it should
appear right after the string "Compiling Scheme modules..." in the build
output).  Copy it and run it manually from the root of the build
directory (i.e., the directory containing the "configure" script), but
instead of passing it all the .scm files, only pass it the single file
guix/scripts/pack.scm.

3) If (2) succeeds in building the pack.go file, try running "make"
again.  Because the pack.go file is newer than the pack.scm file, it
won't need to be built again, which should allow you to bypass this
specific problem.  This worked for me, so I hope it works for you.

Why does it work?  Well, the problem you observed occurs when running
the make-go target of the Makefile, which does the following (this is
from the Makefile.am file, which is used to produce the Makefile):

--8<---------------cut here---------------start------------->8---
make-go: $(MODULES) guix/config.scm $(dist_noinst_DATA)
        $(AM_V_at)echo "Compiling Scheme modules..." ;                  \
        unset GUILE_LOAD_COMPILED_PATH ;                                \
        XDG_CACHE_HOME=/nowhere                                         \
        host=$(host) srcdir="$(top_srcdir)"                             \
        $(top_builddir)/pre-inst-env                                    \
        $(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)"                \
          --no-auto-compile                                             \
          -s "$(top_srcdir)"/build-aux/compile-all.scm $^
--8<---------------cut here---------------end--------------->8---

Here, we are running build-aux/compile-all.scm on all the modules in a
single invocation.  The script compile-all.scm compiles all the .scm
files it receives as arguments into .go files.  When it runs, it only
compiles a .go file if the .go file doesn't exist or the corresponding
.scm file is newer.  It seems this problem has something to do with
memoizing the gzip variable while compiling many different modules in
one run.  By only running compile-all.scm on the single module pack.scm,
it seems that we can avoid whatever condition is causing the problem to
occur.

As for what the actual issue is...  I don't know.  If somebody could
create a minimal reproduction of the issue, it would help.  The
information above gives us an idea of where the issue is probably
occurring, but it will require more work to narrow it down further.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-01-28 10:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 20:10 bug#29774: Compilation error on git master: `gzip: unbound variable` pkill9
2017-12-28 17:48 ` Marius Bakke
2017-12-28 23:15   ` pkill9
2018-01-28 10:12     ` Chris Marusich [this message]
2018-04-23  7:25 ` Mark H Weaver
2019-01-22 22:19   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ln6s34t.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me \
    --to=cmmarusich@gmail.com \
    --cc=29774@debbugs.gnu.org \
    --cc=pkill9@runbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).