A build problem on Mac

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Kazu Yamamoto (山本和彦)
Hi,

I cannot build GHC head on Mac today:

"inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O    -package-name ghc-7.7.20130907 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage2/build -icompiler/stage2/build/autogen -Icompiler/stage2/build -Icompiler/stage2/build/autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/../rts/dist/build -Icompiler/stage2   -optP-DGHCI -optP-include -optPcompiler/stage2/build/autogen/cabal_macros.h -package Cabal-1.18.0 -package array-0.4.0.2 -package base-4.7.0.0 -package bin-package-db-0.0.0.0 -package bytestring-0.10.3.0 -package containers-0.5.3.1 -package directory-1.2.0.1 -package filepath-1.3.0.2 -package hoopl-3.10.0.0 -package hpc-0.6.0.1 -package process-1.2.0.0 -package template-haskell-2.9.0.0 -package time-1.4.1 -package transformers-0.3.0.0 -package unix-2.7.0.0 -Wall -fno-warn-name-shadowing -XHaskell98 -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XBangPatterns -XNondecreasingIndentation -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -O2  -no-user-package-db -rtsopts      -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build  -dynamic-too -c compiler/deSugar/Coverage.lhs -o compiler/stage2/build/Coverage.o -dyno compiler/stage2/build/Coverage.dyn_o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.7.20130907 for i386-apple-darwin):
        expectJust block_order

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

make[1]: *** [compiler/stage2/build/Parser.o] Error 1
make[1]: *** Deleting file `compiler/stage2/build/Parser.o'
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2

--Kazu

Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Austin Seipp-4
Hi Kazu,

I believe this is related to
http://ghc.haskell.org/trac/ghc/ticket/8205 - can you try:

$ git revert d61c3ac186c94021c851f7a2a6d20631e35fc1ba

and see if your build finishes? Perhaps you can help Jan diagnose it if so...

On Sun, Sep 8, 2013 at 4:13 AM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:

> Hi,
>
> I cannot build GHC head on Mac today:
>
> "inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O    -package-name ghc-7.7.20130907 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage2/build -icompiler/stage2/build/autogen -Icompiler/stage2/build -Icompiler/stage2/build/autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/../rts/dist/build -Icompiler/stage2   -optP-DGHCI -optP-include -optPcompiler/stage2/build/autogen/cabal_macros.h -package Cabal-1.18.0 -package array-0.4.0.2 -package base-4.7.0.0 -package bin-package-db-0.0.0.0 -package bytestring-0.10.3.0 -package containers-0.5.3.1 -package directory-1.2.0.1 -package filepath-1.3.0.2 -package hoopl-3.10.0.0 -package hpc-0.6.0.1 -package process-1.2.0.0 -package template-haskell-2.9.0.0 -package time-1.4.1 -package transformers-0.3.0.0 -package unix-2.7.0.0 -Wall -fno-warn-name-shadowing -XHaskell98 -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XBangPatterns -XNondecreasingIndentation -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -O2  -no-user-package-db -rtsopts      -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build  -dynamic-too -c compiler/deSugar/Coverage.lhs -o compiler/stage2/build/Coverage.o -dyno compiler/stage2/build/Coverage.dyn_o
> ghc-stage1: panic! (the 'impossible' happened)
>   (GHC version 7.7.20130907 for i386-apple-darwin):
>         expectJust block_order
>
> Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
>
> make[1]: *** [compiler/stage2/build/Parser.o] Error 1
> make[1]: *** Deleting file `compiler/stage2/build/Parser.o'
> make[1]: *** Waiting for unfinished jobs....
> make: *** [all] Error 2
>
> --Kazu
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs



--
Regards,
Austin - PGP: 4096R/0x91384671



Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Erik de Castro Lopo-34
In reply to this post by Kazu Yamamoto (山本和彦)
Kazu Yamamoto (????) wrote:

