Nikita Karetnikov <nik...@karetnikov.org> writes: > I'm attaching a patch. > > It's a separate file; if I add these lines > > #:use-module (guix packages) > #:use-module (guix store) > > to 'guix/build/utils.scm', they will raise the following error on > 'make'.
Based on the backtrace below, it looks like you tried to add those to guix/utils.scm, not guix/build/utils.scm. It failed because it resulted in a circular dependency between modules. (guix utils) -> (guix packages) -> (guix derivations) -> (guix utils) Circular dependencies are not always fatal in Guile, but they can be when one of the modules depends on a *macro* from another module in the cycle. In this case, (guix derivations) uses the 'memoize' macro from (guix utils). [Adds to Guile TODO list: better error messages in cases like this] > Also, 'bin-location' and 'chmod' are not safe. It can be solved with > 'file-exists?' I don't know what the issue is here (and don't have time now to figure it out), but the idea that 'file-exists?' can make anything safe is setting off warning bells in my head, because it sounds like a TOCTTOU[1] race condition: someone else may change the filesystem between your 'file-exists?' check and whatever you do that depends on that check for safety. Regards, Mark [1] http://en.wikipedia.org/wiki/Time-of-check-to-time-of-use