Mac Port
Gregory Wright
gwright@comcast.net
Sun, 01 Jun 2003 14:00:50 -0400
On Sunday, June 1, 2003, at 05:15 AM, Wolfgang Thaller wrote:
> Seth Kurtzberg wrote:
>
>> Is there, or is anyone working on, ports for Mac OSX and/or Mac OS9?
>
> I'm currently responsible for the Mac OS X version of GHC. I'll upload
> a GHC 6.0 binary for Mac OS X binary as soon as possible, but I'm
> short on time and processor cycles, so it might take a few more days.
> I could definitely use more people who regularily build GHC on MacOS X
> and do some testing, and alert me of any breakage _before_ I make a
> buggy release... I don't have the computing capacity to do nightly
> builds.
>
Dear Wolfgang,
I maintain the Hugs port for the darwinports system (a cousin of fink
and
perhaps the successor to the *bsd ports system). I'd like to add a port
for ghc-6.0. I tried to build it but ran into some problems.
1. configure doesn't pass the CPPFLAGS and LDFLAGS environment variables
to the haskell build. This means you can't have libreadline and libdl in
non-standard locations.
This is a problem for darwinports and fink because of their automatic
dependency
management.
2. Even if I put symlinks to the above libraries in the standard
locations,
I still get a build failure. This is building 6.0 using 5.04.3. (5.04.3
was
built from source successfully using your 5.04.2 binary.) The build
ends with
../../ghc/compiler/stage1/ghc-inplace -o stage2/ghc-6.0 -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/absCSyn -istage2/main -istage2/profiling -istage2/parser
-istage2/cprAnalysis -istage2/compMan -istage2/ndpFlatten
-istage2/nativeGen -istage2/ghci -DGHCI -package haskell-src -package
unix -cpp -fglasgow-exts -Rghc-timing -I. -IcodeGen -InativeGen
-Iparser -recomp -Rghc-timing -H16M '-#include "hschooks.h"'
-no-link-chk stage2/absCSyn/AbsCSyn.o stage2/absCSyn/AbsCUtils.o
stage2/absCSyn/CLabel.o stage2/absCSyn/CStrings.o
stage2/absCSyn/Costs.o stage2/absCSyn/MachOp.o
stage2/absCSyn/PprAbsC.o 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/codeGen/Bitmap.o stage2/codeGen/CgBindery.o
stage2/codeGen/CgCase.o stage2/codeGen/CgClosure.o
stage2/codeGen/CgCon.o stage2/codeGen/CgConTbls.o
stage2/codeGen/CgExpr.o stage2/codeGen/CgHeapery.o
stage2/codeGen/CgLetNoEscape.o stage2/codeGen/CgMonad.o
stage2/codeGen/CgRetConv.o stage2/codeGen/CgStackery.o
stage2/codeGen/CgTailCall.o stage2/codeGen/CgUpdate.o
stage2/codeGen/CgUsages.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/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/coreSyn/Subst.o stage2/cprAnalysis/CprAnalyse.o
stage2/deSugar/Check.o stage2/deSugar/Desugar.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/HsCore.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/main/BinIface.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/Interpreter.o stage2/main/Main.o stage2/main/MkIface.o
stage2/main/Packages.o stage2/main/ParsePkgConf.o
stage2/main/SysTools.o stage2/main/TidyPgm.o
stage2/nativeGen/AbsCStixGen.o stage2/nativeGen/AsmCodeGen.o
stage2/nativeGen/AsmRegAlloc.o stage2/nativeGen/MachCode.o
stage2/nativeGen/MachMisc.o stage2/nativeGen/MachRegs.o
stage2/nativeGen/PprMach.o stage2/nativeGen/RegAllocInfo.o
stage2/nativeGen/Stix.o stage2/nativeGen/StixMacro.o
stage2/nativeGen/StixPrim.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/Lex.o stage2/parser/LexCore.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/PrimRep.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/RnHiFiles.o stage2/rename/RnHsSyn.o
stage2/rename/RnIfaces.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/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/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/TcIfaceSig.o
stage2/typecheck/TcInstDcls.o stage2/typecheck/TcMType.o
stage2/typecheck/TcMatches.o stage2/typecheck/TcMonoType.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/PprType.o stage2/types/TyCon.o stage2/types/Type.o
stage2/types/TypeRep.o stage2/types/Variance.o stage2/utils/Bag.o
stage2/utils/Binary.o stage2/utils/BitSet.o stage2/utils/Digraph.o
stage2/utils/FastMutInt.o stage2/utils/FastString.o
stage2/utils/FastTypes.o stage2/utils/FiniteMap.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
ld: Undefined symbols:
___gmp_set_memory_functions
___gmpn_cmp
___gmpn_gcd_1
___gmpz_add
___gmpz_and
___gmpz_com
___gmpz_divexact
___gmpz_fdiv_qr
___gmpz_gcd
___gmpz_init
___gmpz_ior
___gmpz_mul
___gmpz_sub
___gmpz_tdiv_q
___gmpz_tdiv_qr
___gmpz_tdiv_r
___gmpz_xor
___gmpz_cmp
___gmpz_cmp_si
___gmpz_cmp_ui
___gmpz_get_si
___gmpz_get_ui
_dlerror
_dlopen
_dlsym
make[1]: *** [stage2/ghc-6.0] Error 1
make: *** [stage2] Error 2
bash>
Perhaps an '-undefined suppress' is missing?
I'd appreciate some hints about which files you had to patch to get your
previous build to work. I'm happy to do builds on my machine to test
things
out.
Best Wishes,
Greg Wright