From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41979) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oLH-0001M9-NO for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oLG-0002be-LH for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49902) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oLG-0002bA-GJ for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oLG-0006Rf-Af for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:06 -0400 Subject: [bug#36477] [PATCH v3 03/48] gnu: texinfo: Fix cross-compilation. Resent-Message-ID: From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:32:48 +0200 Message-Id: <20190902153333.11190-4-m.othacehe@gmail.com> In-Reply-To: <20190902153333.11190-1-m.othacehe@gmail.com> References: <20190902153333.11190-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36477@debbugs.gnu.org Cc: Mathieu Othacehe * gnu/packages/texinfo.scm (texinfo)[arguments]: Do not reset environment before running configure with the native compiler, in a cross-compilation context, [inputs]: move perl from here ... [native-inputs]: ... to here. Also add ncurses that is needed in a cross-compilation context to build texinfo native tools. --- gnu/packages/texinfo.scm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index befdd78551..c93c7fc353 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -41,8 +41,28 @@ (base32 "0rixv4c301djr0d0cnsxs8c1wjndi6bf9vi5axz6mwjkv80cmfcv")))) (build-system gnu-build-system) - (inputs `(("ncurses" ,ncurses) - ("perl" ,perl))) + (arguments + ;; When cross-compiling, the package is configured twice: once with the + ;; native compiler and once with the cross-compiler. During the configure + ;; with the native compiler, the environment is reset. This leads to + ;; multiple environment variables missing. Do not reset the environment + ;; to prevent that. + `(,@(if (%current-target-system) + '(#:phases + (modify-phases %standard-phases + (add-before 'configure 'fix-cross-configure + (lambda _ + (substitute* "configure" + (("env -i") + "env ")) + #t)))) + '()))) + (inputs `(("ncurses" ,ncurses))) + ;; When cross-compiling, texinfo will build some of it's own binaries with + ;; the native compiler. This means ncurses is needed both in both inputs + ;; and native-inputs. + (native-inputs `(("perl" ,perl) + ("ncurses" ,ncurses))) (native-search-paths ;; This is the variable used by the standalone Info reader. -- 2.20.1