Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHC formula is segfaulting during build #371

Closed
luca-bernardi opened this issue Apr 16, 2016 · 9 comments
Closed

GHC formula is segfaulting during build #371

luca-bernardi opened this issue Apr 16, 2016 · 9 comments
Labels
10.11 El Capitan is specifically affected upstream issue An upstream issue report is needed

Comments

@luca-bernardi
Copy link

Bug reports:

brew install ghc can't succeed because of a segmentation fault during build.

This is clang version used:

Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.4.0
Thread model: posix

Here below the full output of the command with the failure:

==> Downloading https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3b-src.tar.bz2
######################################################################## 100,0%
==> Downloading http://ftpmirror.gnu.org/gmp/gmp-6.1.0.tar.bz2
==> Downloading from http://www.dvlnx.com/software/gnu/gmp/gmp-6.1.0.tar.bz2
######################################################################## 100,0%
==> ./configure --prefix=/usr/local/opt/homebrew/Cellar/ghc/7.10.3b/libexec/integer-gmp --with-pic --disable-shared
==> make
==> make check
==> make install
==> Downloading https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-x86_64-apple-darwin.tar.xz
######################################################################## 100,0%
==> ./configure --prefix=/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/binary --with-gmp-includes=/usr/local/opt/homebrew/Cellar/ghc/7.10.3b/libexec/integer-gmp/include --with-gmp-libraries=/usr/local/opt/homebrew/Cellar/ghc/7.10.3b/libexec/integer-gmp/lib --with-ld=ld --with-gcc=clang --with-clang=clang
==> make install
==> ./configure --prefix=/usr/local/opt/homebrew/Cellar/ghc/7.10.3b --with-gmp-includes=/usr/local/opt/homebrew/Cellar/ghc/7.10.3b/libexec/integer-gmp/include --with-gmp-libraries=/usr/local/opt/homebrew/Cellar/ghc/7.10.3b/libexec/integer-gmp/lib --with-ld=ld --with-gcc=clang --with-clang=clang
==> make
Last 15 lines from /Users/lucabernardi/Library/Logs/Homebrew/ghc/08.make:
cat utils/runghc/runghc.wrapper                                     >> inplace/bin/runghc
echo 'exec "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal" ${1+"$@"}'                                  >> utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist
echo '#!/bin/sh'                                                   >> inplace/bin/hpc
chmod +x                                                   utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist
chmod +x                                                     inplace/bin/runghc
echo 'executablename="/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/inplace/lib/bin/hpc"'                                  >> inplace/bin/hpc
echo 'datadir="/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/inplace/lib"'                             >> inplace/bin/hpc
echo 'bindir="/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/inplace/bin"'                              >> inplace/bin/hpc
echo 'topdir="/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/inplace/lib"'                           >> inplace/bin/hpc
echo 'pgmgcc="clang"'                                  >> inplace/bin/hpc
echo 'export DYLD_LIBRARY_PATH="/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/hpc/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/directory/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/unix/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/time/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/filepath/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/containers/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/bytestring/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/deepseq/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/array/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/base/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/integer-gmp2/dist-install/build:/usr/local/opt/homebrew/Cellar/ghc/7.10.3b/libexec/integer-gmp/lib:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/libraries/ghc-prim/dist-install/build:/private/tmp/ghc20160416-32139-1udghjs/ghc-7.10.3/rts/dist/build:$DYLD_LIBRARY_PATH"' >> inplace/bin/hpc
cat utils/hpc/hpc.wrapper                                     >> inplace/bin/hpc
chmod +x                                                     inplace/bin/hpc
make[1]: *** [compiler/stage2/dll-split.stamp] Segmentation fault: 11
make: *** [all] Error 2

Please note that brew gist-logs ghc hangs on my machine without returning any result.

@pmer
Copy link
Contributor

pmer commented Apr 17, 2016

I am encountering a similar issue but the segfault is in a different place. Same clang version. Same issue with gist-logs.

Here is my install command output.

