From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: cmake-build-system: modify-phases picks up wrong %standard-phases Date: Mon, 20 Jan 2020 10:18:01 +0100 Message-ID: <87a76iij06.fsf@gnu.org> References: <284cb228-6878-b078-957d-e6bd7d62d66b@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55316) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itTC8-0007aL-IX for guix-devel@gnu.org; Mon, 20 Jan 2020 04:18:08 -0500 In-Reply-To: <284cb228-6878-b078-957d-e6bd7d62d66b@crazy-compilers.com> (Hartmut Goebel's message of "Sat, 18 Jan 2020 13:02:55 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: Guix-devel Hi Hartmut, Hartmut Goebel 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? [...] > =C2=A0 (build-system cmake-build-system) > =C2=A0 (arguments > =C2=A0=C2=A0 `(;;#:modules (,@%cmake-build-system-modules) The problem stems from a confusion between =E2=80=9Cimported modules=E2=80= =9D and =E2=80=9Cmodules in scope=E2=80=9D (don=E2=80=99t worry, you=E2=80=99re not= the first one to be tripped up by this!). =E2=80=98%cmake-build-system-modules=E2=80=99 and similarly-named variables= contain the closure of the modules to be _imported_ on the build side for =E2=80=98cmake-build-system=E2=80=99 to work. However, the modules that you want _in scope_ are only those used as the default value of #:modules in =E2=80=98cmake-build=E2=80=99, namely: ((guix build cmake-build-system) (guix build utils)) If you do: #:modules ,%cmake-build-system-modules then you=E2=80=99re also putting (guix build gnu-build-system) in scope, he= nce the collision for the =E2=80=98%standard-phases=E2=80=99 binding. HTH! Ludo=E2=80=99.