Rebuilding GHC on Mac OSX PPC
Simon, Did you say I need to check out the version from CVS and build that? I tried building crypto with the darwinports version and it went fine. I did not see -threaded passed to stage2 builds, though. Thanks, Joel -- http://wagerlabs.com/
Hi Joel, The current darwinports ghc turns off the threaded RTS by patching a makefile during the build. With the threaded RTS you would very likely have seen access violations in the CrashReporter log, and the build of the crypto lib would have failed. The crash while building the crypto library was one of the first signs that the threaded RTS had a problem. Best Wishes, Greg On Jul 26, 2006, at 7:20 AM, Joel Reymont wrote:
Simon,
Did you say I need to check out the version from CVS and build that?
I tried building crypto with the darwinports version and it went fine. I did not see -threaded passed to stage2 builds, though.
Thanks, Joel
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
On Jul 26, 2006, at 2:06 PM, Gregory Wright wrote:
The crash while building the crypto library was one of the first signs that the threaded RTS had a problem.
My question was whether the CVS version has the flag set. I looked through mk/config.mk but could not figure it out quickly so I just set off another build of ghc. Should be ready in a few hours :-). I compiled crypto with ghc 6.5 on Mac Intel and it went through fine after some tweaks to cabal dependencies. -- http://wagerlabs.com/
Hi Joel, The "-threaded" flag is set in ghc/compiler/Makefile. Look around line 398, for SRC_HC_OPTS += -threaded -Greg On Jul 26, 2006, at 9:17 AM, Joel Reymont wrote:
On Jul 26, 2006, at 2:06 PM, Gregory Wright wrote:
The crash while building the crypto library was one of the first signs that the threaded RTS had a problem.
My question was whether the CVS version has the flag set. I looked through mk/config.mk but could not figure it out quickly so I just set off another build of ghc. Should be ready in a few hours :-).
I compiled crypto with ghc 6.5 on Mac Intel and it went through fine after some tweaks to cabal dependencies.
This is being set in the CVS version. On Jul 26, 2006, at 2:49 PM, Gregory Wright wrote:
Hi Joel,
The "-threaded" flag is set in ghc/compiler/Makefile. Look around line 398, for SRC_HC_OPTS += -threaded
I'm building ghc 6.4.2 from CVS on Mac PPC and get the error below. Any clues? ==fptools== make boot - --no-print-directory -r; in /Users/zomariya/Work/fptools/ghc/lib/compat ------------------------------------------------------------------------ ../../../glafp-utils/mkdependC/mkdependC -f .depend -I. -Iinclude - I../../includes -- -O -I. -Iinclude -- cbits/directory.c cbits/ rawSystem.c /opt/local/bin/ghc -M -optdep-f -optdep.depend -osuf o -optdep-- exclude-module=System.Directory.Internals -H16m -O -I. -Iinclude - Rghc-timing -ignore-package Cabal -I../../../libraries -fglasgow-exts -no-recomp Compat/Directory.hs Compat/RawSystem.hs Distribution/ Compat/FilePath.hs Distribution/Compat/ReadP.hs Distribution/ Compiler.hs Distribution/GetOpt.hs Distribution/ InstalledPackageInfo.hs Distribution/License.hs Distribution/ Package.hs Distribution/ParseUtils.hs Distribution/Version.hs Language/Haskell/Extension.hs Distribution/Compat/FilePath.hs:2: error: Cabal/Distribution/Compat/ FilePath.hs: No such file or directory <<ghc: 14349576 bytes, 3 GCs, 94444/94444 avg/max bytes residency (1 samples), 15M in use, 0.00 INIT (0.00 elapsed), 0.06 MUT (0.22 elapsed), 0.02 GC (0.04 elapsed) :ghc>> make[3]: *** [depend] Error 1 make[2]: *** [boot] Error 1 make[1]: *** [boot] Error 1 make: *** [build] Error 1
Hi Joel, Off the top of my head, I can't tell what is the reason for this. What compiler are you using to build ghc 6.4.2? -Greg On Jul 26, 2006, at 9:24 AM, Joel Reymont wrote:
I'm building ghc 6.4.2 from CVS on Mac PPC and get the error below. Any clues?
==fptools== make boot - --no-print-directory -r; in /Users/zomariya/Work/fptools/ghc/lib/compat ---------------------------------------------------------------------- -- ../../../glafp-utils/mkdependC/mkdependC -f .depend -I. - Iinclude -I../../includes -- -O -I. -Iinclude -- cbits/ directory.c cbits/rawSystem.c /opt/local/bin/ghc -M -optdep-f -optdep.depend -osuf o -optdep-- exclude-module=System.Directory.Internals -H16m -O -I. -Iinclude - Rghc-timing -ignore-package Cabal -I../../../libraries -fglasgow- exts -no-recomp Compat/Directory.hs Compat/RawSystem.hs Distribution/Compat/FilePath.hs Distribution/Compat/ReadP.hs Distribution/Compiler.hs Distribution/GetOpt.hs Distribution/ InstalledPackageInfo.hs Distribution/License.hs Distribution/ Package.hs Distribution/ParseUtils.hs Distribution/Version.hs Language/Haskell/Extension.hs Distribution/Compat/FilePath.hs:2: error: Cabal/Distribution/Compat/ FilePath.hs: No such file or directory <<ghc: 14349576 bytes, 3 GCs, 94444/94444 avg/max bytes residency (1 samples), 15M in use, 0.00 INIT (0.00 elapsed), 0.06 MUT (0.22 elapsed), 0.02 GC (0.04 elapsed) :ghc>> make[3]: *** [depend] Error 1 make[2]: *** [boot] Error 1 make[1]: *** [boot] Error 1 make: *** [build] Error 1
I'm using ghc 6.4.2 from darwinports to build the CVS version. There's positively no Cabal directory under fptools. On Jul 26, 2006, at 2:50 PM, Gregory Wright wrote:
Hi Joel,
Off the top of my head, I can't tell what is the reason for this. What compiler are you using to build ghc 6.4.2?
Joel Reymont wrote:
I'm building ghc 6.4.2 from CVS on Mac PPC and get the error below. Any clues?
==fptools== make boot - --no-print-directory -r; in /Users/zomariya/Work/fptools/ghc/lib/compat ------------------------------------------------------------------------ ../../../glafp-utils/mkdependC/mkdependC -f .depend -I. -Iinclude - I../../includes -- -O -I. -Iinclude -- cbits/directory.c cbits/ rawSystem.c /opt/local/bin/ghc -M -optdep-f -optdep.depend -osuf o -optdep-- exclude-module=System.Directory.Internals -H16m -O -I. -Iinclude - Rghc-timing -ignore-package Cabal -I../../../libraries -fglasgow-exts -no-recomp Compat/Directory.hs Compat/RawSystem.hs Distribution/ Compat/FilePath.hs Distribution/Compat/ReadP.hs Distribution/ Compiler.hs Distribution/GetOpt.hs Distribution/ InstalledPackageInfo.hs Distribution/License.hs Distribution/ Package.hs Distribution/ParseUtils.hs Distribution/Version.hs Language/Haskell/Extension.hs Distribution/Compat/FilePath.hs:2: error: Cabal/Distribution/Compat/ FilePath.hs: No such file or directory <<ghc: 14349576 bytes, 3 GCs, 94444/94444 avg/max bytes residency (1 samples), 15M in use, 0.00 INIT (0.00 elapsed), 0.06 MUT (0.22 elapsed), 0.02 GC (0.04 elapsed) :ghc>> make[3]: *** [depend] Error 1 make[2]: *** [boot] Error 1 make[1]: *** [boot] Error 1 make: *** [build] Error 1
ghc/lib/compat/Distribution/Compat/FilePath.hs #include's Cabal/Distribution/Compat/FilePath.hs, which it is supposed to find by virtue of the -I../../../libraries arg passed to ghc. So does Cabal/Distribution/Compat/FilePath.hs exist relative to libraries in your tree? Cheers, Simon
On Jul 26, 2006, at 3:20 PM, Simon Marlow wrote:
ghc/lib/compat/Distribution/Compat/FilePath.hs #include's Cabal/ Distribution/Compat/FilePath.hs, which it is supposed to find by virtue of the -I../../../libraries arg passed to ghc.
So does Cabal/Distribution/Compat/FilePath.hs exist relative to libraries in your tree?
Nope. Nowhere under fptools. I forgot to checkout libraries. Anything else I need? hslibs? -- http://wagerlabs.com/
Foot in mouth. Gotta read the manual (README). On Jul 26, 2006, at 3:20 PM, Simon Marlow wrote:
So does Cabal/Distribution/Compat/FilePath.hs exist relative to libraries in your tree?
I checked out GHC from cvs and spent half a day building it but it turned out to be 6.5. Is this correct? I built the crypto library without problems. How do I get 6.4.2 from cvs?
On 27 July 2006 09:48, Joel Reymont wrote:
I checked out GHC from cvs and spent half a day building it but it turned out to be 6.5. Is this correct? I built the crypto library without problems.
How do I get 6.4.2 from cvs?
You need to use -r ghc-6-4-branch when checking out, sorry about that. You have an old version of 6.5 there, at the point when we stopped using CVS for the HEAD. Cheers, Simon
On Jul 27, 2006, at 9:53 AM, Simon Marlow wrote:
You need to use -r ghc-6-4-branch when checking out, sorry about that.
Ok, so I did cvs co -r ghc-6-4-branch <ghc, hslibs, etc.>. My build failed after an hour. /usr/bin/ld: warning multiple definitions of symbol _UP /opt/local/lib/libreadline.5.dylib(terminal.so) definition of _UP /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libncurses.dylib (lib_termcap.o) definition of _UP /usr/bin/ld: warning multiple definitions of symbol _BC /opt/local/lib/libreadline.5.dylib(terminal.so) definition of _BC /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libncurses.dylib (lib_termcap.o) definition of _BC /usr/bin/ld: warning multiple definitions of symbol _PC /opt/local/lib/libreadline.5.dylib(terminal.so) definition of _PC /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libncurses.dylib (lib_tputs.o) definition of _PC /usr/bin/ld: Undefined symbols: _allocateExec Full output: /opt/local/bin/ghc -o stage1/ghc-6.4.2 -H16m -O -istage1/utils - istage1/basicTypes -istage1/types -istage1/hsSyn -istage1/prelude -istage1/rename -istage1/typecheck -istage1/deSugar -istage1/ coreSyn -istage1/specialise -istage1/simplCore -istage1/stranal - istage1/stgSyn -istage1/simplStg -istage1/codeGen -istage1/main - istage1/profiling -istage1/parser -istage1/cprAnalysis -istage1/ compMan -istage1/ndpFlatten -istage1/iface -istage1/cmm -istage1/ nativeGen -istage1/ghci -Istage1 -DGHCI -package template-haskell - threaded -package readline -DUSE_READLINE -cpp -fglasgow-exts -fno- generics -Rghc-timing -I. -IcodeGen -InativeGen -Iparser -package unix -ignore-package lang -recomp -Rghc-timing -H16M '-#include "hschooks.h"' -i../lib/compat -ignore-package Cabal -L../lib/ compat -lghccompat -no-link-chk stage1/basicTypes/BasicTypes.o stage1/basicTypes/DataCon.o stage1/basicTypes/Demand.o stage1/ basicTypes/FieldLabel.o stage1/basicTypes/Id.o stage1/basicTypes/ IdInfo.o stage1/basicTypes/Literal.o stage1/basicTypes/MkId.o stage1/basicTypes/Module.o stage1/basicTypes/Name.o stage1/ basicTypes/NameEnv.o stage1/basicTypes/NameSet.o stage1/basicTypes/ NewDemand.o stage1/basicTypes/OccName.o stage1/basicTypes/ RdrName.o stage1/basicTypes/SrcLoc.o stage1/basicTypes/ UniqSupply.o stage1/basicTypes/Unique.o stage1/basicTypes/Var.o stage1/basicTypes/VarEnv.o stage1/basicTypes/VarSet.o stage1/cmm/ CLabel.o stage1/cmm/Cmm.o stage1/cmm/CmmLex.o stage1/cmm/ CmmLint.o stage1/cmm/CmmParse.o stage1/cmm/CmmUtils.o stage1/cmm/ MachOp.o stage1/cmm/PprC.o stage1/cmm/PprCmm.o stage1/codeGen/ Bitmap.o stage1/codeGen/CgBindery.o stage1/codeGen/CgCallConv.o stage1/codeGen/CgCase.o stage1/codeGen/CgClosure.o stage1/codeGen/ CgCon.o stage1/codeGen/CgExpr.o stage1/codeGen/CgForeignCall.o stage1/codeGen/CgHeapery.o stage1/codeGen/CgInfoTbls.o stage1/ codeGen/CgLetNoEscape.o stage1/codeGen/CgMonad.o stage1/codeGen/ CgParallel.o stage1/codeGen/CgPrimOp.o stage1/codeGen/CgProf.o stage1/codeGen/CgStackery.o stage1/codeGen/CgTailCall.o stage1/ codeGen/CgTicky.o stage1/codeGen/CgUtils.o stage1/codeGen/ ClosureInfo.o stage1/codeGen/CodeGen.o stage1/codeGen/SMRep.o stage1/compMan/CompManager.o stage1/coreSyn/CoreFVs.o stage1/ coreSyn/CoreLint.o stage1/coreSyn/CorePrep.o stage1/coreSyn/ CoreSubst.o stage1/coreSyn/CoreSyn.o stage1/coreSyn/CoreTidy.o stage1/coreSyn/CoreUnfold.o stage1/coreSyn/CoreUtils.o stage1/ coreSyn/ExternalCore.o stage1/coreSyn/MkExternalCore.o stage1/ coreSyn/PprCore.o stage1/coreSyn/PprExternalCore.o stage1/ cprAnalysis/CprAnalyse.o stage1/deSugar/Check.o stage1/deSugar/ Desugar.o stage1/deSugar/DsArrows.o stage1/deSugar/DsBinds.o stage1/deSugar/DsCCall.o stage1/deSugar/DsExpr.o stage1/deSugar/ DsForeign.o stage1/deSugar/DsGRHSs.o stage1/deSugar/DsListComp.o stage1/deSugar/DsMeta.o stage1/deSugar/DsMonad.o stage1/deSugar/ DsUtils.o stage1/deSugar/Match.o stage1/deSugar/MatchCon.o stage1/ deSugar/MatchLit.o stage1/ghci/ByteCodeAsm.o stage1/ghci/ ByteCodeFFI.o stage1/ghci/ByteCodeGen.o stage1/ghci/ ByteCodeInstr.o stage1/ghci/ByteCodeItbls.o stage1/ghci/ ByteCodeLink.o stage1/ghci/InteractiveUI.o stage1/ghci/Linker.o stage1/ghci/ObjLink.o stage1/hsSyn/Convert.o stage1/hsSyn/ HsBinds.o stage1/hsSyn/HsDecls.o stage1/hsSyn/HsExpr.o stage1/ hsSyn/HsImpExp.o stage1/hsSyn/HsLit.o stage1/hsSyn/HsPat.o stage1/ hsSyn/HsSyn.o stage1/hsSyn/HsTypes.o stage1/hsSyn/HsUtils.o stage1/ iface/BinIface.o stage1/iface/BuildTyCl.o stage1/iface/IfaceEnv.o stage1/iface/IfaceSyn.o stage1/iface/IfaceType.o stage1/iface/ LoadIface.o stage1/iface/MkIface.o stage1/iface/TcIface.o stage1/ main/CmdLineOpts.o stage1/main/CodeOutput.o stage1/main/Config.o stage1/main/Constants.o stage1/main/DriverFlags.o stage1/main/ DriverMkDepend.o stage1/main/DriverPhases.o stage1/main/ DriverPipeline.o stage1/main/DriverState.o stage1/main/ DriverUtil.o stage1/main/ErrUtils.o stage1/main/Finder.o stage1/ main/GetImports.o stage1/main/HscMain.o stage1/main/HscStats.o stage1/main/HscTypes.o stage1/main/Main.o stage1/main/ PackageConfig.o stage1/main/Packages.o stage1/main/ParsePkgConf.o stage1/main/SysTools.o stage1/main/TidyPgm.o stage1/nativeGen/ AsmCodeGen.o stage1/nativeGen/MachCodeGen.o stage1/nativeGen/ MachInstrs.o stage1/nativeGen/MachRegs.o stage1/nativeGen/ NCGMonad.o stage1/nativeGen/PositionIndependentCode.o stage1/ nativeGen/PprMach.o stage1/nativeGen/RegAllocInfo.o stage1/ nativeGen/RegisterAlloc.o stage1/ndpFlatten/FlattenInfo.o stage1/ ndpFlatten/FlattenMonad.o stage1/ndpFlatten/Flattening.o stage1/ ndpFlatten/NDPCoreUtils.o stage1/ndpFlatten/PArrAnal.o stage1/ parser/Ctype.o stage1/parser/LexCore.o stage1/parser/Lexer.o stage1/parser/Parser.o stage1/parser/ParserCore.o stage1/parser/ ParserCoreUtils.o stage1/parser/RdrHsSyn.o stage1/prelude/ ForeignCall.o stage1/prelude/PrelInfo.o stage1/prelude/PrelNames.o stage1/prelude/PrelRules.o stage1/prelude/PrimOp.o stage1/prelude/ TysPrim.o stage1/prelude/TysWiredIn.o stage1/profiling/ CostCentre.o stage1/profiling/SCCfinal.o stage1/rename/RnBinds.o stage1/rename/RnEnv.o stage1/rename/RnExpr.o stage1/rename/ RnHsSyn.o stage1/rename/RnNames.o stage1/rename/RnSource.o stage1/ rename/RnTypes.o stage1/simplCore/CSE.o stage1/simplCore/FloatIn.o stage1/simplCore/FloatOut.o stage1/simplCore/LiberateCase.o stage1/ simplCore/OccurAnal.o stage1/simplCore/SAT.o stage1/simplCore/ SATMonad.o stage1/simplCore/SetLevels.o stage1/simplCore/ SimplCore.o stage1/simplCore/SimplEnv.o stage1/simplCore/ SimplMonad.o stage1/simplCore/SimplUtils.o stage1/simplCore/ Simplify.o stage1/simplStg/SRT.o stage1/simplStg/SimplStg.o stage1/ simplStg/StgStats.o stage1/specialise/Rules.o stage1/specialise/ SpecConstr.o stage1/specialise/Specialise.o stage1/stgSyn/ CoreToStg.o stage1/stgSyn/StgLint.o stage1/stgSyn/StgSyn.o stage1/ stranal/DmdAnal.o stage1/stranal/SaAbsInt.o stage1/stranal/SaLib.o stage1/stranal/StrictAnal.o stage1/stranal/WorkWrap.o stage1/ stranal/WwLib.o stage1/typecheck/Inst.o stage1/typecheck/ TcArrows.o stage1/typecheck/TcBinds.o stage1/typecheck/ TcClassDcl.o stage1/typecheck/TcDefaults.o stage1/typecheck/ TcDeriv.o stage1/typecheck/TcEnv.o stage1/typecheck/TcExpr.o stage1/typecheck/TcForeign.o stage1/typecheck/TcGenDeriv.o stage1/ typecheck/TcHsSyn.o stage1/typecheck/TcHsType.o stage1/typecheck/ TcInstDcls.o stage1/typecheck/TcMType.o stage1/typecheck/ TcMatches.o stage1/typecheck/TcPat.o stage1/typecheck/TcRnDriver.o stage1/typecheck/TcRnMonad.o stage1/typecheck/TcRnTypes.o stage1/ typecheck/TcRules.o stage1/typecheck/TcSimplify.o stage1/typecheck/ TcSplice.o stage1/typecheck/TcTyClsDecls.o stage1/typecheck/ TcTyDecls.o stage1/typecheck/TcType.o stage1/typecheck/TcUnify.o stage1/types/Class.o stage1/types/FunDeps.o stage1/types/ Generics.o stage1/types/InstEnv.o stage1/types/Kind.o stage1/types/ TyCon.o stage1/types/Type.o stage1/types/TypeRep.o stage1/types/ Unify.o stage1/utils/Bag.o stage1/utils/Binary.o stage1/utils/ BitSet.o stage1/utils/BufWrite.o stage1/utils/Digraph.o stage1/ utils/FastMutInt.o stage1/utils/FastString.o stage1/utils/ FastTypes.o stage1/utils/FiniteMap.o stage1/utils/IOEnv.o stage1/ utils/ListSetOps.o stage1/utils/Maybes.o stage1/utils/OrdList.o stage1/utils/Outputable.o stage1/utils/Panic.o stage1/utils/ Pretty.o stage1/utils/PrimPacked.o stage1/utils/StringBuffer.o stage1/utils/UnicodeUtil.o stage1/utils/UniqFM.o stage1/utils/ UniqSet.o stage1/utils/Util.o stage1/parser/hschooks.o /usr/bin/ld: warning multiple definitions of symbol _UP /opt/local/lib/libreadline.5.dylib(terminal.so) definition of _UP /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libncurses.dylib (lib_termcap.o) definition of _UP /usr/bin/ld: warning multiple definitions of symbol _BC /opt/local/lib/libreadline.5.dylib(terminal.so) definition of _BC /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libncurses.dylib (lib_termcap.o) definition of _BC /usr/bin/ld: warning multiple definitions of symbol _PC /opt/local/lib/libreadline.5.dylib(terminal.so) definition of _PC /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libncurses.dylib (lib_tputs.o) definition of _PC /usr/bin/ld: Undefined symbols: _allocateExec collect2: ld returned 1 exit status <<ghc: 14018200 bytes, 3 GCs, 168628/168628 avg/max bytes residency (1 samples), 15M in use, 0.01 INIT (0.00 elapsed), 0.06 MUT (4.22 elapsed), 0.03 GC (0.05 elapsed) :ghc>> make[2]: *** [stage1/ghc-6.4.2] Error 1 make[1]: *** [all] Error 1 make: *** [build] Error 1 real 55m0.599s user 48m57.869s sys 3m45.973s -- http://wagerlabs.com/
On 27 July 2006 12:57, Joel Reymont wrote:
On Jul 27, 2006, at 9:53 AM, Simon Marlow wrote:
You need to use -r ghc-6-4-branch when checking out, sorry about that.
Ok, so I did cvs co -r ghc-6-4-branch <ghc, hslibs, etc.>. My build failed after an hour.
You didn't mention this explicitly, so just to be clear: did you update the root of your repository to the ghc-6-4-branch too?
/usr/bin/ld: warning multiple definitions of symbol _UP /opt/local/lib/libreadline.5.dylib(terminal.so) definition of _UP /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libncurses.dylib (lib_termcap.o) definition of _UP /usr/bin/ld: warning multiple definitions of symbol _BC /opt/local/lib/libreadline.5.dylib(terminal.so) definition of _BC /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libncurses.dylib (lib_termcap.o) definition of _BC /usr/bin/ld: warning multiple definitions of symbol _PC /opt/local/lib/libreadline.5.dylib(terminal.so) definition of _PC /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libncurses.dylib (lib_tputs.o) definition of _PC /usr/bin/ld: Undefined symbols: _allocateExec
I have no idea what might cause these. What is your /opt/local/bin/ghc? Cheers, Simon
On Jul 27, 2006, at 1:03 PM, Simon Marlow wrote:
You didn't mention this explicitly, so just to be clear: did you update the root of your repository to the ghc-6-4-branch too?
I started from scratch with fpconfig. I then changed into the fptools directory and grabbed the rest. I'm gonna try this again by checking out fpconfig from the proper branch and then checking out the rest. -- http://wagerlabs.com/
On Jul 27, 2006, at 1:03 PM, Simon Marlow wrote:
You didn't mention this explicitly, so just to be clear: did you update the root of your repository to the ghc-6-4-branch too?
I'm not sure what the root is but I blew everything away and did the following: mv fptools/ fptools.bak cvs co -r ghc-6-4-branch fpconfig cd fptools cvs co -r ghc-6-4-branch ghc hslibs happy haddock libraries autoreconf ./configure make clean make Go the same error as reported before. Something is linking against both libncurses and libreadline which is what's causing problems.
I have no idea what might cause these. What is your /opt/local/bin/ ghc?
This is ghc 6.4.2 that I got from DarwinPorts. It's built without - threaded and works. I never had problems with it before. -- http://wagerlabs.com/
More on allocateExec... I see this at the end of ./ghc/compiler/ghci/ ByteCodeItbls.lhs foreign import ccall unsafe "allocateExec" _allocateExec :: CUInt -> IO (Ptr a) malloc_exec :: Int -> IO (Ptr a) malloc_exec bytes = _allocateExec (fromIntegral bytes) It does not appear that malloc_exec is used anywhere else but here it's used in the function below. I don't know where allocateExec is supposed to be coming from. -- Assumes constructors are numbered from zero, not one make_constr_itbls :: [DataCon] -> IO ItblEnv make_constr_itbls cons | listLengthCmp cons 8 /= GT -- <= 8 elements in the list = do is <- mapM mk_vecret_itbl (zip cons [0..]) return (mkItblEnv is) | otherwise = do is <- mapM mk_dirret_itbl (zip cons [0..]) return (mkItblEnv is) where mk_vecret_itbl (dcon, conNo) = mk_itbl dcon conNo (vecret_entry conNo) mk_dirret_itbl (dcon, conNo) = mk_itbl dcon conNo stg_interp_constr_entry mk_itbl :: DataCon -> Int -> Ptr () -> IO (Name,ItblPtr) mk_itbl dcon conNo entry_addr = let rep_args = [ (typeCgRep arg,arg) | arg <- dataConRepArgTys dcon ] (tot_wds, ptr_wds, _) = mkVirtHeapOffsets rep_args ptrs = ptr_wds nptrs = tot_wds - ptr_wds nptrs_really | ptrs + nptrs >= mIN_SIZE_NonUpdHeapObject = nptrs | otherwise = mIN_SIZE_NonUpdHeapObject - ptrs itbl = StgInfoTable { ptrs = fromIntegral ptrs, nptrs = fromIntegral nptrs_really, tipe = fromIntegral cONSTR, srtlen = fromIntegral conNo, code = code } -- Make a piece of code to jump to "entry_label". -- This is the only arch-dependent bit. code = mkJumpToAddr entry_addr in do addr <- malloc_exec (sizeOf itbl) --putStrLn ("SIZE of itbl is " ++ show (sizeOf itbl)) --putStrLn ("# ptrs of itbl is " ++ show ptrs) --putStrLn ("# nptrs of itbl is " ++ show nptrs_really) poke addr itbl return (getName dcon, addr `plusPtr` (2 * wORD_SIZE))
It didn't take me long to discover allocateExec in ./ghc/rts/Storage.c. I'm at a loss for clues as the build line that's trying to build stage1 ghc and barfing does not include anything from the rts directory. Shouldn't it? -- http://wagerlabs.com/
Joel Reymont wrote:
It didn't take me long to discover allocateExec in ./ghc/rts/Storage.c.
I'm at a loss for clues as the build line that's trying to build stage1 ghc and barfing does not include anything from the rts directory. Shouldn't it?
Ah, I see the problem. We added allocateExec() after the 6.4.2, but the version in the source tree is still 6.4.2, so GHC thinks it is safe to assume the two versions are the same, when in fact the 6.4.2 you are bootstrapping with doesn't have allocateExec(). I've bumped the version in the source tree to 6.4.3, this should fix the build for you. Cheers, Simon
On Jul 28, 2006, at 8:47 AM, Simon Marlow wrote:
Ah, I see the problem. We added allocateExec() after the 6.4.2, but the version in the source tree is still 6.4.2, so GHC thinks it is safe to assume the two versions are the same, when in fact the 6.4.2 you are bootstrapping with doesn't have allocateExec(). I've bumped the version in the source tree to 6.4.3, this should fix the build for you.
So what do I do now? Just cvs update in fptools? Blow everything away and check out from scratch? What branch do I use? Thanks, Joel -- http://wagerlabs.com/
On 28 July 2006 10:54, Joel Reymont wrote:
On Jul 28, 2006, at 8:47 AM, Simon Marlow wrote:
Ah, I see the problem. We added allocateExec() after the 6.4.2, but the version in the source tree is still 6.4.2, so GHC thinks it is safe to assume the two versions are the same, when in fact the 6.4.2 you are bootstrapping with doesn't have allocateExec(). I've bumped the version in the source tree to 6.4.3, this should fix the build for you.
So what do I do now? Just cvs update in fptools? Blow everything away and check out from scratch? What branch do I use?
cvs update in ghc/, then 'make clean' and you should be all set. Cheers, Simon
On Jul 28, 2006, at 11:11 AM, Simon Marlow wrote:
cvs update in ghc/, then 'make clean' and you should be all set.
This is probably a silly question but I have never used cvs before. I assume cvs saved the CVSROOT and the password, is that right? Also, I only saw P configure.ac Should there be other changes? Does this mean that I need to run configure again and then make clean and make? Thanks, Joel -- http://wagerlabs.com/
On 28 July 2006 11:39, Joel Reymont wrote:
On Jul 28, 2006, at 11:11 AM, Simon Marlow wrote:
cvs update in ghc/, then 'make clean' and you should be all set.
This is probably a silly question but I have never used cvs before. I assume cvs saved the CVSROOT and the password, is that right? Also, I only saw
P configure.ac
Should there be other changes?
No, that's fine.
Does this mean that I need to run configure again and then make clean and make?
You shouldn't have to run configure again, but make clean definitely. Cheers, Simon
On Jul 28, 2006, at 11:42 AM, Simon Marlow wrote:
You shouldn't have to run configure again, but make clean definitely.
I still get the same allocateExec error. I'm still not sure how updating configure.ac in ghc and making clean was going to help :-). -- http://wagerlabs.com/
On 28 July 2006 12:50, Joel Reymont wrote:
On Jul 28, 2006, at 11:42 AM, Simon Marlow wrote:
You shouldn't have to run configure again, but make clean definitely.
I still get the same allocateExec error. I'm still not sure how updating configure.ac in ghc and making clean was going to help :-).
duh, sorry - you do need to autoreconf and configure of course. Next time I'm obviously talking rubbish, please feel free to ignore me! Cheers, Simon
I give up! Mac PPC doesn't like me now that I'm on Intel. This is PPC, btw, and I _do_ have readline installed. GHC from DarwinPorts compiles just fine. ../../ghc/compiler/stage1/ghc-inplace -o stage2/ghc-6.4.3 -H16m -O - istage2/utils -istage2/basicTypes -istage2/types -istage2/hsSyn - istage2/prelude -istage2/rename -istage2/typecheck -istage2/ deSugar -istage2/coreSyn -istage2/specialise -istage2/simplCore - istage2/stranal -istage2/stgSyn -istage2/simplStg -istage2/ codeGen -istage2/main -istage2/profiling -istage2/parser -istage2/ cprAnalysis -istage2/compMan -istage2/ndpFlatten -istage2/iface - istage2/cmm -istage2/nativeGen -istage2/ghci -Istage2 -DGHCI - package template-haskell -threaded -package readline -DUSE_READLINE - cpp -fglasgow-exts -fno-generics -Rghc-timing -I. -IcodeGen - InativeGen -Iparser -package unix -package Cabal -ignore-package lang -recomp -Rghc-timing -H16M '-#include "hschooks.h"' -no-link- chk stage2/basicTypes/BasicTypes.o stage2/basicTypes/DataCon.o stage2/basicTypes/Demand.o stage2/basicTypes/FieldLabel.o stage2/ basicTypes/Id.o stage2/basicTypes/IdInfo.o stage2/basicTypes/ Literal.o stage2/basicTypes/MkId.o stage2/basicTypes/Module.o stage2/basicTypes/Name.o stage2/basicTypes/NameEnv.o stage2/ basicTypes/NameSet.o stage2/basicTypes/NewDemand.o stage2/ basicTypes/OccName.o stage2/basicTypes/RdrName.o stage2/basicTypes/ SrcLoc.o stage2/basicTypes/UniqSupply.o stage2/basicTypes/Unique.o stage2/basicTypes/Var.o stage2/basicTypes/VarEnv.o stage2/ basicTypes/VarSet.o stage2/cmm/CLabel.o stage2/cmm/Cmm.o stage2/ cmm/CmmLex.o stage2/cmm/CmmLint.o stage2/cmm/CmmParse.o stage2/cmm/ CmmUtils.o stage2/cmm/MachOp.o stage2/cmm/PprC.o stage2/cmm/ PprCmm.o stage2/codeGen/Bitmap.o stage2/codeGen/CgBindery.o stage2/ codeGen/CgCallConv.o stage2/codeGen/CgCase.o stage2/codeGen/ CgClosure.o stage2/codeGen/CgCon.o stage2/codeGen/CgExpr.o stage2/ codeGen/CgForeignCall.o stage2/codeGen/CgHeapery.o stage2/codeGen/ CgInfoTbls.o stage2/codeGen/CgLetNoEscape.o stage2/codeGen/ CgMonad.o stage2/codeGen/CgParallel.o stage2/codeGen/CgPrimOp.o stage2/codeGen/CgProf.o stage2/codeGen/CgStackery.o stage2/codeGen/ CgTailCall.o stage2/codeGen/CgTicky.o stage2/codeGen/CgUtils.o stage2/codeGen/ClosureInfo.o stage2/codeGen/CodeGen.o stage2/ codeGen/SMRep.o stage2/compMan/CompManager.o stage2/coreSyn/ CoreFVs.o stage2/coreSyn/CoreLint.o stage2/coreSyn/CorePrep.o stage2/coreSyn/CoreSubst.o stage2/coreSyn/CoreSyn.o stage2/coreSyn/ CoreTidy.o stage2/coreSyn/CoreUnfold.o stage2/coreSyn/CoreUtils.o stage2/coreSyn/ExternalCore.o stage2/coreSyn/MkExternalCore.o stage2/coreSyn/PprCore.o stage2/coreSyn/PprExternalCore.o stage2/ cprAnalysis/CprAnalyse.o stage2/deSugar/Check.o stage2/deSugar/ Desugar.o stage2/deSugar/DsArrows.o stage2/deSugar/DsBinds.o stage2/deSugar/DsCCall.o stage2/deSugar/DsExpr.o stage2/deSugar/ DsForeign.o stage2/deSugar/DsGRHSs.o stage2/deSugar/DsListComp.o stage2/deSugar/DsMeta.o stage2/deSugar/DsMonad.o stage2/deSugar/ DsUtils.o stage2/deSugar/Match.o stage2/deSugar/MatchCon.o stage2/ deSugar/MatchLit.o stage2/ghci/ByteCodeAsm.o stage2/ghci/ ByteCodeFFI.o stage2/ghci/ByteCodeGen.o stage2/ghci/ ByteCodeInstr.o stage2/ghci/ByteCodeItbls.o stage2/ghci/ ByteCodeLink.o stage2/ghci/InteractiveUI.o stage2/ghci/Linker.o stage2/ghci/ObjLink.o stage2/hsSyn/Convert.o stage2/hsSyn/ HsBinds.o stage2/hsSyn/HsDecls.o stage2/hsSyn/HsExpr.o stage2/ hsSyn/HsImpExp.o stage2/hsSyn/HsLit.o stage2/hsSyn/HsPat.o stage2/ hsSyn/HsSyn.o stage2/hsSyn/HsTypes.o stage2/hsSyn/HsUtils.o stage2/ iface/BinIface.o stage2/iface/BuildTyCl.o stage2/iface/IfaceEnv.o stage2/iface/IfaceSyn.o stage2/iface/IfaceType.o stage2/iface/ LoadIface.o stage2/iface/MkIface.o stage2/iface/TcIface.o stage2/ main/CmdLineOpts.o stage2/main/CodeOutput.o stage2/main/Config.o stage2/main/Constants.o stage2/main/DriverFlags.o stage2/main/ DriverMkDepend.o stage2/main/DriverPhases.o stage2/main/ DriverPipeline.o stage2/main/DriverState.o stage2/main/ DriverUtil.o stage2/main/ErrUtils.o stage2/main/Finder.o stage2/ main/GetImports.o stage2/main/HscMain.o stage2/main/HscStats.o stage2/main/HscTypes.o stage2/main/Main.o stage2/main/ PackageConfig.o stage2/main/Packages.o stage2/main/ParsePkgConf.o stage2/main/SysTools.o stage2/main/TidyPgm.o stage2/nativeGen/ AsmCodeGen.o stage2/nativeGen/MachCodeGen.o stage2/nativeGen/ MachInstrs.o stage2/nativeGen/MachRegs.o stage2/nativeGen/ NCGMonad.o stage2/nativeGen/PositionIndependentCode.o stage2/ nativeGen/PprMach.o stage2/nativeGen/RegAllocInfo.o stage2/ nativeGen/RegisterAlloc.o stage2/ndpFlatten/FlattenInfo.o stage2/ ndpFlatten/FlattenMonad.o stage2/ndpFlatten/Flattening.o stage2/ ndpFlatten/NDPCoreUtils.o stage2/ndpFlatten/PArrAnal.o stage2/ parser/Ctype.o stage2/parser/LexCore.o stage2/parser/Lexer.o stage2/parser/Parser.o stage2/parser/ParserCore.o stage2/parser/ ParserCoreUtils.o stage2/parser/RdrHsSyn.o stage2/prelude/ ForeignCall.o stage2/prelude/PrelInfo.o stage2/prelude/PrelNames.o stage2/prelude/PrelRules.o stage2/prelude/PrimOp.o stage2/prelude/ TysPrim.o stage2/prelude/TysWiredIn.o stage2/profiling/ CostCentre.o stage2/profiling/SCCfinal.o stage2/rename/RnBinds.o stage2/rename/RnEnv.o stage2/rename/RnExpr.o stage2/rename/ RnHsSyn.o stage2/rename/RnNames.o stage2/rename/RnSource.o stage2/ rename/RnTypes.o stage2/simplCore/CSE.o stage2/simplCore/FloatIn.o stage2/simplCore/FloatOut.o stage2/simplCore/LiberateCase.o stage2/ simplCore/OccurAnal.o stage2/simplCore/SAT.o stage2/simplCore/ SATMonad.o stage2/simplCore/SetLevels.o stage2/simplCore/ SimplCore.o stage2/simplCore/SimplEnv.o stage2/simplCore/ SimplMonad.o stage2/simplCore/SimplUtils.o stage2/simplCore/ Simplify.o stage2/simplStg/SRT.o stage2/simplStg/SimplStg.o stage2/ simplStg/StgStats.o stage2/specialise/Rules.o stage2/specialise/ SpecConstr.o stage2/specialise/Specialise.o stage2/stgSyn/ CoreToStg.o stage2/stgSyn/StgLint.o stage2/stgSyn/StgSyn.o stage2/ stranal/DmdAnal.o stage2/stranal/SaAbsInt.o stage2/stranal/SaLib.o stage2/stranal/StrictAnal.o stage2/stranal/WorkWrap.o stage2/ stranal/WwLib.o stage2/typecheck/Inst.o stage2/typecheck/ TcArrows.o stage2/typecheck/TcBinds.o stage2/typecheck/ TcClassDcl.o stage2/typecheck/TcDefaults.o stage2/typecheck/ TcDeriv.o stage2/typecheck/TcEnv.o stage2/typecheck/TcExpr.o stage2/typecheck/TcForeign.o stage2/typecheck/TcGenDeriv.o stage2/ typecheck/TcHsSyn.o stage2/typecheck/TcHsType.o stage2/typecheck/ TcInstDcls.o stage2/typecheck/TcMType.o stage2/typecheck/ TcMatches.o stage2/typecheck/TcPat.o stage2/typecheck/TcRnDriver.o stage2/typecheck/TcRnMonad.o stage2/typecheck/TcRnTypes.o stage2/ typecheck/TcRules.o stage2/typecheck/TcSimplify.o stage2/typecheck/ TcSplice.o stage2/typecheck/TcTyClsDecls.o stage2/typecheck/ TcTyDecls.o stage2/typecheck/TcType.o stage2/typecheck/TcUnify.o stage2/types/Class.o stage2/types/FunDeps.o stage2/types/ Generics.o stage2/types/InstEnv.o stage2/types/Kind.o stage2/types/ TyCon.o stage2/types/Type.o stage2/types/TypeRep.o stage2/types/ Unify.o stage2/utils/Bag.o stage2/utils/Binary.o stage2/utils/ BitSet.o stage2/utils/BufWrite.o stage2/utils/Digraph.o stage2/ utils/FastMutInt.o stage2/utils/FastString.o stage2/utils/ FastTypes.o stage2/utils/FiniteMap.o stage2/utils/IOEnv.o stage2/ utils/ListSetOps.o stage2/utils/Maybes.o stage2/utils/OrdList.o stage2/utils/Outputable.o stage2/utils/Panic.o stage2/utils/ Pretty.o stage2/utils/PrimPacked.o stage2/utils/StringBuffer.o stage2/utils/UnicodeUtil.o stage2/utils/UniqFM.o stage2/utils/ UniqSet.o stage2/utils/Util.o stage2/parser/hschooks.o /usr/bin/ld: Undefined symbols: _rl_initialize _rl_reset_terminal _add_history _readline collect2: ld returned 1 exit status <<ghc: 15119860 bytes, 3 GCs, 166964/166964 avg/max bytes residency (1 samples), 15M in use, 0.02 INIT (0.00 elapsed), 0.05 MUT (3.69 elapsed), 0.03 GC (0.04 elapsed) :ghc>> make[2]: *** [stage2/ghc-6.4.3] Error 1 make[1]: *** [stage2] Error 2 make: *** [bootstrap2] Error 2 -- http://wagerlabs.com/
Joel Reymont wrote:
I give up! Mac PPC doesn't like me now that I'm on Intel.
This is PPC, btw, and I _do_ have readline installed. GHC from DarwinPorts compiles just fine.
[snip]
/usr/bin/ld: Undefined symbols: _rl_initialize _rl_reset_terminal _add_history _readline collect2: ld returned 1 exit status
Sorry, I don't have much to offer here. It looks like you're picking up a bogus readline library somehow. I do vaguely recall readline shenanigans being required on MacOS X, you might want to search the archives. Cheers, Simon
Hi, This is probably the libedit issue. On OS X, NetBSD's libedit is installed. Libedit provides a partial implementation of the readline API. On OS X, Apple has symlinked /usr/lib/libreadline.dylib to libedit. This is not a good idea. I submitted at patch to fix this and I think it was committed to HEAD. It detects that libedit is not libreadline and refuses to use it. It's not a problem on darwinports because I explicitly require that DP's readline be used and set up the path to find it during configuration. Best Wishes, Greg On Aug 1, 2006, at 11:25 AM, Simon Marlow wrote:
Joel Reymont wrote:
I give up! Mac PPC doesn't like me now that I'm on Intel. This is PPC, btw, and I _do_ have readline installed. GHC from DarwinPorts compiles just fine. [snip] /usr/bin/ld: Undefined symbols: _rl_initialize _rl_reset_terminal _add_history _readline collect2: ld returned 1 exit status
Sorry, I don't have much to offer here. It looks like you're picking up a bogus readline library somehow. I do vaguely recall readline shenanigans being required on MacOS X, you might want to search the archives.
Cheers, Simon _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Hi Joel, On Jul 28, 2006, at 7:50 AM, Joel Reymont wrote:
On Jul 28, 2006, at 11:42 AM, Simon Marlow wrote:
You shouldn't have to run configure again, but make clean definitely.
I still get the same allocateExec error. I'm still not sure how updating configure.ac in ghc and making clean was going to help :-).
Perhaps trying a bigger stick is in order: make distclean autoreconf ./configure make make install If your configure.ac is changed, you will need to run autoreconf to get the new configure script. The "distclean" target to make should clean out the old configuration.
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (4)
-
Gregory Wright -
Joel Reymont -
Simon Marlow -
Simon Marlow