$ brew install ghc
==> Downloading https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3b-src.tar.bz
Already downloaded: /Library/Caches/Homebrew/ghc-7.10.3b.tar.bz2
==> Downloading http://ftpmirror.gnu.org/gmp/gmp-6.1.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/ghc--gmp-6.1.0.tar.bz2
==> ./configure --prefix=/Users/pdm/Library/Homebrew/Cellar/ghc/7.10.3b/libexec/
==> make
==> make check
==> make install
==> Downloading https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-x86_64-appl
Already downloaded: /Library/Caches/Homebrew/ghc--binary-7.10.3.tar.xz
==> ./configure --prefix=/private/tmp/ghc20160416-5871-1gnmvfw/ghc-7.10.3/binary
==> make install
==> ./configure --prefix=/Users/pdm/Library/Homebrew/Cellar/ghc/7.10.3b --with-g
==> make
Last 15 lines from /Users/pdm/Library/Logs/Homebrew/ghc/08.make:
echo 'pgmgcc="clang"'                                  >> inplace/bin/dll-split
echo 'export DYLD_LIBRARY_PATH="/private/tmp/ghc20160416-5871-1gnmvfw/ghc-7.10.3/libraries/filepath/dist-install/build:/private/tmp/ghc20160416-5871-1gnmvfw/ghc-7.10.3/libraries/containers/dist-install/build:/private/tmp/ghc20160416-5871-1gnmvfw/ghc-7.10.3/libraries/deepseq/dist-install/build:/private/tmp/ghc20160416-5871-1gnmvfw/ghc-7.10.3/libraries/array/dist-install/build:/private/tmp/ghc20160416-5871-1gnmvfw/ghc-7.10.3/libraries/base/dist-install/build:/private/tmp/ghc20160416-5871-1gnmvfw/ghc-7.10.3/libraries/integer-gmp2/dist-install/build:/Users/pdm/Library/Homebrew/Cellar/ghc/7.10.3b/libexec/integer-gmp/lib:/private/tmp/ghc20160416-5871-1gnmvfw/ghc-7.10.3/libraries/ghc-prim/dist-install/build:/private/tmp/ghc20160416-5871-1gnmvfw/ghc-7.10.3/rts/dist/build:$DYLD_LIBRARY_PATH"' >> inplace/bin/dll-split
echo 'exec "$executablename" ${1+"$@"}'                     >> inplace/bin/dll-split
chmod +x                                                     inplace/bin/dll-split
"inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_o -hcsuf p_hc -static -prof  -H32m -O    -this-package-key Cabal_3ux67khMI118y6VpwrFnXN -hide-all-packages -i -ilibraries/Cabal/Cabal/. -ilibraries/Cabal/Cabal/dist-install/build -ilibraries/Cabal/Cabal/dist-install/build/autogen -Ilibraries/Cabal/Cabal/dist-install/build -Ilibraries/Cabal/Cabal/dist-install/build/autogen -Ilibraries/Cabal/Cabal/.    -optP-include -optPlibraries/Cabal/Cabal/dist-install/build/autogen/cabal_macros.h -package-key array_67iodizgJQIIxYVTp4emlA -package-key base_HQfYBxpPvuw8OunzQu6JGM -package-key binar_3uXFWMoAGBg0xKP9MHKRwi -package-key bytes_6VWy06pWzJq9evDvK2d4w6 -package-key conta_2C3ZI8RgPO2LBMidXKTvIU -package-key deeps_6vMKxt5sPFR0XsbRWvvq59 -package-key direc_0hFG6ZxK1nk4zsyOqbNHfm -package-key filep_Ey7a1in9roBAE8bUFJ5R9m -package-key prett_JItwetRppk1H5Uq3xbjDGC -package-key proce_52AgREEfSrnJLlkGV9YZZJ -package-key time_FTheb6LSxyX1UABIbBXRfn -package-key unix_KZL8h98IqDM57kQSPo1mKx -Wall -fno-ignore-asserts -fwarn-tabs -XHaskell98 -XCPP -O2  -no-user-package-db -rtsopts      -odir libraries/Cabal/Cabal/dist-install/build -hidir libraries/Cabal/Cabal/dist-install/build -stubdir libraries/Cabal/Cabal/dist-install/build -split-objs  -c libraries/Cabal/Cabal/./Distribution/Simple/Test.hs -o libraries/Cabal/Cabal/dist-install/build/Distribution/Simple/Test.p_o -dyno libraries/Cabal/Cabal/dist-install/build/Distribution/Simple/Test.dyn_o
"inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_o -hcsuf p_hc -static -prof  -H32m -O    -this-package-key Cabal_3ux67khMI118y6VpwrFnXN -hide-all-packages -i -ilibraries/Cabal/Cabal/. -ilibraries/Cabal/Cabal/dist-install/build -ilibraries/Cabal/Cabal/dist-install/build/autogen -Ilibraries/Cabal/Cabal/dist-install/build -Ilibraries/Cabal/Cabal/dist-install/build/autogen -Ilibraries/Cabal/Cabal/.    -optP-include -optPlibraries/Cabal/Cabal/dist-install/build/autogen/cabal_macros.h -package-key array_67iodizgJQIIxYVTp4emlA -package-key base_HQfYBxpPvuw8OunzQu6JGM -package-key binar_3uXFWMoAGBg0xKP9MHKRwi -package-key bytes_6VWy06pWzJq9evDvK2d4w6 -package-key conta_2C3ZI8RgPO2LBMidXKTvIU -package-key deeps_6vMKxt5sPFR0XsbRWvvq59 -package-key direc_0hFG6ZxK1nk4zsyOqbNHfm -package-key filep_Ey7a1in9roBAE8bUFJ5R9m -package-key prett_JItwetRppk1H5Uq3xbjDGC -package-key proce_52AgREEfSrnJLlkGV9YZZJ -package-key time_FTheb6LSxyX1UABIbBXRfn -package-key unix_KZL8h98IqDM57kQSPo1mKx -Wall -fno-ignore-asserts -fwarn-tabs -XHaskell98 -XCPP -O2  -no-user-package-db -rtsopts      -odir libraries/Cabal/Cabal/dist-install/build -hidir libraries/Cabal/Cabal/dist-install/build -stubdir libraries/Cabal/Cabal/dist-install/build -split-objs  -c libraries/Cabal/Cabal/./Distribution/Simple/Bench.hs -o libraries/Cabal/Cabal/dist-install/build/Distribution/Simple/Bench.p_o -dyno libraries/Cabal/Cabal/dist-install/build/Distribution/Simple/Bench.dyn_o
"inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_o -hcsuf p_hc -static -prof  -H32m -O    -this-package-key ghc_0AG9TOjDEtx4Ji3wSwHOBe -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-key array_67iodizgJQIIxYVTp4emlA -package-key base_HQfYBxpPvuw8OunzQu6JGM -package-key binpa_JPOxOw4FLalDxRNtBqZ2ji -package-key bytes_6VWy06pWzJq9evDvK2d4w6 -package-key conta_2C3ZI8RgPO2LBMidXKTvIU -package-key direc_0hFG6ZxK1nk4zsyOqbNHfm -package-key filep_Ey7a1in9roBAE8bUFJ5R9m -package-key hoopl_FCWMV1gJiCi02IwN4CnRgk -package-key hpc_FUjQx3d1H3dEEtLFWv7hFw -package-key proce_52AgREEfSrnJLlkGV9YZZJ -package-key templ_GJPvtLC64aA4c1Jl10o2qt -package-key time_FTheb6LSxyX1UABIbBXRfn -package-key trans_GZTjP9K5WFq01xC9BAGQpF -package-key unix_KZL8h98IqDM57kQSPo1mKx -Wall -fno-warn-name-shadowing -this-package-key ghc -XHaskell2010 -optc-DTHREADED_RTS -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -Rghc-timing -O2  -no-user-package-db -rtsopts      -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build   -c compiler/types/Type.hs -o compiler/stage2/build/Type.p_o -dyno compiler/stage2/build/Type.dyn_o
inplace/bin/dll-split compiler/stage2/build/.depend-v-p-dyn.haskell "DynFlags" "Annotations ApiAnnotation Avail Bag BasicTypes Binary BooleanFormula BreakArray BufWrite Class CmdLineParser CmmType CoAxiom ConLike Coercion Config Constants CoreArity CoreFVs CoreSubst CoreSyn CoreTidy CoreUnfold CoreUtils CostCentre Ctype DataCon Demand Digraph DriverPhases DynFlags Encoding ErrUtils Exception ExtsCompat46 FamInstEnv FastFunctions FastMutInt FastString FastTypes Fingerprint FiniteMap ForeignCall Hooks HsBinds HsDecls HsDoc HsExpr HsImpExp HsLit PlaceHolder HsPat HsSyn HsTypes HsUtils HscTypes IOEnv Id IdInfo IfaceSyn IfaceType InstEnv Kind Lexeme Lexer ListSetOps Literal Maybes MkCore MkId Module MonadUtils Name NameEnv NameSet OccName OccurAnal OptCoercion OrdList Outputable PackageConfig Packages Pair Panic PatSyn PipelineMonad Platform PlatformConstants PprCore PrelNames PrelRules Pretty PrimOp RdrName Rules Serialized SrcLoc StaticFlags StringBuffer TcEvidence TcRnTypes TcType TrieMap TyCon Type TypeRep TysPrim TysWiredIn Unify UniqFM UniqSet UniqSupply Unique Util Var VarEnv VarSet Bitmap BlockId ByteCodeAsm ByteCodeInstr ByteCodeItbls CLabel Cmm CmmCallConv CmmExpr CmmInfo CmmMachOp CmmNode CmmUtils CodeGen.Platform CodeGen.Platform.ARM CodeGen.Platform.ARM64 CodeGen.Platform.NoRegs CodeGen.Platform.PPC CodeGen.Platform.PPC_Darwin CodeGen.Platform.SPARC CodeGen.Platform.X86 CodeGen.Platform.X86_64 FastBool Hoopl Hoopl.Dataflow InteractiveEvalTypes MkGraph PprCmm PprCmmDecl PprCmmExpr Reg RegClass SMRep StgCmmArgRep StgCmmClosure StgCmmEnv StgCmmLayout StgCmmMonad StgCmmProf StgCmmTicky StgCmmUtils StgSyn Stream"
<<ghc: 3296104096 bytes, 306 GCs, 23833521/68554920 avg/max bytes residency (10 samples), 176M in use, 0.000 INIT (0.000 elapsed), 3.353 MUT (4.413 elapsed), 1.427 GC (1.662 elapsed) :ghc>>
"inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_o -hcsuf p_hc -static -prof  -H32m -O    -this-package-key Cabal_3ux67khMI118y6VpwrFnXN -hide-all-packages -i -ilibraries/Cabal/Cabal/. -ilibraries/Cabal/Cabal/dist-install/build -ilibraries/Cabal/Cabal/dist-install/build/autogen -Ilibraries/Cabal/Cabal/dist-install/build -Ilibraries/Cabal/Cabal/dist-install/build/autogen -Ilibraries/Cabal/Cabal/.    -optP-include -optPlibraries/Cabal/Cabal/dist-install/build/autogen/cabal_macros.h -package-key array_67iodizgJQIIxYVTp4emlA -package-key base_HQfYBxpPvuw8OunzQu6JGM -package-key binar_3uXFWMoAGBg0xKP9MHKRwi -package-key bytes_6VWy06pWzJq9evDvK2d4w6 -package-key conta_2C3ZI8RgPO2LBMidXKTvIU -package-key deeps_6vMKxt5sPFR0XsbRWvvq59 -package-key direc_0hFG6ZxK1nk4zsyOqbNHfm -package-key filep_Ey7a1in9roBAE8bUFJ5R9m -package-key prett_JItwetRppk1H5Uq3xbjDGC -package-key proce_52AgREEfSrnJLlkGV9YZZJ -package-key time_FTheb6LSxyX1UABIbBXRfn -package-key unix_KZL8h98IqDM57kQSPo1mKx -Wall -fno-ignore-asserts -fwarn-tabs -XHaskell98 -XCPP -O2  -no-user-package-db -rtsopts      -odir libraries/Cabal/Cabal/dist-install/build -hidir libraries/Cabal/Cabal/dist-install/build -stubdir libraries/Cabal/Cabal/dist-install/build -split-objs  -c libraries/Cabal/Cabal/./Distribution/Simple/Register.hs -o libraries/Cabal/Cabal/dist-install/build/Distribution/Simple/Register.p_o -dyno libraries/Cabal/Cabal/dist-install/build/Distribution/Simple/Register.dyn_o
"inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_o -hcsuf p_hc -static -prof  -H32m -O    -this-package-key Cabal_3ux67khMI118y6VpwrFnXN -hide-all-packages -i -ilibraries/Cabal/Cabal/. -ilibraries/Cabal/Cabal/dist-install/build -ilibraries/Cabal/Cabal/dist-install/build/autogen -Ilibraries/Cabal/Cabal/dist-install/build -Ilibraries/Cabal/Cabal/dist-install/build/autogen -Ilibraries/Cabal/Cabal/.    -optP-include -optPlibraries/Cabal/Cabal/dist-install/build/autogen/cabal_macros.h -package-key array_67iodizgJQIIxYVTp4emlA -package-key base_HQfYBxpPvuw8OunzQu6JGM -package-key binar_3uXFWMoAGBg0xKP9MHKRwi -package-key bytes_6VWy06pWzJq9evDvK2d4w6 -package-key conta_2C3ZI8RgPO2LBMidXKTvIU -package-key deeps_6vMKxt5sPFR0XsbRWvvq59 -package-key direc_0hFG6ZxK1nk4zsyOqbNHfm -package-key filep_Ey7a1in9roBAE8bUFJ5R9m -package-key prett_JItwetRppk1H5Uq3xbjDGC -package-key proce_52AgREEfSrnJLlkGV9YZZJ -package-key time_FTheb6LSxyX1UABIbBXRfn -package-key unix_KZL8h98IqDM57kQSPo1mKx -Wall -fno-ignore-asserts -fwarn-tabs -XHaskell98 -XCPP -O2  -no-user-package-db -rtsopts      -odir libraries/Cabal/Cabal/dist-install/build -hidir libraries/Cabal/Cabal/dist-install/build -stubdir libraries/Cabal/Cabal/dist-install/build -split-objs  -c libraries/Cabal/Cabal/./Distribution/Simple/Install.hs -o libraries/Cabal/Cabal/dist-install/build/Distribution/Simple/Install.p_o -dyno libraries/Cabal/Cabal/dist-install/build/Distribution/Simple/Install.dyn_o
make[1]: *** [compiler/stage2/dll-split.stamp] Segmentation fault: 11

