Ticket #4050 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Mac OS X build fails: ghc.mk:96: *** Make has restarted itself 3 times; is there a makefile bug?

Reported by: thorkilnaur Owned by:
Priority: highest Milestone: 7.0.1
Component: Compiler Version: 6.13
Keywords: Cc: pho@…, bos@…
Operating System: MacOS X Architecture: x86
Type of failure: Building GHC failed Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The tn23 GHC builder

thorkil-naurs-intel-mac-mini:~ thorkilnaur$ uname -a
Darwin thorkil-naurs-intel-mac-mini.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
thorkil-naurs-intel-mac-mini:~ thorkilnaur$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.10.4
thorkil-naurs-intel-mac-mini:~ thorkilnaur$

fails with:

chmod +x                               inplace/bin/hsc2hs
"inplace/bin/hsc2hs" --cc=/usr/bin/gcc --ld=/usr/bin/gcc  --cflag=-m32   --cflag=-D__GLASGOW_HASKELL__=613 '--cflag=-m32' '--cflag=-Ilibraries/hpc/.' '--cflag=-isystem/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/directory-1.0.0.3/include' '--cflag=-isystem/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/unix-2.3.2.0/include' '--cflag=-isystem/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/old-time-1.0.0.2/include' '--cflag=-isystem/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/base-4.1.0.0/include' '--cflag=-isystem/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include' '--lflag=-m32' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/directory-1.0.0.3' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/unix-2.3.2.0' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/old-time-1.0.0.2' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/old-locale-1.0.0.1' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/filepath-1.1.0.2' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/containers-0.2.0.1' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/array-0.2.0.0' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/syb-0.1.0.1' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/base-4.1.0.0' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/integer-0.1.0.1' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/ghc-prim-0.1.0.0' '--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4' '--lflag=-ldl' '--lflag=-lm' '--lflag=-lffi' '--lflag=-lgmp' '--lflag=-ldl'   libraries/hpc/./Trace/Hpc/Reflect.hsc -o libraries/hpc/dist-boot/build/Trace/Hpc/Reflect.hs
"rm" -f libraries/hpc/dist-boot/build/.depend-v.haskell.tmp
touch libraries/hpc/dist-boot/build/.depend-v.haskell.tmp
"/Library/Frameworks/GHC.framework/Versions/610/usr/bin/ghc" -M -include-pkg-deps -dep-makefile libraries/hpc/dist-boot/build/.depend-v.haskell.tmp  -H32m -O -package-conf libraries/bootstrapping.conf -package-name hpc-0.5.0.5 -hide-all-packages -i -ilibraries/hpc/. -ilibraries/hpc/dist-boot/build -ilibraries/hpc/dist-boot/build/autogen -Ilibraries/hpc/dist-boot/build -Ilibraries/hpc/dist-boot/build/autogen -Ilibraries/hpc/. -optP-include -optPlibraries/hpc/dist-boot/build/autogen/cabal_macros.h -package base-4.1.0.0 -package containers-0.2.0.1 -package directory-1.0.0.3 -package old-time-1.0.0.2 -Wall -XCPP -fno-warn-deprecated-flags -odir libraries/hpc/dist-boot/build -hidir libraries/hpc/dist-boot/build -stubdir libraries/hpc/dist-boot/build -hisuf hi -osuf o -hcsuf hc  libraries/hpc/./Trace/Hpc/Util.hs  libraries/hpc/./Trace/Hpc/Mix.hs  libraries/hpc/./Trace/Hpc/Tix.hs  libraries/hpc/dist-boot/build/Trace/Hpc/Reflect.hs
echo "libraries/hpc_dist-boot_depfile_haskell_EXISTS = YES" >> libraries/hpc/dist-boot/build/.depend-v.haskell.tmp
for dir in libraries/hpc/dist-boot/build/Trace/Hpc/; do if test ! -d $dir; then mkdir -p $dir; fi done
mv libraries/hpc/dist-boot/build/.depend-v.haskell.tmp libraries/hpc/dist-boot/build/.depend-v.haskell
ghc.mk:96: *** Make has restarted itself 3 times; is there a makefile bug?.  Stop.
make: *** [all] Error 2

First time:  http://darcs.haskell.org/ghcBuilder/builders/tn23/20.html

Attachments

libffi-ghc-mk.patch Download (37.6 KB) - added by PHO 3 years ago.

Change History

Changed 3 years ago by igloo

  • priority changed from normal to highest
  • milestone set to 6.14.1

Thanks for the report.

The loop is quite small: about 20 lines at the end of  http://darcs.haskell.org/ghcBuilder/builders/tn23/20/8.html

Changed 3 years ago by PHO

  • cc pho@… added

Changed 3 years ago by PHO

Changed 3 years ago by PHO

The attached patch should solve the problem. I'm worried that there're side-effects though.

Changed 3 years ago by thorkilnaur

Applying libffi-ghc-mk.patch (and other required patches), the tn23 GHC builder ends:

"inplace/bin/ghc-stage2"   -H32m -O    -package-name dph-seq-0.4.0 -hide-all-packages -i -ilibraries/dph/dph-seq/../dph-common -ilibraries/dph/dph-seq/dist-install/build -ilibraries/dph/dph-seq/dist-install/build/autogen -Ilibraries/dph/dph-seq/dist-install/build -Ilibraries/dph/dph-seq/dist-install/build/autogen -Ilibraries/dph/dph-seq/.    -optP-include -optPlibraries/dph/dph-seq/dist-install/build/autogen/cabal_macros.h -package array-0.3.0.0 -package base-4.2.0.0 -package dph-base-0.4.0 -package dph-prim-seq-0.4.0 -package ghc-6.13.20100507 -package ghc-prim-0.2.0.0 -package random-1.0.0.2 -package template-haskell-2.4.0.0  -Odph -funbox-strict-fields -haddock -fcpr-off -fdph-this -package-name dph-seq -XTypeFamilies -XGADTs -XRankNTypes -XBangPatterns -XMagicHash -XUnboxedTuples -XTypeOperators -no-user-package-conf -rtsopts -O2 -XGenerics -fno-warn-deprecated-flags -Wwarn     -odir libraries/dph/dph-seq/dist-install/build -hidir libraries/dph/dph-seq/dist-install/build -stubdir libraries/dph/dph-seq/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c libraries/dph/dph-seq/../dph-common/Data/Array/Parallel/Lifted/PArray.hs -o libraries/dph/dph-seq/dist-install/build/Data/Array/Parallel/Lifted/PArray.o
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.3.0.0 ... linking ... done.
Loading package containers-0.3.0.0 ... linking ... done.
Loading package filepath-1.2.0.0 ... linking ... done.
Loading package old-locale-1.0.0.2 ... linking ... done.
Loading package old-time-1.0.0.4 ... linking ... done.
Loading package unix-2.4.0.1 ... linking ... done.
ghc-stage2: internal error: Invalid Mach-O file:Address out of bounds while relocating object file
    (GHC version 6.13.20100507 for i386_apple_darwin)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
make[1]: *** [libraries/dph/dph-seq/dist-install/build/Data/Array/Parallel/Lifted/PArray.o] Abort trap
make: *** [all] Error 2

so we are back at #4013.

Thanks and best regards Thorkil

Changed 3 years ago by bos

  • cc bos@… added

Changed 3 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Thanks PHO for the patch, and thorkilnaur for the testing!

Patch applied.

Note: See TracTickets for help on using tickets.