From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH 01/10] gnu: cross: Use CROSS_*_INCLUDE_PATH for system headers. Date: Sat, 14 May 2016 01:29:13 -0400 Message-ID: <87vb2h2onq.fsf@netris.org> References: <1461942751-23883-1-git-send-email-janneke@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1S95-0006af-LS for guix-devel@gnu.org; Sat, 14 May 2016 01:29:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1S8z-0000ZI-I4 for guix-devel@gnu.org; Sat, 14 May 2016 01:29:46 -0400 In-Reply-To: <1461942751-23883-1-git-send-email-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 29 Apr 2016 17:12:22 +0200") 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.org@gnu.org Sender: "Guix-devel" To: Jan Nieuwenhuizen Cc: guix-devel@gnu.org Hi Jan, Jan Nieuwenhuizen writes: > * gnu/packages/patches/gcc-cross-environment-variables.patch: Also use CR= OSS_ > variants: CROSS_C_INCLUDE_PATH, CROSS_CPLUS_INCLUDE_PATH, > CROSS_OBJC_INCLUDE_PATH, CROSS_OBJCPLUS_INCLUDE_PATH to be used for system > libraries, see > https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00620.html. > * gnu/packages/cross-base.scm (cross-gcc, cross-gcc-arguments, cross-libc= ): > Use CROSS_*_INCLUDE_PATH (WAS: CPATH). This patch, pushed to master about two weeks ago as commit efc4eb147512fa7a2c6d74d9b296cfc22b1ef198, broke 79 cross-compiled builds on hydra: http://hydra.gnu.org/eval/108933#tabs-now-fail The problem is that 'cross-libc' creates build-side code that uses 'cut' from srfi-26, although (srfi srfi-26) is not loaded on the build side: > @@ -316,9 +330,13 @@ XBINUTILS and the cross tool chain." > `(alist-cons-before > 'configure 'set-cross-linux-headers-path > (lambda* (#:key inputs #:allow-other-keys) > - (let ((linux (assoc-ref inputs "linux-headers"))) > - (setenv "CROSS_CPATH" > - (string-append linux "/include")) > + (let* ((linux (assoc-ref inputs "linux-headers")) > + (cpath (string-append linux "/include"))) > + (for-each (cut setenv <> cpath) > + '("CROSS_C_INCLUDE_PATH" > + "CROSS_CPLUS_INCLUDE_PATH" > + "CROSS_OBJC_INCLUDE_PATH" > + "CROSS_OBJCPLUS_INCLUDE_PATH"))=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 > #t)) > ,phases)))) Leading to "ERROR: Unbound variable: cut". http://hydra.gnu.org/build/1185432/nixlog/3/tail-reload In contrast, 'cross-gcc', which also uses 'cut' in its build-side code, arranges to have (srfi srfi-26) loaded via the '#:modules' argument (lines 232-240 of cross-base.scm): (arguments `(#:implicit-inputs? #f #:modules ((guix build gnu-build-system) (guix build utils) (ice-9 regex) (srfi srfi-1) (srfi srfi-26)) ,@(cross-gcc-arguments target libc))) In addition to this problem with 'cut', there was also a syntax error corrected by Ludovic in commit 0a0884c9916d2d4632c6b86a917ce1fa038cf7a7: commit 0a0884c9916d2d4632c6b86a917ce1fa038cf7a7 Author: Ludovic Court=C3=A8s Date: Tue May 3 23:43:49 2016 +0200 gnu: cross: Fix typo. * gnu/packages/cross-base.scm (cross-gcc-arguments): Remove erroneous 'else' introduced in efc4eb147512fa7a2c6d74d9b296cfc22b1ef198. diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 7c76f60..73ac76a 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -199,8 +199,8 @@ may be either a libc package or #f.)" "OBJCPLUS_INCLUDE_PATH" "LIBRARY_PATH")) #t)) - ,phases)) - (else phases))))))) + ,phases) + phases))))))) =20=20=20 (define (cross-gcc-patches target) "Return GCC patches needed for TARGET." Given the non-trivial nature of these changes, I assume that you tested your patch set before submitting it, which leads me to conclude that you accidentally sent us a different, untested version of this patch. Can you try to find the version that you tested? Anyway, thanks for your efforts on this important work! Mark