The full log is https://gist.github.com/jamer/053fab8347d3b1ddba9f6c686a53bece

@ilovezfs
Copy link
Contributor

Yup.

echo 'export DYLD_LIBRARY_PATH="/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/directory/dist-install/build:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/unix/dist-install/build:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/time/dist-install/build:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/filepath/dist-install/build:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/bytestring/dist-install/build:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/deepseq/dist-install/build:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/array/dist-install/build:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/base/dist-install/build:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/integer-gmp2/dist-install/build:/usr/local/Cellar/ghc/7.10.3b/libexec/integer-gmp/lib:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/libraries/ghc-prim/dist-install/build:/private/tmp/ghc20160417-83877-zvy9ov/ghc-7.10.3/rts/dist/build:$DYLD_LIBRARY_PATH"' >> inplace/bin/ghc-pwd
echo 'exec "$executablename" ${1+"$@"}'                     >> inplace/bin/ghc-pwd
chmod +x                                                     inplace/bin/runghc
echo '#!/bin/sh'                                                 >> utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist
chmod +x                                                     inplace/bin/ghc-pwd
echo 'export DYLD_LIBRARY_PATH="libraries/Cabal/Cabal/dist-install/build:libraries/process/dist-install/build:libraries/pretty/dist-install/build:libraries/directory/dist-install/build:libraries/unix/dist-install/build:libraries/time/dist-install/build:libraries/filepath/dist-install/build:libraries/binary/dist-install/build:libraries/containers/dist-install/build:libraries/bytestring/dist-install/build:libraries/deepseq/dist-install/build:libraries/array/dist-install/build:libraries/base/dist-install/build:libraries/integer-gmp2/dist-install/build:libraries/ghc-prim/dist-install/build:rts/dist/build:$DYLD_LIBRARY_PATH"' >> utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist
echo 'exec "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal" ${1+"$@"}'                                  >> utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist
chmod +x                                                   utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist
make[1]: *** [compiler/stage2/dll-split.stamp] Segmentation fault: 11
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
/usr/local/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: make 

