From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24183 invoked by alias); 25 Aug 2016 19:04:06 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Received: (qmail 24168 invoked by uid 89); 25 Aug 2016 19:04:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=adk, offer X-HELO: helium.openadk.org Received: from helium.openadk.org (HELO helium.openadk.org) (89.238.66.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Aug 2016 19:03:55 +0000 Received: by helium.openadk.org (Postfix, from userid 1000) id EB68110152; Thu, 25 Aug 2016 21:02:16 +0200 (CEST) Date: Thu, 25 Aug 2016 19:04:00 -0000 From: Waldemar Brodkorb To: John Tipper Cc: "crossgcc@sourceware.org" Subject: Re: Compiling toolchain for x86_64 linux on OSX - error when installing kernel headers Message-ID: <20160825190216.GE2007@waldemar-brodkorb.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00023.txt.bz2 Hi John, John Tipper wrote, > Hi All, > > I'm trying to create a toolchain for x86_64 linux on a 64 bit Mac running OSX 10.9.5 and using crosstool-ng-1.22.0. I have tried building using a number of the samples ("x86_64-w64-mingw32,x86_64-pc-linux-gnu" and "x86_64-unknown-linux-gnu") but I am running into build errors, as shown below. I am not building the gold linker, nor am I attempting to link statically, and I am building on a case-sensitive file system. The build.log and config are shown after the error listing. > > It looks as though the build environment is perhaps looking for OSX header files (within /usr/include) when installing/building the kernel headers, rather than Linux ones, but I don't know what to do to fix this. > > Can anyone please offer advice for what I need to do to build successfully? This has also been posted on stack overflow (http://stackoverflow.com/questions/39140110/crosstools-ng-compiling-toolchain-for-x86-64-linux-on-osx-error-when-installi), so feel free to answer there if you'd prefer. > > [INFO ] Installing kernel headers > [EXTRA] Installing kernel headers > [ERROR] /usr/include/bits/types.h:43:25: error: typedef redefinition with different types ('long' vs 'long long') > [ERROR] /usr/include/bits/types.h:44:27: error: typedef redefinition with different types ('unsigned long' vs 'unsigned long long') > [ERROR] /Volumes/CaseSensitiveLinux/ct-ng/.build/src/linux-3.12.50/arch/x86/tools/relocs.h:15:10: fatal error: 'endian.h' file not found > [ERROR] make[3]: *** [arch/x86/tools/relocs_32.o] Error 1 I think MacOS X support is incomplete. For x86_64 toolchain creation you require to provide some endian.h. In OpenADK I use: http://cgit.openadk.org/cgi/cgit/openadk.git/tree/adk/include Which is included via HOST_EXTRACFLAGS: http://cgit.openadk.org/cgi/cgit/openadk.git/tree/mk/kernel-vars.mk best regards Waldemar -- For unsubscribe information see http://sourceware.org/lists.html#faq