From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Benc Subject: Re: problem with building gcc-cross-4.8.3 for i686-pc-gnu Date: Sat, 31 Jan 2015 11:27:03 +0100 Message-ID: <54CCADF7.6090708@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070808020900070505080808" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHVGa-0007s8-Nc for guix-devel@gnu.org; Sat, 31 Jan 2015 05:27:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHVGX-0005IU-Gx for guix-devel@gnu.org; Sat, 31 Jan 2015 05:27:04 -0500 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:50528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHVGX-0005I2-B6 for guix-devel@gnu.org; Sat, 31 Jan 2015 05:27:01 -0500 Received: by mail-wg0-f42.google.com with SMTP id x13so30976422wgg.1 for ; Sat, 31 Jan 2015 02:27:00 -0800 (PST) References: CAFtzXzN3Tu4+n5ku7wNqxKXm4e1D5O64OamZWN2-Gni8Aza_eA@mail.gmail.com 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: manolis837@gmail.com Cc: guix-devel@gnu.org This is a multi-part message in MIME format. --------------070808020900070505080808 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Could you try out the patch in this email? Now, the problem is that GCC is configured with the native ld.so as the target system's dynamic linker. I'm not sure what code is responsible for that, but on the wip-hurd branch, this exact same problem happens for other platforms as well. In particular, it happened when I tried: $ ./pre-inst-env guix build coreutils --target=i686-pc-linux-gnu -K on an x86_64 box. -- Marek. --------------070808020900070505080808 Content-Type: text/x-patch; name="set-cross-path-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="set-cross-path-fix.patch" --- guix.old/gnu/packages/cross-base.scm 2015-01-31 11:06:42.025984113 +0100 +++ guix/gnu/packages/cross-base.scm 2015-01-31 10:37:35.290053633 +0100 @@ -151,21 +151,33 @@ `(alist-cons-before 'configure 'set-cross-path (lambda* (#:key inputs #:allow-other-keys) - ;; Add the cross Linux headers to CROSS_CPATH, and remove + ;; Add the cross kernel headers to CROSS_CPATH, and remove ;; them from CPATH. (let ((libc (assoc-ref inputs "libc")) (linux (assoc-ref inputs - "libc/cross-linux-headers"))) + "libc/cross-linux-headers")) + (mach (assoc-ref inputs + "libc/cross-gnumach-headers")) + (hurd (assoc-ref inputs + "libc/cross-hurd-headers")) + (hurd-minimal (assoc-ref inputs + "libc/cross-hurd-minimal"))) (define (cross? x) - ;; Return #t if X is a cross-libc or cross Linux. + ;; Return #t if X is a cross-libc or a cross-kernel. (or (string-prefix? libc x) - (string-prefix? linux x))) + (if linux (string-prefix? linux x) #f) + (if hurd (string-prefix? hurd x) #f) + (if mach (string-prefix? mach x) #f) + (if hurd-minimal (string-prefix? hurd-minimal x) #f))) (setenv "CROSS_CPATH" - (string-append libc "/include:" - linux "/include")) + (string-append libc "/include" + (if linux (string-append ":" linux "/include") "") + (if hurd (string-append ":" hurd "/include" + ":" mach "/include") ""))) (setenv "CROSS_LIBRARY_PATH" - (string-append libc "/lib")) + (string-append libc "/lib" + (if hurd-minimal (string-append ":" hurd-minimal "/lib") ""))) (let ((cpath (search-path-as-string->list (getenv "CPATH"))) --------------070808020900070505080808--