From patchwork Thu Oct 4 06:18:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Holsgrove X-Patchwork-Id: 189052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 1FDB92C036F for ; Thu, 4 Oct 2012 16:18:57 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sourceware.org; s=default; x=1349936338; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:In-Reply-To:References:From:Date: Message-ID:Subject:To:Cc:Content-Type:Content-Transfer-Encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Subscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=Iz9jWco OyNfY3Xt9uR+0P+CRGcc=; b=Eg/+ejU83PdQx37VK9xmGy5exa73wSy8jux6IIE iSV88iSleLv4DAbXO2yiPtcOLgmOutDulme79jOhI/Heorxam1Qbu00N61SHE22+ IzA5ByHFOSA4zdbT/sw3TXhPdZ5pTBJ8kp6/iLJqIn+l5Xly7oJq/cLYIunTRs7y OPuI= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=sourceware.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:MIME-Version:Received:In-Reply-To:References:From:Date:Message-ID:Subject:To:Cc:Content-Type:Content-Transfer-Encoding:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=tVyF4kqZaYllkLBLKFSey+KTqZYodWhVP+SAt/21A6rUjv23bP9JuXCedsYdfE 4h/O+SvYhRiR6nKzk/Mk7P6BUjh+quXlDHGbQCmdzF6KAzRLbQYnLh4DxqqgNQBs 0pE6+0k+XRJ8tshzUoLWH0o5rl1zBgfiikZFkKDjxR6cI=; Received: (qmail 9029 invoked by alias); 4 Oct 2012 06:18:51 -0000 Received: (qmail 9021 invoked by uid 22791); 4 Oct 2012 06:18:49 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Oct 2012 06:18:43 +0000 Received: by mail-vb0-f41.google.com with SMTP id v13so167226vbk.0 for ; Wed, 03 Oct 2012 23:18:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=ru751bs56POowsLkbCIXMfflzb0+Pzw6etKHHJHOyWY=; b=Tj0WDFMf1c0nFBtK2wHU25FmQMQMp6Jng8stts6fSYQblFgtn4bB/N/tXHbwci46VN 4q7NtQNB1Qnn+KVCKmByAtu1nk8Dwribbuh6n9doQFJy7+PFXM712hijw0PusKz6oSGe yagbaIsezaj5HAypKS2icIUlQlnZ186tnNf41GpkcO8O3XJNQsa79THPcTqNIpoopX7w cqFt/Oe7w27ffgv7E3bORLb+XwcgRl0phFnN0carm3JZqOq+qIcAEnowiX7BqsidaFjs x3qxg6o/HI98RhXtdBvlsIWhx22riX/j/yVuDdgpFSGk3DFc8xd4y5ry00MBZUNQZAar 1gHQ== Received: by 10.52.97.34 with SMTP id dx2mr2134171vdb.10.1349331522814; Wed, 03 Oct 2012 23:18:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.219.166 with HTTP; Wed, 3 Oct 2012 23:18:21 -0700 (PDT) In-Reply-To: <50424066.3020609@comfile.co.kr> References: <50424066.3020609@comfile.co.kr> From: David Holsgrove Date: Thu, 4 Oct 2012 16:18:21 +1000 Message-ID: Subject: Re: libstdc++ configuration error, ct-ng v1.16.0 To: mfranklin@comfile.co.kr Cc: crossgcc@sourceware.org X-Gm-Message-State: ALoCoQlRzk/eR+dTXB4nnwxerINC1pPnYJDvzLWpdIq+U1FQGX19KdsRmWr6oYD8/Wiix1Jk13gR X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Hi Mike, All On 2 September 2012 03:05, Michael Franklin wrote: > Hello, > > I'm having trouble understanding an error I'm receiving in the 'Installing > final compiler for build' stage. It occurs when configuring libstdc++. I'm > hoping one of you swell folks would be willing to help me decipher it and > maybe suggest a solution. (See build log below) > > I'm trying a Canadian Cross, and here's my setup > Build machine: Linux Mint 64 (resident GCC) > Host: x86_64-w64-mingw32 (mingw-w64 packages installed with Synaptic Package > Manager) > Target: arm-none-eabi > > I've installed just about all packages with mingw and w64 in the name, so I > think I have all the necessary tools, headers, and libraries. Also I've > already built an arm-none-eabi Linux Mint compiler without any trouble > (Thanks to the crosstools-ng community for making it so easy) > > It appears to me I'm missing some headers, but I think the headers just > can't be found. Maybe one of you can help me understand a little better. > > Thanks, > Mike > > > Here's out output from the build.log. > ************************************************************************** [SNIP] > [ERROR] checking for the value of EOF... configure: error: computing EOF > failed > [ERROR] make[1]: *** [configure-target-libstdc++-v3] Error 1 I recently ran into the same error, with a similar canadian cross setup with a baremetal target. I hacked / worked around it with the patch below - I'd be interested to see if this is roughly the right approach, and if it's something we can include in CT-NG? thanks, David # HG changeset patch # User David Holsgrove # Date 1348552500 -36000 # Node ID 2df8f5a184b721e66a24db1aef61529691195393 # Parent 43ace4bb005eef085437e3d4fbaef528ef0ef005 scripts/gcc.sh: Add copyheaders section for baremetal canadian Canadian Cross compile for baremetal fails with error; checking for the value of EOF... configure: error: computing EOF failed which is due to libstdc++ configure not being able to find stdio.h We can copy the required headers from the newlib source into the prefix include directory - to ensure both the final compiler for build and final compiler for host have access. Signed-off-by: "David Holsgrove" 'static', 'shared' or 'baremetal', not '${mode:-(empty)}'" @@ -221,8 +221,13 @@ fi if [ "${copy_headers}" = "y" ]; then - CT_DoLog DEBUG "Copying headers to install area of bootstrap gcc, so it can build libgcc2" - CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include" + if [ "${mode}" = "baremetal" ]; then + CT_DoLog DEBUG "Copying headers from newlib source to install area of bootstrap gcc, so it can build libstdc++" + CT_DoExecLog ALL cp -a "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/newlib/libc/include/." "${prefix}/${CT_TARGET}/include" + else + CT_DoLog DEBUG "Copying headers to install area of bootstrap gcc, so it can build libgcc2" + CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include" + fi fi for tmp in ARCH ABI CPU TUNE FPU FLOAT; do --- For unsubscribe information see http://sourceware.org/lists.html#faq diff -r 43ace4bb005e -r 2df8f5a184b7 scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Wed Sep 26 16:37:31 2012 +0200 +++ b/scripts/build/cc/gcc.sh Tue Sep 25 15:55:00 2012 +1000 @@ -207,7 +207,7 @@ extra_config+=("--with-newlib") extra_config+=("--enable-threads=no") extra_config+=("--disable-shared") - copy_headers=n + copy_headers=y ;; *) CT_Abort "Internal Error: 'mode' must be one of: