[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cmake-build-system: modify-phases picks up wrong %standard-phases
From: |
Ludovic Courtès |
Subject: |
Re: cmake-build-system: modify-phases picks up wrong %standard-phases |
Date: |
Mon, 20 Jan 2020 10:18:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi Hartmut,
Hartmut Goebel <address@hidden> 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’.