Re: Trying to crosscompile for POWER9

2018-10-30 Thread Chris Marusich
Hi Tobias!

Thank you for trying things out for POWER9!  I'm also interested in this
platform, although I have to admit I don't own any hardware (yet!) and
haven't tried it out.  I've only read about it so far.

Tobias Platen  writes:

> On 10/22/2018 06:39 PM, Leo Famulari wrote:
>> On Sun, Oct 21, 2018 at 08:30:03AM +0200, Tobias Platen wrote:
>>> On 10/20/2018 09:09 PM, Tobias Platen wrote:
>>> Here are the build logs from guix. I have tried building the toolchain
>>> twice, but in both cases glibc failed to build.
>>
>> [...]
>>
>>> running configure fragment for sysdeps/powerpc/powerpc64/le
>>> checking if powerpc64le-linux-gcc supports binary128 floating point
>>> type... no
>>> checking if the target machine is at least POWER8... yes
>>> configure: error: *** binary128 floating point type (GCC >= 6.2) is
>>> required on powerpc64le.
>>
>> Searching around, I found other distros hit the same problem for their
>> POWER ports, and needed to explicitly configure GCC >= 6.2 to build with
>> 128-bit floating point types. Specifically, with the option
>> '--with-long-double-128':
>>
>> https://github.com/advancetoolchain/advance-toolchain/commit/e22696eecb39c6b401df14001f01608807e4d934
>> http://lists.busybox.net/pipermail/buildroot/2017-August/200952.html
>>
>> I hope that helps!
>>
> I modified the file "gnu/packages/cross-base.scm" and the cross gcc
> still does not support 128-bit floating point types. How do I trigger
> a rebuild of the cross compiler so I can verify that it is configured
> correctly.

You can try to cross-build something as usual, I suppose.  It's a bit
heavy-handed, since it will try to build the entire cross-compilation
toolchain also, but it might work.

To see if you can build *just* the cross-compiler, you might need to get
tricky.  For example, you might need to break out a Guile REPL, load
some Guix modules, and manually hack around with some of the code in
gnu/packages/cross-base.scm.  In theory, you ought to be able to create
a package or a derivation that builds the cross-compiler you are using,
or a cross-compiler that is similar to it.

That's all the advice I can think of right now.  You're not alone - I've
fumbled around quite a bit while learning how Guix does its
cross-compilation and bootstrapping.  It's not easy going, but hopefully
you will be able to find a way forward.  Good luck!

-- 
Chris


signature.asc
Description: PGP signature


Re: Trying to crosscompile for POWER9

2018-10-22 Thread Leo Famulari
On Sun, Oct 21, 2018 at 08:30:03AM +0200, Tobias Platen wrote:
> On 10/20/2018 09:09 PM, Tobias Platen wrote:
> Here are the build logs from guix. I have tried building the toolchain
> twice, but in both cases glibc failed to build.

[...]

> running configure fragment for sysdeps/powerpc/powerpc64/le
> checking if powerpc64le-linux-gcc supports binary128 floating point type... no
> checking if the target machine is at least POWER8... yes
> configure: error: ***  binary128 floating point type (GCC >= 6.2) is required 
> on powerpc64le.

Searching around, I found other distros hit the same problem for their
POWER ports, and needed to explicitly configure GCC >= 6.2 to build with
128-bit floating point types. Specifically, with the option
'--with-long-double-128':

https://github.com/advancetoolchain/advance-toolchain/commit/e22696eecb39c6b401df14001f01608807e4d934
http://lists.busybox.net/pipermail/buildroot/2017-August/200952.html

I hope that helps!


signature.asc
Description: PGP signature


Re: Trying to crosscompile for POWER9

2018-10-20 Thread Tobias Platen

It is the same error in both cases.
the binary128 type is not avialable in gcc, but requires for glibc to build.
Im now trying out the GCC 7 branch

On 10/20/2018 08:31 PM, Efraim Flashner wrote:

On Sat, Oct 20, 2018 at 05:05:35PM +0200, Tobias Platen wrote:



On 10/16/2018 08:24 PM, Efraim Flashner wrote:

