unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* rfh: mingw guile.exe stalled by impact of 28dc10a4
@ 2016-06-05 12:05 Jan Nieuwenhuizen
  2016-06-05 20:13 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2016-06-05 12:05 UTC (permalink / raw)
  To: guix-devel

Hi,

Last weekend I have been preparing my v9 patch set for the Mingw32 Guile
cross build, incorporating all comments that I got on v8 (thanks Andy
and Ludovic!).

I rebased onto latest master and made a script running some tests on
every single commit of the series, only to find out that after rebasing,
readline did not cross build anymore.

Since then I got somewhat closer but still do not understand what's
going on.  When I revert

    commit 28dc10a455689c807abc9241ed1094d902a9d9fa
    Author: Ludovic Courtès <ludo@gnu.org>
    Date:   Sun May 29 23:15:14 2016 +0200

        gnu: glibc: Refer to the target kernel headers when cross-compiling.

    ...

    diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
    index beb689e..b5e229e 100644
    --- a/gnu/packages/base.scm
    +++ b/gnu/packages/base.scm
    @@ -532,7 +532,10 @@ store.")
                                ,version)

                 (string-append "--with-headers="
    -                           (assoc-ref %build-inputs "linux-headers")
    +                           (assoc-ref ,(if (%current-target-system)
    +                                           '%build-target-inputs
    +                                           '%build-inputs)
    +                                      "linux-headers")
                                "/include")

                 ;; This is the default for most architectures as of GNU libc 2.21,

then readline (and guile) can be cross-built for mingw.

However, with this commit present, when cross building readline on my v9
branch (https://gitlab.com/janneke/guix) like so:

    ./pre-inst-env guix build --target=i686-w64-mingw32 readline

this now triggers the build of gcc-cross-sans-libc-x86_64-linux-gnu
and gcc-x86_64-linux-gnu.

Building gcc-cross-sans-libc-x86_64-linux-gnu failed.  I added a commit
to disable some libraries

    +              "--disable-libvtv" ;x86_64-linux: needs libc
    +              "--disable-libitm" ;x86_64-linux: needs libc
    +              "--disable-libsanitizer" ;x86_64-linux: needs libc

and then both these cross compilers build.  After that, still triggered
by the readline cross buld, it fails trying to cross build make-boot0,
like so

    @ build-started /gnu/store/m6gq2xz5kd3vn4zm1i0i6j0immlgyhmg-make-boot0-4.1.drv - x86_64-linux /var/log/guix/drvs/m6//gq2xz5kd3vn4zm1i0i6j0immlgyhmg-make-boot0-4.1.drv.bz2
    ...
    starting phase `install-locale'
    warning: failed to install 'en_US.utf8' locale: Invalid argument
    phase `install-locale' succeeded after 0.0 seconds
    starting phase `unpack'
    In execvp of tar: No such file or directory
    phase `unpack' failed after 0.0 seconds
    builder for `/gnu/store/m6gq2xz5kd3vn4zm1i0i6j0immlgyhmg-make-boot0-4.1.drv' failed with exit code 1
    @ build-failed /gnu/store/m6gq2xz5kd3vn4zm1i0i6j0immlgyhmg-make-boot0-4.1.drv - 1 builder for `/gnu/store/m6gq2xz5kd3vn4zm1i0i6j0immlgyhmg-make-boot0-4.1.drv' failed with exit code 1
    cannot build derivation `/gnu/store/1fjnm2x2az4z4qaz3bad5p5zbygf5wqs-gcc-cross-boot0-4.9.3.drv': 1 dependencies couldn't be built
    guix build: error: build failed: build of `/gnu/store/1fjnm2x2az4z4qaz3bad5p5zbygf5wqs-gcc-cross-boot0-4.9.3.drv' failed

I don't know what direction to go now.  Is this package also supposed to
be built or not?  Why does it fail, should it be fixed?  Should the
x86_64 gcc cross compilers get built, or maybe not?  Why do they fail?
etc.

Any help much appreciated.

Greetings,
Jan

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rfh: mingw guile.exe stalled by impact of 28dc10a4
  2016-06-05 12:05 rfh: mingw guile.exe stalled by impact of 28dc10a4 Jan Nieuwenhuizen
@ 2016-06-05 20:13 ` Ludovic Courtès
  2016-06-05 20:26   ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2016-06-05 20:13 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

Hello!

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> Since then I got somewhat closer but still do not understand what's
> going on.  When I revert
>
>     commit 28dc10a455689c807abc9241ed1094d902a9d9fa
>     Author: Ludovic Courtès <ludo@gnu.org>
>     Date:   Sun May 29 23:15:14 2016 +0200
>
>         gnu: glibc: Refer to the target kernel headers when cross-compiling.
>
>     ...
>
>     diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
>     index beb689e..b5e229e 100644
>     --- a/gnu/packages/base.scm
>     +++ b/gnu/packages/base.scm
>     @@ -532,7 +532,10 @@ store.")
>                                 ,version)
>
>                  (string-append "--with-headers="
>     -                           (assoc-ref %build-inputs "linux-headers")
>     +                           (assoc-ref ,(if (%current-target-system)
>     +                                           '%build-target-inputs
>     +                                           '%build-inputs)
>     +                                      "linux-headers")
>                                 "/include")
>
>                  ;; This is the default for most architectures as of GNU libc 2.21,
>
> then readline (and guile) can be cross-built for mingw.
>
> However, with this commit present, when cross building readline on my v9
> branch (https://gitlab.com/janneke/guix) like so:
>
>     ./pre-inst-env guix build --target=i686-w64-mingw32 readline
>
> this now triggers the build of gcc-cross-sans-libc-x86_64-linux-gnu
> and gcc-x86_64-linux-gnu.

Hmm the above commit normally cannot trigger anything since it simply
modifies “build-side” code (that is, it does not change the inputs of
packages; it just changes the content of the build program.)

Are you sure that reverting this commit solves the problem?

Maybe we’re entering a cross-build context with ‘%current-target-system’
set to ‘x86_64-linux-gnu’ at some point?

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rfh: mingw guile.exe stalled by impact of 28dc10a4
  2016-06-05 20:13 ` Ludovic Courtès
@ 2016-06-05 20:26   ` Jan Nieuwenhuizen
  2016-06-11  9:02     ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2016-06-05 20:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès writes:

> Hmm the above commit normally cannot trigger anything since it simply
> modifies “build-side” code (that is, it does not change the inputs of
> packages; it just changes the content of the build program.)

Hmm, could it be then that everything that this commits seems to trigger
has an already sucessfully built version in the store that matches the
description without the commit (cross x86_64 gcc, bootrap gcc etc).

In that case, it "simply" breaks cross gcc and bootstrap gcc?  However,
I fail to see how this happens.  And "tar" missing

    In execvp of tar: No such file or directory

during

    builder for `/gnu/store/m6gq2xz5kd3vn4zm1i0i6j0immlgyhmg-make-boot0-4.1.drv' failed with exit code 1
    cannot build derivation `/gnu/store/1fjnm2x2az4z4qaz3bad5p5zbygf5wqs-gcc-cross-boot0-4.9.3.drv': 

I figured this all could/should not be the result of this commit?

> Are you sure that reverting this commit solves the problem?

Yes, reverting it produces the cross-built readline.

> Maybe we’re entering a cross-build context with ‘%current-target-system’
> set to ‘x86_64-linux-gnu’ at some point?

Yes, I'm pretty sure that's what happens.

Greetings,
Jan

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rfh: mingw guile.exe stalled by impact of 28dc10a4
  2016-06-05 20:26   ` Jan Nieuwenhuizen
@ 2016-06-11  9:02     ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2016-06-11  9:02 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Jan Nieuwenhuizen writes:

Hi!

Some more info, still no full picture.

TL;DR: 28dc10a4 breaks the cross build on master (i.e. reverting it
fixes the cross build), but core-updates has 28dc10a4 and there the
cross build works.  So cross building with 28dc10a4 depends on something
else that is in core-updates which is missing from master.

Progress at

    https://gitlab.com/janneke/guix

branches v9 and v9-core.

My v9 mingw patch set rebased on current master cannot cross build
readline

    ./pre-inst-env guix build --target=i686-w64-mingw32 readline
    ...
    @ build-failed /gnu/store/m6gq2xz5kd3vn4zm1i0i6j0immlgyhmg-make-boot0-4.1.drv - 1 builder for `/gnu/store/m6gq2xz5kd3vn4zm1i0i6j0immlgyhmg-make-boot0-4.1.drv' failed with exit code 1
    cannot build derivation `/gnu/store/1fjnm2x2az4z4qaz3bad5p5zbygf5wqs-gcc-cross-boot0-4.9.3.drv': 1 dependencies couldn't be built
    guix build: error: build failed: build of `/gnu/store/1fjnm2x2az4z4qaz3bad5p5zbygf5wqs-gcc-cross-boot0-4.9.3.drv' failed

Should that make-boot0 cross-build cross succeed...

   ./pre-inst-env guix build --target=x86_64-linux-gnu make-boot0
   guix build: error: make-boot0: unknown package

hmm, how to find out?...or should in not happen and in that case, what
erroneously makes it happen?

Reverting commit

    commit 28dc10a455689c807abc9241ed1094d902a9d9fa
    Author: Ludovic Courtès <ludo@gnu.org>
    Date:   Sun May 29 23:15:14 2016 +0200

        gnu: glibc: Refer to the target kernel headers when cross-compiling.

makes the make-boot0 error go away, readline and guile.exe cross build.
I don't know how to find out if the make-boot0 build succeeded, or did
not happen?

However I have rebased onto core-updates, which also has commit 28dc10a4,
and there readline and guile.exe cross build succeed.

So, last week I spent cherry-picking patches from core-updates onto
master in an effort to investigate what's going on.

Sofar I have tried

    fb341ca gnu: commencement: Disable Texinfo tests during bootstrap.
    461513b profiles: 'profile-derivation' now honors #:system.
    0f24c8d gnu: perl: Do not retain references to GCC & co.

and have run almost out of inspiration what to try looking at the diff
between v9 and v9-core, I have now added

    9e574f6 gnu: glibc: Update to 2.23.

and am looking at another Guile build...we'll see.
Greetings,
Jan

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-11  9:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-05 12:05 rfh: mingw guile.exe stalled by impact of 28dc10a4 Jan Nieuwenhuizen
2016-06-05 20:13 ` Ludovic Courtès
2016-06-05 20:26   ` Jan Nieuwenhuizen
2016-06-11  9:02     ` Jan Nieuwenhuizen

Code repositories for project(s) associated with this public inbox

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

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).