Subject: configure: “guile2” is checked before“guile”

From: Ricardo Wurmus <[email-masked]>
Date: Thu, 25 Jan 2018 15:27:48 +0100

On Fedora there is /usr/bin/guile2.  When I want to configure Guix from
source I run “guix environment guix” and run “./configure”.  This aborts
because the configure script finds the system’s /usr/bin/guile2 before
“guile” from the environment.

Here’s the error:

--8<---------------cut here---------------start------------->8---
configure: checking for guile 2.2
configure: found guile 2.2
checking for guile-2.2... no
checking for guile2.2... no
checking for guile-2... no
checking for guile2... /usr/bin/guile2
configure: error: found development files for Guile 2.2, but /usr/bin/guile2 has effective version 2.0
make: *** [Makefile:3071: config.status] Error 1
--8<---------------cut here---------------end--------------->8---

To make this work I need to move /usr/bin/guile2 away or make it
otherwise unaccessible (e.g. with “guix environment --container guix”).

Is there something we can do about this to ensure that “guix environment
guix” is sufficient to build Guix from source on Fedora?

--
Ricardo