On Tue, Oct 16, 2018 at 08:08:27PM +0200, Tobias Platen wrote:

Hello,

When I try to compile GUIX for POWER9 an old version of GCC is used.
How do I use the gcc version used for cross compiling.

./pre-inst-env guix build --target=powerpc64le-linux hello

checking if powerpc64le-linux-gcc supports
binary128 floating point type... no
checking if the target machine is at least POWER8... yes

configure: error: ***
binary128 floating point type (GCC >= 6.2) is required on powerpc64le.

Tobias "Tomoko" Platen



I'd recommend starting by editing gnu/packages/make-bootstrap.scm:103
and change the line:
`(("cross-gcc"  ,(cross-gcc target
to:
`(("cross-gcc"  ,(cross-gcc target #:gcc-6

there are other places, like lines 110 and 391 (and possibly others) which
should be turned to (inherit gcc-6)

That should work for this round, then you can decide if it's worth
upstreaming and wrap it in 'match' keywords for some of the newer
architectures (like riskv).


It still fails after changing to gcc 6


Where does it fail? It'd be nice if we can get it to work.





Re: Trying to crosscompile for POWER9

2018-10-20 Thread Efraim Flashner
On Sat, Oct 20, 2018 at 05:05:35PM +0200, Tobias Platen wrote:
> 
> 
> On 10/16/2018 08:24 PM, Efraim Flashner wrote:
> > On Tue, Oct 16, 2018 at 08:08:27PM +0200, Tobias Platen wrote:
> > > Hello,
> > > 
> > > When I try to compile GUIX for POWER9 an old version of GCC is used.
> > > How do I use the gcc version used for cross compiling.
> > > 
> > > ./pre-inst-env guix build --target=powerpc64le-linux hello
> > > 
> > > checking if powerpc64le-linux-gcc supports
> > > binary128 floating point type... no
> > > checking if the target machine is at least POWER8... yes
> > > 
> > > configure: error: ***
> > > binary128 floating point type (GCC >= 6.2) is required on powerpc64le.
> > > 
> > > Tobias "Tomoko" Platen
> > > 
> > 
> > I'd recommend starting by editing gnu/packages/make-bootstrap.scm:103
> > and change the line:
> > `(("cross-gcc"  ,(cross-gcc target
> > to:
> > `(("cross-gcc"  ,(cross-gcc target #:gcc-6
> > 
> > there are other places, like lines 110 and 391 (and possibly others) which
> > should be turned to (inherit gcc-6)
> > 
> > That should work for this round, then you can decide if it's worth
> > upstreaming and wrap it in 'match' keywords for some of the newer
> > architectures (like riskv).
> > 
> It still fails after changing to gcc 6

Where does it fail? It'd be nice if we can get it to work.

-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: Trying to crosscompile for POWER9

2018-10-20 Thread Tobias Platen




On 10/16/2018 08:24 PM, Efraim Flashner wrote:

On Tue, Oct 16, 2018 at 08:08:27PM +0200, Tobias Platen wrote:

Hello,

When I try to compile GUIX for POWER9 an old version of GCC is used.
How do I use the gcc version used for cross compiling.

./pre-inst-env guix build --target=powerpc64le-linux hello

checking if powerpc64le-linux-gcc supports
binary128 floating point type... no
checking if the target machine is at least POWER8... yes

configure: error: ***
binary128 floating point type (GCC >= 6.2) is required on powerpc64le.

Tobias "Tomoko" Platen



I'd recommend starting by editing gnu/packages/make-bootstrap.scm:103
and change the line:
`(("cross-gcc"  ,(cross-gcc target
to:
`(("cross-gcc"  ,(cross-gcc target #:gcc-6

there are other places, like lines 110 and 391 (and possibly others) which
should be turned to (inherit gcc-6)

That should work for this round, then you can decide if it's worth
upstreaming and wrap it in 'match' keywords for some of the newer
architectures (like riskv).


It still fails after changing to gcc 6



Re: Trying to crosscompile for POWER9

2018-10-19 Thread Ludovic Courtès
Hello Tobias,

Good to see you here.  :-)

Tobias Platen  skribis:

> When I try to compile GUIX for POWER9 an old version of GCC is used.
> How do I use the gcc version used for cross compiling.
>
> ./pre-inst-env guix build --target=powerpc64le-linux hello

Note that --target expects a GNU triplet.  So it should be:

  --target=powerpc64le-linux-gnu

That said, it may not fix the issue you encountered, as others
explained.

Thanks,
Ludo’.



Re: Trying to crosscompile for POWER9

2018-10-17 Thread Marius Bakke
Jonathan Brielmaier  writes:

> On 10/16/18 8:08 PM, Tobias Platen wrote:
>> Hello,
>> 
>> When I try to compile GUIX for POWER9 an old version of GCC is used.
>> How do I use the gcc version used for cross compiling.
>> 
>> ./pre-inst-env guix build --target=powerpc64le-linux hello
>> 
>> checking if powerpc64le-linux-gcc supports
>> binary128 floating point type... no
>> checking if the target machine is at least POWER8... yes
>> 
>> configure: error: ***
>> binary128 floating point type (GCC >= 6.2) is required on powerpc64le.
>> 
>> Tobias "Tomoko" Platen
>> 
>
> Note that Marius Bakke started a branch to update guix to gcc7:
> https://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-gcc7
>
> This could be maybe a good starting point. The bug number is: bug#32953

Note that the cross-toolchain is broken in that branch, so it won't get
very far.  I hope to resolve that in the coming weeks and merge it to
'core-updates-next'.

Efraims suggestion is probably the best bet for now.


signature.asc
Description: PGP signature


Re: Trying to crosscompile for POWER9

2018-10-16 Thread Jonathan Brielmaier
On 10/16/18 8:08 PM, Tobias Platen wrote:
> Hello,
> 
> When I try to compile GUIX for POWER9 an old version of GCC is used.
> How do I use the gcc version used for cross compiling.
> 
> ./pre-inst-env guix build --target=powerpc64le-linux hello
> 
> checking if powerpc64le-linux-gcc supports
> binary128 floating point type... no
> checking if the target machine is at least POWER8... yes
> 
> configure: error: ***
> binary128 floating point type (GCC >= 6.2) is required on powerpc64le.
> 
> Tobias "Tomoko" Platen
> 

Note that Marius Bakke started a branch to update guix to gcc7:
https://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-gcc7

This could be maybe a good starting point. The bug number is: bug#32953



Re: Trying to crosscompile for POWER9

2018-10-16 Thread Efraim Flashner
On Tue, Oct 16, 2018 at 08:08:27PM +0200, Tobias Platen wrote:
> Hello,
> 
> When I try to compile GUIX for POWER9 an old version of GCC is used.
> How do I use the gcc version used for cross compiling.
> 
> ./pre-inst-env guix build --target=powerpc64le-linux hello
> 
> checking if powerpc64le-linux-gcc supports
> binary128 floating point type... no
> checking if the target machine is at least POWER8... yes
> 
> configure: error: ***
> binary128 floating point type (GCC >= 6.2) is required on powerpc64le.
> 
> Tobias "Tomoko" Platen
> 

I'd recommend starting by editing gnu/packages/make-bootstrap.scm:103
and change the line:
`(("cross-gcc"  ,(cross-gcc target
to:
`(("cross-gcc"  ,(cross-gcc target #:gcc-6

there are other places, like lines 110 and 391 (and possibly others) which
should be turned to (inherit gcc-6)

That should work for this round, then you can decide if it's worth
upstreaming and wrap it in 'match' keywords for some of the newer
architectures (like riskv).

-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Trying to crosscompile for POWER9

2018-10-16 Thread Tobias Platen

Hello,

When I try to compile GUIX for POWER9 an old version of GCC is used.
How do I use the gcc version used for cross compiling.

./pre-inst-env guix build --target=powerpc64le-linux hello

checking if powerpc64le-linux-gcc supports
binary128 floating point type... no
checking if the target machine is at least POWER8... yes

configure: error: ***
binary128 floating point type (GCC >= 6.2) is required on powerpc64le.

Tobias "Tomoko" Platen