unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: cmake-build-system: modify-phases picks up wrong %standard-phases
Date: Mon, 20 Jan 2020 10:18:01 +0100	[thread overview]
Message-ID: <87a76iij06.fsf@gnu.org> (raw)
In-Reply-To: <284cb228-6878-b078-957d-e6bd7d62d66b@crazy-compilers.com> (Hartmut Goebel's message of "Sat, 18 Jan 2020 13:02:55 +0100")

Hi Hartmut,

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> I experience a strange problem: The package below (stripped down to show
> the issue) uses the `qt-build-system`.
>
> When running as shown, the build fails, since the `configure` phase is
> taken from gnu-build-system.
>
> It works fine, when modifying `(@ (guix build cmake-build-system)
> %standard-phases)` instad of just %standard-phases` but - as prepared in
> the line above.
>
> It also works fine when not setting `#:modules`. (Setting `#:modules` is
> required since in the real package definition some phase uses
> `get-string-all` from (ice-9 textual-ports), which needs to be added to
> `#:modules`).
>
> What might cause this issue?


[...]

>   (build-system cmake-build-system)
>   (arguments
>    `(;;#:modules (,@%cmake-build-system-modules)

The problem stems from a confusion between “imported modules” and
“modules in scope” (don’t worry, you’re not the first one to be tripped
up by this!).

‘%cmake-build-system-modules’ and similarly-named variables contain the
closure of the modules to be _imported_ on the build side for
‘cmake-build-system’ to work.

However, the modules that you want _in scope_ are only those used as the
default value of #:modules in ‘cmake-build’, namely:

  ((guix build cmake-build-system)
   (guix build utils))

If you do:

  #:modules ,%cmake-build-system-modules

then you’re also putting (guix build gnu-build-system) in scope, hence
the collision for the ‘%standard-phases’ binding.

HTH!

Ludo’.

  reply	other threads:[~2020-01-20  9:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-18 12:02 cmake-build-system: modify-phases picks up wrong %standard-phases Hartmut Goebel
2020-01-20  9:18 ` Ludovic Courtès [this message]
2020-01-23 13:55   ` Hartmut Goebel

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=87a76iij06.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.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).