all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>,
	"Danny Milosavljevic" <dannym@scratchpost.org>
Cc: guix-devel@gnu.org
Subject: Re: Crosscompiling C++ for powerpc64le fails
Date: Mon, 03 Jun 2019 20:30:59 +0200	[thread overview]
Message-ID: <8736kq8qsc.fsf@devup.no> (raw)
In-Reply-To: <87tvdal27b.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]

Ludovic Courtès <ludo@gnu.org> writes:

> Hi Danny,
>
> Danny Milosavljevic <dannym@scratchpost.org> skribis:
>
>> I've investigated a bit more:
>>
>> Guix's gcc-4.7 passes
>>
>>   (string-append "--with-native-system-header-dir=" libc "/include")
>>   where libc is (assoc-ref %build-inputs "libc")
>>
>> .
>>
>> However, further down, there is
>>
>>                 `(let* ((libc        (assoc-ref %build-inputs "libc"))
>>                        (libc-native (or (assoc-ref %build-inputs "libc-native")
>>                                         libc)))
>>
>>
>> which makes me think that "--with-native-system-header-dir=" should use
>> libc-native if the latter is present.
>>
>> It would be possible to pass "--with-headers=" to gcc which would make it copy
>> the specified directory into the gcc installation directory and everything
>> would work without weird workarounds.
>
> You’re probably right, it would be worth giving it a try.
>
> The weird thing is that:
>
>   guix build mpfr --target=arm-linux-gnueabihf
>
> works fine on current master, which uses GCC 5.5 for cross-compilation.
>
> The issue that Tobias reports reminds me of the CPATH vs. C_INCLUDE_PATH
> issue that was causing troubles with newer GCCs, and that I think Marius
> addressed in ‘core-updates’ (?).  Marius, does that ring a bell?

Unfortunately there are still issues with cross-compiling C++ on
'core-updates'.  For 'C', the workaround was to go back to "CROSS_CPATH"
instead of "CROSS_C_INCLUDE_PATH", like with native builds.

For native builds on core-updates, GCC7 occasionally fails if the libc
or kernel headers are not on C_INCUDE_PATH (see e.g. f90d6c3).  It could
be that cross builds need a similar workaround, but I have not found the
magic incantation yet.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2019-06-03 18:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 16:07 Crosscompiling C++ for powerpc64le fails Tobias Platen
2019-05-28 18:31 ` Danny Milosavljevic
2019-05-29 10:10   ` Danny Milosavljevic
2019-05-31 21:54     ` Ludovic Courtès
2019-06-03 18:30       ` Marius Bakke [this message]
2019-06-05 13:04         ` Ludovic Courtès
2019-06-06 18:35           ` Marius Bakke

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=8736kq8qsc.fsf@devup.no \
    --to=mbakke@fastmail.com \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.