bash-3.2$ make -j1
===--- building phase 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for `phase_0_builds'.
===--- building phase 1
/Applications/Xcode.app/Contents/Developer/usr/bin/make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
make[1]: Nothing to be done for `phase_1_builds'.
===--- building final phase
/Applications/Xcode.app/Contents/Developer/usr/bin/make -r --no-print-directory -f ghc.mk phase=final all
inplace/bin/dll-split compiler/stage2/build/.depend-v-p-dyn.haskell "DynFlags" "Annotations ApiAnnotation Avail Bag BasicTypes Binary BooleanFormula BreakArray BufWrite Class CmdLineParser CmmType CoAxiom ConLike Coercion Config Constants CoreArity CoreFVs CoreSubst CoreSyn CoreTidy CoreUnfold CoreUtils CostCentre Ctype DataCon Demand Digraph DriverPhases DynFlags Encoding ErrUtils Exception ExtsCompat46 FamInstEnv FastFunctions FastMutInt FastString FastTypes Fingerprint FiniteMap ForeignCall Hooks HsBinds HsDecls HsDoc HsExpr HsImpExp HsLit PlaceHolder HsPat HsSyn HsTypes HsUtils HscTypes IOEnv Id IdInfo IfaceSyn IfaceType InstEnv Kind Lexeme Lexer ListSetOps Literal Maybes MkCore MkId Module MonadUtils Name NameEnv NameSet OccName OccurAnal OptCoercion OrdList Outputable PackageConfig Packages Pair Panic PatSyn PipelineMonad Platform PlatformConstants PprCore PrelNames PrelRules Pretty PrimOp RdrName Rules Serialized SrcLoc StaticFlags StringBuffer TcEvidence TcRnTypes TcType TrieMap TyCon Type TypeRep TysPrim TysWiredIn Unify UniqFM UniqSet UniqSupply Unique Util Var VarEnv VarSet Bitmap BlockId ByteCodeAsm ByteCodeInstr ByteCodeItbls CLabel Cmm CmmCallConv CmmExpr CmmInfo CmmMachOp CmmNode CmmUtils CodeGen.Platform CodeGen.Platform.ARM CodeGen.Platform.ARM64 CodeGen.Platform.NoRegs CodeGen.Platform.PPC CodeGen.Platform.PPC_Darwin CodeGen.Platform.SPARC CodeGen.Platform.X86 CodeGen.Platform.X86_64 FastBool Hoopl Hoopl.Dataflow InteractiveEvalTypes MkGraph PprCmm PprCmmDecl PprCmmExpr Reg RegClass SMRep StgCmmArgRep StgCmmClosure StgCmmEnv StgCmmLayout StgCmmMonad StgCmmProf StgCmmTicky StgCmmUtils StgSyn Stream"
make[1]: *** [compiler/stage2/dll-split.stamp] Segmentation fault: 11
make: *** [all] Error 2

