
Hello, These days I can "validate" GHC head on Mac. But to my surprise, I cannot build GHC head on Mac. I verified this with both 32bit and 64bit bootstrapping GHC on Mac. Any ideas? "inplace/bin/ghc-stage1" -static -prof -H32m -O -package-name hoopl-3.10.0.0 -hide-all-packages -i -ilibraries/hoopl/src -ilibraries/hoopl/dist-install/build -ilibraries/hoopl/dist-install/build/autogen -Ilibraries/hoopl/dist-install/build -Ilibraries/hoopl/dist-install/build/autogen -Ilibraries/hoopl/. -optP-include -optPlibraries/hoopl/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package containers-0.5.0.0 -split-objs -Wall -fno-warn-name-shadowing -XHaskell98 -XCPP -O2 -no-user-package-db -rtsopts -odir libraries/hoopl/dist-install/build -hidir libraries/hoopl/dist-install/build -stubdir libraries/hoopl/dist-install/build -hisuf p_hi -osuf p_o -hcsuf p_hc -c libraries/hoopl/src/Compiler/Hoopl/Show.hs -o libraries/hoopl/dist-install/build/Compiler/Hoopl/Show.p_o -dyno libraries/hoopl/dist-install/build/Compiler/Hoopl/Show.dyn_o "inplace/bin/ghc-stage1" -static -prof -H32m -O -package-name hoopl-3.10.0.0 -hide-all-packages -i -ilibraries/hoopl/src -ilibraries/hoopl/dist-install/build -ilibraries/hoopl/dist-install/build/autogen -Ilibraries/hoopl/dist-install/build -Ilibraries/hoopl/dist-install/build/autogen -Ilibraries/hoopl/. -optP-include -optPlibraries/hoopl/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package containers-0.5.0.0 -split-objs -Wall -fno-warn-name-shadowing -XHaskell98 -XCPP -O2 -no-user-package-db -rtsopts -odir libraries/hoopl/dist-install/build -hidir libraries/hoopl/dist-install/build -stubdir libraries/hoopl/dist-install/build -hisuf p_hi -osuf p_o -hcsuf p_hc -c libraries/hoopl/src/Compiler/Hoopl/MkGraph.hs -o libraries/hoopl/dist-install/build/Compiler/Hoopl/MkGraph.p_o -dyno libraries/hoopl/dist-install/build/Compiler/Hoopl/MkGraph.dyn_o ghc-stage1: could not execute: /usr/bin/gcc make[1]: *** [libraries/template-haskell/dist-install/build/Language/Haskell/TH/Syntax.p_o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [all] Error 2 --Kazu

Hi Kazu, On Mon, Mar 11, 2013 at 01:45:22PM +0900, Kazu Yamamoto wrote:
These days I can "validate" GHC head on Mac. But to my surprise, I cannot build GHC head on Mac. I verified this with both 32bit and 64bit bootstrapping GHC on Mac. Any ideas?
ghc-stage1: could not execute: /usr/bin/gcc make[1]: *** [libraries/template-haskell/dist-install/build/Language/Haskell/TH/Syntax.p_o] Error 1
Does this always happen when compiling this file? Does /usr/bin/gcc exist? What does inplace/bin/ghc-stage1 --info | grep gcc say? Thanks Ian

I, too, had this problem, saying /usr/bin/gcc could not execute on a Mac. gcc was indeed there and could run just fine. Even more oddly, when I tried `make` again, compilation would get past the point it was stuck only to fall over again several files later. I probably could have gotten everything compiled with lots and lots of `make`s. `make distclean` didn't help. I thought the problem was local, so I didn't report. In the end, I deleted the whole source tree, recloned, and then didn't have the problem.
Richard
On Mar 11, 2013, at 6:11 AM, Ian Lynagh
Hi Kazu,
On Mon, Mar 11, 2013 at 01:45:22PM +0900, Kazu Yamamoto wrote:
These days I can "validate" GHC head on Mac. But to my surprise, I cannot build GHC head on Mac. I verified this with both 32bit and 64bit bootstrapping GHC on Mac. Any ideas?
ghc-stage1: could not execute: /usr/bin/gcc make[1]: *** [libraries/template-haskell/dist-install/build/Language/Haskell/TH/Syntax.p_o] Error 1
Does this always happen when compiling this file?
Does /usr/bin/gcc exist?
What does inplace/bin/ghc-stage1 --info | grep gcc say?
Thanks Ian
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

ghc-stage1: could not execute: /usr/bin/gcc make[1]: *** [libraries/template-haskell/dist-install/build/Language/Haskell/TH/Syntax.p_o] Error 1
Does this always happen when compiling this file?
I'm using "make -j6". One GHC is compiling this file.
Does /usr/bin/gcc exist?
Of, course. "validate" works.
What does inplace/bin/ghc-stage1 --info | grep gcc say?
,("C compiler command","/usr/bin/gcc") I removed GHC tree and cloned it again today. But the same thing happened. This thing happens repeatedly in my Mac. http://www.haskell.org/pipermail/ghc-devs/2013-February/000440.html --Kazu

Hi, First of all, I would like to ask whether or not someone can build (not "validate") GHC head on Mountain Lion. The reason why I ask is that I found this issue: http://stackoverflow.com/questions/13539066/can-write-to-a-non-blocking-fd-r... And I would like to ask what about on Lion or on Snow Leopard? Is this building failure specific to Mountain Lion? Here is what I know so far: - This issue happens when libraries/template-haskell/Language/Haskell/TH/Syntax.hs is compiled. - According to "dtruss", "select()" called by ghc-stage1 is waiting a pipe forever. - No "gcc" is executed during this compiling. - This happens with both 32bit bootstrapping GHC and 64bit one. Attached is a log of "dtruss". Another question: Is ghc-stage1 compiled with "-threaded"? --Kazu 69117/0x10d80b2: pipe(0x7FFF6DDBF240, 0x0, 0x0) = 3 0 69117/0x10d80b2: pipe(0x7FFF6DDBF230, 0x0, 0x4) = 5 0 69117/0x10d80b2: pipe(0x7FFF6DDBF220, 0x0, 0x6) = 7 0 69117/0x10d80b2: sigprocmask(0x1, 0x110248EA8, 0x110248EAC) = 0x0 0 69117/0x10d80b2: setitimer(0x0, 0x7FFF6DDBF1B0, 0x0) = 0 0 69149/0x10d80b2: vfork() = 69149 0 69149/0x10d80b2: sigprocmask(0x3, 0x110248EAC, 0x0) = 0x0 0 69149/0x10d80b2: dup2(0x3, 0x0, 0x0) = 0 0 69149/0x10d80b2: close(0x3) = 0 0 69149/0x10d80b2: close(0x4) = 0 0 69149/0x10d80b2: dup2(0x6, 0x1, 0x0) = 1 0 69149/0x10d80b2: close(0x6) = 0 0 69149/0x10d80b2: close(0x5) = 0 0 69149/0x10d80b2: dup2(0x8, 0x2, 0x0) = 2 0 69149/0x10d80b2: close(0x8) = 0 0 69149/0x10d80b2: close(0x7) = 0 0 69117/0x10d80b2: execve("/usr/bin/gcc\0", 0x113F943E0, 0x7FFF6DDC35C0) = 69149 0 69117/0x10d80b2: close(0x3) = 0 0 69117/0x10d80b2: fcntl(0x4, 0x2, 0x1) = 0 0 69117/0x10d80b2: close(0x6) = 0 0 69117/0x10d80b2: fcntl(0x5, 0x2, 0x1) = 0 0 69117/0x10d80b2: close(0x8) = 0 0 69117/0x10d80b2: fcntl(0x7, 0x2, 0x1) = 0 0 69117/0x10d80b2: sigprocmask(0x3, 0x110248EAC, 0x0) = 0x0 0 69117/0x10d80b2: setitimer(0x0, 0x7FFF6DDBF1B0, 0x0) = 0 0 69117/0x10d80b2: fcntl(0x4, 0x3, 0x11E00A40) = 1 0 69117/0x10d80b2: fcntl(0x4, 0x4, 0x5) = 0 0 69117/0x10d80b2: ioctl(0x4, 0x4004667A, 0x7Fdtrace: error on enabled probe ID 1791 (ID 116: syscall::read:return): out of scratch space in action #13 at DIF offset 44 dtrace: error on enabled probe ID 1791 (ID 116: syscall::read:return): out of scratch space in action #13 at DIF offset 44 FF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x4, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: fcntl(0x5, 0x3, 0x11E00A40) = 0 0 69117/0x10d80b2: fcntl(0x5, 0x4, 0x4) = 0 0 69117/0x10d80b2: ioctl(0x5, 0x4004667A, 0x7FFF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x5, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: fcntl(0x7, 0x3, 0x11E00A40) = 0 0 69117/0x10d80b2: fcntl(0x7, 0x4, 0x4) = 0 0 69117/0x10d80b2: ioctl(0x7, 0x4004667A, 0x7FFF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x7, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: ioctl(0x5, 0x4004667A, 0x7FFF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x5, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: ioctl(0x7, 0x4004667A, 0x7FFF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x7, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: wait4(0x10E1D, 0x7FFF6DDBF28C, 0x1) = 0 0 69117/0x10d80b2: select(0x6, 0x7FFF6DDC3220, 0x7FFF6DDC31A0, 0x0, 0x7FFF6DDC32A0) = 0 0 69117/0x10d80b2: setitimer(0x0, 0x7FFF6DDC3140, 0x0) = 0 0

I have Mountain Lion (10.8.2, to be exact) with XCode 4.6 installed, and I can build GHC. I don't use XCode when building, but I believe the command-line dev tools (like gcc) are shipped with XCode, so that might be something to look at.
Sorry I don't have any more suggestions!
Richard
On Mar 14, 2013, at 2:18 AM, Kazu Yamamoto (山本和彦)
Hi,
First of all, I would like to ask whether or not someone can build (not "validate") GHC head on Mountain Lion. The reason why I ask is that I found this issue:
http://stackoverflow.com/questions/13539066/can-write-to-a-non-blocking-fd-r...
And I would like to ask what about on Lion or on Snow Leopard? Is this building failure specific to Mountain Lion?
Here is what I know so far:
- This issue happens when libraries/template-haskell/Language/Haskell/TH/Syntax.hs is compiled.
- According to "dtruss", "select()" called by ghc-stage1 is waiting a pipe forever.
- No "gcc" is executed during this compiling.
- This happens with both 32bit bootstrapping GHC and 64bit one.
Attached is a log of "dtruss".
Another question: Is ghc-stage1 compiled with "-threaded"?
--Kazu
69117/0x10d80b2: pipe(0x7FFF6DDBF240, 0x0, 0x0) = 3 0 69117/0x10d80b2: pipe(0x7FFF6DDBF230, 0x0, 0x4) = 5 0 69117/0x10d80b2: pipe(0x7FFF6DDBF220, 0x0, 0x6) = 7 0 69117/0x10d80b2: sigprocmask(0x1, 0x110248EA8, 0x110248EAC) = 0x0 0 69117/0x10d80b2: setitimer(0x0, 0x7FFF6DDBF1B0, 0x0) = 0 0 69149/0x10d80b2: vfork() = 69149 0 69149/0x10d80b2: sigprocmask(0x3, 0x110248EAC, 0x0) = 0x0 0 69149/0x10d80b2: dup2(0x3, 0x0, 0x0) = 0 0 69149/0x10d80b2: close(0x3) = 0 0 69149/0x10d80b2: close(0x4) = 0 0 69149/0x10d80b2: dup2(0x6, 0x1, 0x0) = 1 0 69149/0x10d80b2: close(0x6) = 0 0 69149/0x10d80b2: close(0x5) = 0 0 69149/0x10d80b2: dup2(0x8, 0x2, 0x0) = 2 0 69149/0x10d80b2: close(0x8) = 0 0 69149/0x10d80b2: close(0x7) = 0 0 69117/0x10d80b2: execve("/usr/bin/gcc\0", 0x113F943E0, 0x7FFF6DDC35C0) = 69149 0 69117/0x10d80b2: close(0x3) = 0 0 69117/0x10d80b2: fcntl(0x4, 0x2, 0x1) = 0 0 69117/0x10d80b2: close(0x6) = 0 0 69117/0x10d80b2: fcntl(0x5, 0x2, 0x1) = 0 0 69117/0x10d80b2: close(0x8) = 0 0 69117/0x10d80b2: fcntl(0x7, 0x2, 0x1) = 0 0 69117/0x10d80b2: sigprocmask(0x3, 0x110248EAC, 0x0) = 0x0 0 69117/0x10d80b2: setitimer(0x0, 0x7FFF6DDBF1B0, 0x0) = 0 0 69117/0x10d80b2: fcntl(0x4, 0x3, 0x11E00A40) = 1 0 69117/0x10d80b2: fcntl(0x4, 0x4, 0x5) = 0 0 69117/0x10d80b2: ioctl(0x4, 0x4004667A, 0x7Fdtrace: error on enabled probe ID 1791 (ID 116: syscall::read:return): out of scratch space in action #13 at DIF offset 44 dtrace: error on enabled probe ID 1791 (ID 116: syscall::read:return): out of scratch space in action #13 at DIF offset 44 FF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x4, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: fcntl(0x5, 0x3, 0x11E00A40) = 0 0 69117/0x10d80b2: fcntl(0x5, 0x4, 0x4) = 0 0 69117/0x10d80b2: ioctl(0x5, 0x4004667A, 0x7FFF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x5, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: fcntl(0x7, 0x3, 0x11E00A40) = 0 0 69117/0x10d80b2: fcntl(0x7, 0x4, 0x4) = 0 0 69117/0x10d80b2: ioctl(0x7, 0x4004667A, 0x7FFF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x7, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: ioctl(0x5, 0x4004667A, 0x7FFF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x5, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: ioctl(0x7, 0x4004667A, 0x7FFF6DDBF294) = -1 Err#25 69117/0x10d80b2: ioctl(0x7, 0x40487413, 0x7FFF6DDBF248) = -1 Err#25 69117/0x10d80b2: wait4(0x10E1D, 0x7FFF6DDBF28C, 0x1) = 0 0 69117/0x10d80b2: select(0x6, 0x7FFF6DDC3220, 0x7FFF6DDC31A0, 0x0, 0x7FFF6DDC32A0) = 0 0 69117/0x10d80b2: setitimer(0x0, 0x7FFF6DDC3140, 0x0) = 0 0
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
participants (3)
-
Ian Lynagh
-
Kazu Yamamoto
-
Richard Eisenberg