> ghc-stage1: panic! (the 'impossible' happened)
>   (GHC version 7.7.20130907 for i386-apple-darwin):
> expectJust block_order

Kazu,

I'm seeing this on powerpc64-linux:

    http://ghc.haskell.org/trac/ghc/ticket/8205

There is at least one other report of this happening on OSX.

Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/



Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Jan Stolarek
In reply to this post by Austin Seipp-4
Oh, a 32bit architecture. That's something new. Can you re-run the last command (the one that
segfalts) with -ddump-cmm added to the command line? This will allow me to see offending Cmm - I
should be able to diagnoze problem based on it.

Janek

Dnia niedziela, 8 wrze?nia 2013, Austin Seipp napisa?:

> Hi Kazu,
>
> I believe this is related to
> http://ghc.haskell.org/trac/ghc/ticket/8205 - can you try:
>
> $ git revert d61c3ac186c94021c851f7a2a6d20631e35fc1ba
>
> and see if your build finishes? Perhaps you can help Jan diagnose it if
> so...
>
> On Sun, Sep 8, 2013 at 4:13 AM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:
> > Hi,
> >
> > I cannot build GHC head on Mac today:
> >
> > "inplace/bin/ghc-stage1" -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O  
> >  -package-name ghc-7.7.20130907 -hide-all-packages -i
> > -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen
> > -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn
> > -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen
> > -icompiler/parser -icompiler/prelude -icompiler/profiling
> > -icompiler/rename -icompiler/simplCore -icompiler/simplStg
> > -icompiler/specialise -icompiler/stgSyn -icompiler/stranal
> > -icompiler/typecheck -icompiler/types -icompiler/utils
> > -icompiler/vectorise -icompiler/stage2/build
> > -icompiler/stage2/build/autogen -Icompiler/stage2/build
> > -Icompiler/stage2/build/autogen -Icompiler/. -Icompiler/parser
> > -Icompiler/utils -Icompiler/../rts/dist/build -Icompiler/stage2  
> > -optP-DGHCI -optP-include
> > -optPcompiler/stage2/build/autogen/cabal_macros.h -package Cabal-1.18.0
> > -package array-0.4.0.2 -package base-4.7.0.0 -package
> > bin-package-db-0.0.0.0 -package bytestring-0.10
>
>  .3.0 -package containers-0.5.3.1 -package directory-1.2.0.1 -package
> filepath-1.3.0.2 -package hoopl-3.10.0.0 -package hpc-0.6.0.1 -package
> process-1.2.0.0 -package template-haskell-2.9.0.0 -package time-1.4.1
> -package transformers-0.3.0.0 -package unix-2.7.0.0 -Wall
> -fno-warn-name-shadowing -XHaskell98 -XCPP -XMagicHash -XUnboxedTuples
> -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls
> -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances
> -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XBangPatterns
> -XNondecreasingIndentation -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -O2
> -no-user-package-db -rtsopts      -odir compiler/stage2/build -hidir
> compiler/stage2/build -stubdir compiler/stage2/build  -dynamic-too -c
> compiler/deSugar/Coverage.lhs -o compiler/stage2/build/Coverage.o -dyno
> compiler/stage2/build/Coverage.dyn_o
>
> > ghc-stage1: panic! (the 'impossible' happened)
> >   (GHC version 7.7.20130907 for i386-apple-darwin):
> >         expectJust block_order
> >
> > Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
> >
> > make[1]: *** [compiler/stage2/build/Parser.o] Error 1
> > make[1]: *** Deleting file `compiler/stage2/build/Parser.o'
> > make[1]: *** Waiting for unfinished jobs....
> > make: *** [all] Error 2
> >
> > --Kazu
> > _______________________________________________
> > ghc-devs mailing list
> > ghc-devs at haskell.org
> > http://www.haskell.org/mailman/listinfo/ghc-devs





Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Kazu Yamamoto (山本和彦)
In reply to this post by Austin Seipp-4
Hi,

> I believe this is related to
> http://ghc.haskell.org/trac/ghc/ticket/8205 - can you try:
>
> $ git revert d61c3ac186c94021c851f7a2a6d20631e35fc1ba
>
> and see if your build finishes? Perhaps you can help Jan diagnose it if so...

Yes. After this command, I can build GHC head on Mac.

--Kazu



Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Jan Stolarek
Good, we have a culprit then. Kazu, would you be willing to do a couple of things to provide me
with more information? I'd need the Cmm dump that causes the panic. Also, tomorrow I'll add more
information to this panic so that we get back name of offending code block - this should make
debugging easier for me.

Janek

Dnia niedziela, 8 wrze?nia 2013, Kazu Yamamoto napisa?:

> Hi,
>
> > I believe this is related to
> > http://ghc.haskell.org/trac/ghc/ticket/8205 - can you try:
> >
> > $ git revert d61c3ac186c94021c851f7a2a6d20631e35fc1ba
> >
> > and see if your build finishes? Perhaps you can help Jan diagnose it if
> > so...
>
> Yes. After this command, I can build GHC head on Mac.
>
> --Kazu
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs





Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Kazu Yamamoto (山本和彦)
Hi,

> Good, we have a culprit then. Kazu, would you be willing to do a
> couple of things to provide me with more information? I'd need the
> Cmm dump that causes the panic. Also, tomorrow I'll add more
> information to this panic so that we get back name of offending code
> block - this should make debugging easier for me.

OK. I understand more information is necessary for you. I can
help. Please tell me exact operation sequences.

--Kazu



Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Austin Seipp-4
Hello Kazu, thank you for the help!

Here is the easiest way to get the output. First, run 'make' once by
itself and make sure the build fails pretty quickly as a result of
your error (always good to double check.)

Next, when you do that, you will see the command that caused that
error. It's the one you posted in the original email, in fact - the
command invoking "ghc-stage1". You can copy and paste that command
right back into the terminal and run it in order to reproduce the
failure. Make sure you're at the root of the GHC source tree as well:

$ cd ~/path/to/ghc-HEAD
$ "inplace/bin/ghc-stage1" -hisuf hi -osuf ... -dyno
compiler/stage2/build/Coverage.dyn_o

This should fail with the exact same error.

Finally, all you need to do is this:

1. Add -ddump-cmm to the command line. Anywhere will work.
2. Pipe the output somewhere. Alternatively, you can copy/paste it out
of your terminal buffer.

So:

$ "inplace/bin/ghc-stage1" -ddump-cmm -hisuf hi -osuf ... -dyno
compiler/stage2/build/Coverage.dyn_o 2>&1 > log.txt

Double check the log.txt file - it should contain a lot of C-- output
(thousands of lines, probably.) That's what Jan needs.

On Sun, Sep 8, 2013 at 4:24 PM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:

> Hi,
>
>> Good, we have a culprit then. Kazu, would you be willing to do a
>> couple of things to provide me with more information? I'd need the
>> Cmm dump that causes the panic. Also, tomorrow I'll add more
>> information to this panic so that we get back name of offending code
>> block - this should make debugging easier for me.
>
> OK. I understand more information is necessary for you. I can
> help. Please tell me exact operation sequences.
>
> --Kazu
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs



--
Regards,
Austin - PGP: 4096R/0x91384671



Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Kazu Yamamoto (山本和彦)
Hi,

Austin, thank you for explanation.

Fortunately or unfortunately, I can build GHC head today without any
reverting. I will reset the GHC tree to yesterday and try again.

--Kazu

> Hello Kazu, thank you for the help!
>
> Here is the easiest way to get the output. First, run 'make' once by
> itself and make sure the build fails pretty quickly as a result of
> your error (always good to double check.)
>
> Next, when you do that, you will see the command that caused that
> error. It's the one you posted in the original email, in fact - the
> command invoking "ghc-stage1". You can copy and paste that command
> right back into the terminal and run it in order to reproduce the
> failure. Make sure you're at the root of the GHC source tree as well:
>
> $ cd ~/path/to/ghc-HEAD
> $ "inplace/bin/ghc-stage1" -hisuf hi -osuf ... -dyno
> compiler/stage2/build/Coverage.dyn_o
>
> This should fail with the exact same error.
>
> Finally, all you need to do is this:
>
> 1. Add -ddump-cmm to the command line. Anywhere will work.
> 2. Pipe the output somewhere. Alternatively, you can copy/paste it out
> of your terminal buffer.
>
> So:
>
> $ "inplace/bin/ghc-stage1" -ddump-cmm -hisuf hi -osuf ... -dyno
> compiler/stage2/build/Coverage.dyn_o 2>&1 > log.txt
>
> Double check the log.txt file - it should contain a lot of C-- output
> (thousands of lines, probably.) That's what Jan needs.
>
> On Sun, Sep 8, 2013 at 4:24 PM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:
>> Hi,
>>
>>> Good, we have a culprit then. Kazu, would you be willing to do a
>>> couple of things to provide me with more information? I'd need the
>>> Cmm dump that causes the panic. Also, tomorrow I'll add more
>>> information to this panic so that we get back name of offending code
>>> block - this should make debugging easier for me.
>>
>> OK. I understand more information is necessary for you. I can
>> help. Please tell me exact operation sequences.
>>
>> --Kazu
>>
>> _______________________________________________
>> ghc-devs mailing list
>> ghc-devs at haskell.org
>> http://www.haskell.org/mailman/listinfo/ghc-devs
>
>
>
> --
> Regards,
> Austin - PGP: 4096R/0x91384671



Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Kazu Yamamoto (山本和彦)
Hi,

> Fortunately or unfortunately, I can build GHC head today without any
> reverting. I will reset the GHC tree to yesterday and try again.

Never mind. This is my misunderstanding.

I cannot build GHC head today. I sent necessary information to Jan and
Austin personally.

--Kazu



Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Jan Stolarek
Thanks Kazu! This should get me going. Can you temporarily work with my commit reverted? I should have some time to look into this at the end of this week.

It's interesting that this time you got failure for a different file than in your original email to the list. Seems like the error was happening randomly, but according to my best knowledge ot shouldn't (I mean thing that I did that most likely breaks Mac build should be completely deterministic).

One thing that really suprises me: command line has -O, -O2 and even -fcmm-sink options, but no sinking pass is done after stack layout. I don't understand this.

Janek

----- Oryginalna wiadomo?? -----
Od: "Kazu Yamamoto" <kazu at iij.ad.jp>
Do: ghc-devs at haskell.org
Wys?ane: poniedzia?ek, 9 wrzesie? 2013 4:55:55
Temat: Re: A build problem on Mac

Hi,

> Fortunately or unfortunately, I can build GHC head today without any
> reverting. I will reset the GHC tree to yesterday and try again.

Never mind. This is my misunderstanding.

I cannot build GHC head today. I sent necessary information to Jan and
Austin personally.

--Kazu

_______________________________________________
ghc-devs mailing list
ghc-devs at haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs




Reply | Threaded
Open this post in threaded view
|

A build problem on Mac

Kazu Yamamoto (山本和彦)
Hi,

> Thanks Kazu! This should get me going. Can you temporarily work with
> my commit reverted?

Yes. I got this log without reverting. And now I'm using GHC head with
your commit reverted.

> It's interesting that this time you got failure for a different file
> than in your original email to the list. Seems like the error was
> happening randomly, but according to my best knowledge ot shouldn't (I
> mean thing that I did that most likely breaks Mac build should be
> completely deterministic).

That's probably because I used different GHC trees yesterday and
today. I did "git pull".

Since this error happens at very late stage of building, I
misunderstood that this problem was gone today. Yesterday, I got the
error in very early stage as Austin described.

--Kazu