@ilovezfs
Copy link
Contributor

@lukabernardi @jamer What hardware is this on?

@luca-bernardi
Copy link
Author

@ilovezfs MacBookPro 10,1 / OSX 10.11.4

@pmer
Copy link
Contributor

pmer commented Apr 17, 2016

@ilovezfs MacBookPro12,1 / OSX 10.11.4

@ilovezfs
Copy link
Contributor

@lukabernardi @jamer OK, this is an Xcode 7.3 regression. Using 7.2.1:

==> Summary
🍺  /usr/local/Cellar/ghc/7.10.3b: 5,442 files, 827M, built in 41 minutes 34 seconds
iMac-TMP:~ joe$

@ilovezfs
Copy link
Contributor

@lukabernardi @jamer This gets it working under Xcode 7.3:

diff --git a/Formula/ghc.rb b/Formula/ghc.rb
index 98a2265..bbb8f93 100644
--- a/Formula/ghc.rb
+++ b/Formula/ghc.rb
@@ -48,6 +48,17 @@ class Ghc < Formula
   end

   def install
+    mkdir "brewtools"
+    nm_classic = buildpath/"brewtools/nm"
+
+    nm_classic.write <<-EOS.undent
+      #!/bin/bash
+      exec xcrun nm-classic "$@"
+    EOS
+
+    chmod 0755, nm_classic
+    ENV.prepend_path "PATH", buildpath/"brewtools"
+
     # Build a static gmp rather than in-tree gmp, otherwise it links to brew's.
     gmp = libexec/"integer-gmp"


@ilovezfs ilovezfs added 10.11 El Capitan is specifically affected upstream issue An upstream issue report is needed labels Apr 19, 2016
@pmer
Copy link
Contributor

pmer commented Apr 19, 2016

That fix works for me.

@ilovezfs
Copy link
Contributor

Closed via #449

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
10.11 El Capitan is specifically affected upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests

3 participants