public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Waldemar Brodkorb <wbx@openadk.org>
To: John Tipper <john_tipper@hotmail.com>
Cc: "crossgcc@sourceware.org" <crossgcc@sourceware.org>
Subject: Re: Compiling toolchain for x86_64 linux on OSX - error when installing kernel headers
Date: Thu, 25 Aug 2016 19:04:00 -0000	[thread overview]
Message-ID: <20160825190216.GE2007@waldemar-brodkorb.de> (raw)
In-Reply-To: <VI1PR08MB0943C28A792ABA816D1D77CB99ED0@VI1PR08MB0943.eurprd08.prod.outlook.com>

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

      reply	other threads:[~2016-08-25 19:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25  9:30 John Tipper
2016-08-25 19:04 ` Waldemar Brodkorb [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160825190216.GE2007@waldemar-brodkorb.de \
    --to=wbx@openadk.org \
    --cc=crossgcc@sourceware.org \
    --cc=john_tipper@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).