GNU bug report logs - #30879
Stale .go files are loaded when Guile and Guix are in the same prefix

Previous Next

Package: guix;

Reported by: Eric Bavier <bavier <at> cray.com>

Date: Tue, 20 Mar 2018 15:44:01 UTC

Severity: important

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Eric Bavier <bavier <at> cray.com>
Cc: 30879 <at> debbugs.gnu.org
Subject: bug#30879: Commit bc499b113 broke guix on guile <at> 2.0.14, improper <operating-system> field initialization
Date: Tue, 15 May 2018 11:20:56 +0200
Hello Eric,

Sorry for the late reply.

Eric Bavier <bavier <at> cray.com> skribis:

> On Thu, Mar 22, 2018 at 12:04:06AM +0100, Ludovic Courtès wrote:
>> Eric Bavier <bavier <at> cray.com> skribis:
>> 
>> [...]
>> 
>> > In gnu/system.scm:
>> >  501: 3 [operating-system-services # # #f]
>> >  476: 2 [essential-services # # #f]
>> >  576: 1 [operating-system-etc-service #]
>> > In gnu/system/nss.scm:
>> >  217: 0 [name-service-switch->string (# # # # ...)]
>> >
>> > gnu/system/nss.scm:217:19: In procedure name-service-switch->string:
>> > gnu/system/nss.scm:217:19: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): (#<<service> type: #<service-type login ...

[...]

> Oh, so it loks like .go files from the system-installed guix are being
> picked up:
>
> 53692 openat(AT_FDCWD, "/usr/local/lib/guile/2.0/site-ccache/gnu/system.go", O_RDONLY|O_CLOEXEC) = 10
>
> I hadn't expected that, but I suppose it makes sense.  Running make
> under ./pre-inst-env does not help.
>
> We should probably find a way to prevent this in general, right?

It seems that the problem here is that both Guile and Guix were
installed with --prefix=/usr/local.

Guile contains by default $prefix/lib/guile/2.0/site-ccache in its
%load-compiled-path.  Thus, it will always find the .go files of that
Guix that’s installed in the same prefix.

> We shouldn't be loading guix modules from outside the source tree
> during build.

In general we can (and do: see the ‘make-go’ target and see
‘pre-inst-env’), but in this case we can’t really prevent it because
$prefix/lib/… is in the default search path of Guile, which is
admittedly problematic.

Maybe we should just forbid install Guix in the same prefix as Guile,
and detect that at configure time.

WDYT?

Ludo’.




This bug report was last modified 7 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.