unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: help-guix <help-guix@gnu.org>
Subject: Issue with 'guix shell' for Guile projects on non-Guix distros
Date: Thu, 16 Mar 2023 10:15:52 -0400	[thread overview]
Message-ID: <CAJ=RwfYVXgp9F-oZ3G2WE+XPWXcce_DZigQJgMXEvhyt57LfYg@mail.gmail.com> (raw)

Hey everyone,

At Spritely we've run into a situation where 'guix shell' doesn't
"just work" for setting up a development environment and we're
wondering about the best way to fix it.  We're experiencing this issue
with our guile-goblins project currently, but this appears to be a
more general problem that likely affects most projects that use
Guile's guile.m4 autoconf code.

Here's the context: Someone wants to build guile-goblins from a Git
checkout using their non-Guix, FHS distro. However, they happen to
have Guile 3 installed to /usr via the host distro's package manager.
They install Guix, run 'guix shell', then './bootstrap.sh' and that
all works fine. Then they run './configure' and this happens:

    $ ./configure
    checking for a BSD-compatible install...
/gnu/store/w7ag4ilvb6inp9vc71dxzmdkz738m37w-profile/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p...
/gnu/store/w7ag4ilvb6inp9vc71dxzmdkz738m37w-profile/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether make supports nested variables... (cached) yes
    checking for pkg-config...
/gnu/store/w7ag4ilvb6inp9vc71dxzmdkz738m37w-profile/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    configure: checking for guile 3.0
    configure: found guile 3.0
    checking for guile-3.0... /usr/bin/guile-3.0
    checking for Guile version >= 3.0... 3.0.7
    checking for guild-3.0...
/gnu/store/w7ag4ilvb6inp9vc71dxzmdkz738m37w-profile/bin/guild
    checking for guile-config-3.0... no
    checking for Guile site directory...
/gnu/store/cnfsv9ywaacyafkqdqsv2ry8f01yr7a9-guile-3.0.7/share/guile/site/3.0
    checking for Guile site-ccache directory using pkgconfig...
/gnu/store/cnfsv9ywaacyafkqdqsv2ry8f01yr7a9-guile-3.0.7/lib/guile/3.0/site-ccache
    checking for Guile extensions directory...
/gnu/store/cnfsv9ywaacyafkqdqsv2ry8f01yr7a9-guile-3.0.7/lib/guile/3.0/extensions
    checking if (fibers) is available... no
    configure: error: required guile module not found: (fibers)

The most important line above is:

    checking for guile-3.0... /usr/bin/guile-3.0

Guile's guile.m4 code checks for a 'guile-3.0' executable *before*
checking for a 'guile' executable.  Guix's Guile package only provides
'guile', but the host distro provides 'guile-3.0'.  Unfortunately, the
build environment ends up as a mix of host distro and Guix things
which eventually proves fatal to the build.

As a workaround, I am considering adding a package to our manifest.scm
file that symlinks 'guile' to 'guile-3.0', 'guild' to 'guild-3.0',
etc. so that they take priority over the host executables.
Internally, we are tracking this issue here:
https://gitlab.com/spritely/guile-goblins/-/issues/84

Has anyone encountered something like this before?  If so, how did you
deal with it?  Should something be changed in Guix itself to avoid
this issue altogether?

- Dave


             reply	other threads:[~2023-03-16 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 14:15 Thompson, David [this message]
2023-03-16 15:55 ` Issue with 'guix shell' for Guile projects on non-Guix distros Ludovic Courtès
2023-03-16 16:21   ` Thompson, David

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='CAJ=RwfYVXgp9F-oZ3G2WE+XPWXcce_DZigQJgMXEvhyt57LfYg@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=help-guix@gnu.org \
    /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.
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).