Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#13039 closed defect (fixed)

ghc 6.6.1 does not build on Mac OS X 10.5 Leopard

Reported by: rzilibowitz@… Owned by: gwright@…
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: GHC Leopard Cc: rzilibowitz@…, gwright@…, bonelake@…, waqar@…
Port:

Description

Below is the relevant output after running: sudo port install ghc on an intel iMac running Leopard.

---> Configuring ghc Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1" && ./configure --prefix=/opt/local --prefix=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destrootopt/local --mandir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destrootopt/local/share/man/ --with-readline-includes=/opt/local/include --with-readline-libraries=/opt/local/lib --disable-openal --disable-alut " returned error 1 Command output: checking build system type... i686-apple-darwin9.0.0 checking host system type... i686-apple-darwin9.0.0 checking target system type... i686-apple-darwin9.0.0 Canonicalised to: i386-apple-darwin checking for path to top of build tree... /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1 checking for ghc... no checking for ghc-pkg matching ... no checking for ghc-pkg... no checking whether ghc has readline package... no checking for nhc... no checking for nhc98... no checking for hbc... no configure: error: GHC is required unless bootstrapping from .hc files.

Error: Status 1 encountered during processing.

Attachments (1)

01-Portfile_updated.patch (3.4 KB) - added by saispo@… 16 years ago.
Fix build into Leopard

Download all attachments as: .zip

Change History (17)

Changed 16 years ago by saispo@…

Attachment: 01-Portfile_updated.patch added

Fix build into Leopard

comment:1 Changed 16 years ago by emertens@…

The above patch only address darwin 9 on i386

comment:2 Changed 16 years ago by rzilibowitz@…

I tried applying the patch manually, since I couldn't figure out how to apply it automatically (sorry, but how does that work?). Anyhow I got this output from sudo port install ghc:

--->  Fetching ghc
--->  Verifying checksum(s) for ghc
--->  Extracting ghc
--->  Applying patches to ghc
--->  Configuring ghc
--->  Building ghc with target all
Error: Target org.macports.build returned: shell command "env DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib make all" returned error 2
Command output: 	sed -e 's/""//g' -e 's/:[ 	]*,/: /g' >package.conf.installed
../utils/ghc-pkg/ghc-pkg-inplace update - --force-files <package.conf.inplace
Reading package info from stdin ... done.
cannot find libHSghc.a on library path (ignoring)
Saving old package config file... done.
Writing new package config file... done.
../utils/ghc-pkg/ghc-pkg-inplace update - -f ../driver/package.conf --force-files <package.conf.installed
Reading package info from stdin ... done.
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local/lib/ghc-6.6.1/hslibs-imports/ghc doesn't exist or isn't a directory (ignoring)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local/lib/ghc-6.6.1 doesn't exist or isn't a directory (ignoring)
cannot find libHSghc.a on library path (ignoring)
Saving old package config file... done.
Writing new package config file... done.
Creating stage1/ghc_boot_platform.h...
Done.
touch .depend-BASE
../compiler/stage1/ghc-inplace -M -optdep-f -optdep.depend-BASE  -osuf o -I../includes   -H16m -O -I/opt/local/include -I/usr/include -L/opt/local/lib -L/usr/lib -iutils -ibasicTypes -itypes -ihsSyn -iprelude -irename -itypecheck -ideSugar -icoreSyn -ispecialise -isimplCore -istranal -istgSyn -isimplStg -icodeGen -imain -iprofiling -iparser -icprAnalysis -indpFlatten -iiface -icmm -inativeGen -ighci -Istage2 -DGHCI -DBREAKPOINT -package template-haskell -threaded -package readline -DUSE_READLINE -cpp -fglasgow-exts -fno-generics -Rghc-timing -I. -Iparser -package unix -package Cabal -package regex-compat -ignore-package lang -recomp -Rghc-timing -H16M '-#include "cutils.h"' -package-name ghc-6.6.1 -fgenerics basicTypes/BasicTypes.lhs basicTypes/DataCon.lhs basicTypes/Demand.lhs basicTypes/Id.lhs basicTypes/IdInfo.lhs basicTypes/Literal.lhs basicTypes/MkId.lhs basicTypes/Module.lhs basicTypes/Name.lhs basicTypes/NameEnv.lhs basicTypes/NameSet.lhs basicTypes/NewDemand.lhs basicTypes/OccName.lhs basicTypes/RdrName.lhs basicTypes/SrcLoc.lhs basicTypes/UniqSupply.lhs basicTypes/Unique.lhs basicTypes/Var.lhs basicTypes/VarEnv.lhs basicTypes/VarSet.lhs cmm/CLabel.hs cmm/Cmm.hs cmm/CmmLex.hs cmm/CmmLint.hs cmm/CmmOpt.hs cmm/CmmParse.hs cmm/CmmUtils.hs cmm/MachOp.hs cmm/PprC.hs cmm/PprCmm.hs codeGen/Bitmap.hs codeGen/CgBindery.lhs codeGen/CgCallConv.hs codeGen/CgCase.lhs codeGen/CgClosure.lhs codeGen/CgCon.lhs codeGen/CgExpr.lhs codeGen/CgForeignCall.hs codeGen/CgHeapery.lhs codeGen/CgInfoTbls.hs codeGen/CgLetNoEscape.lhs codeGen/CgMonad.lhs codeGen/CgParallel.hs codeGen/CgPrimOp.hs codeGen/CgProf.hs codeGen/CgStackery.lhs codeGen/CgTailCall.lhs codeGen/CgTicky.hs codeGen/CgUtils.hs codeGen/ClosureInfo.lhs codeGen/CodeGen.lhs codeGen/SMRep.lhs coreSyn/CoreFVs.lhs coreSyn/CoreLint.lhs coreSyn/CorePrep.lhs coreSyn/CoreSubst.lhs coreSyn/CoreSyn.lhs coreSyn/CoreTidy.lhs coreSyn/CoreUnfold.lhs coreSyn/CoreUtils.lhs coreSyn/ExternalCore.lhs coreSyn/MkExternalCore.lhs coreSyn/PprCore.lhs coreSyn/PprExternalCore.lhs cprAnalysis/CprAnalyse.lhs deSugar/Check.lhs deSugar/Desugar.lhs deSugar/DsArrows.lhs deSugar/DsBinds.lhs deSugar/DsCCall.lhs deSugar/DsExpr.lhs deSugar/DsForeign.lhs deSugar/DsGRHSs.lhs deSugar/DsListComp.lhs deSugar/DsMeta.hs deSugar/DsMonad.lhs deSugar/DsUtils.lhs deSugar/Match.lhs deSugar/MatchCon.lhs deSugar/MatchLit.lhs ghci/ByteCodeAsm.lhs ghci/ByteCodeFFI.lhs ghci/ByteCodeGen.lhs ghci/ByteCodeInstr.lhs ghci/ByteCodeItbls.lhs ghci/ByteCodeLink.lhs ghci/InteractiveUI.hs ghci/Linker.lhs ghci/ObjLink.lhs hsSyn/Convert.lhs hsSyn/HsBinds.lhs hsSyn/HsDecls.lhs hsSyn/HsExpr.lhs hsSyn/HsImpExp.lhs hsSyn/HsLit.lhs hsSyn/HsPat.lhs hsSyn/HsSyn.lhs hsSyn/HsTypes.lhs hsSyn/HsUtils.lhs iface/BinIface.hs iface/BuildTyCl.lhs iface/IfaceEnv.lhs iface/IfaceSyn.lhs iface/IfaceType.lhs iface/LoadIface.lhs iface/MkIface.lhs iface/TcIface.lhs main/CmdLineParser.hs main/CodeOutput.lhs main/Config.hs main/Constants.lhs main/DriverMkDepend.hs main/DriverPhases.hs main/DriverPipeline.hs main/DynFlags.hs main/ErrUtils.lhs main/Finder.lhs main/GHC.hs main/HeaderInfo.hs main/HscMain.lhs main/HscStats.lhs main/HscTypes.lhs main/Main.hs main/PackageConfig.hs main/Packages.lhs main/ParsePkgConf.hs main/PprTyThing.hs main/StaticFlags.hs main/SysTools.lhs main/TidyPgm.lhs nativeGen/AsmCodeGen.lhs nativeGen/MachCodeGen.hs nativeGen/MachInstrs.hs nativeGen/MachRegs.lhs nativeGen/NCGMonad.hs nativeGen/PositionIndependentCode.hs nativeGen/PprMach.hs nativeGen/RegAllocInfo.hs nativeGen/RegisterAlloc.hs ndpFlatten/FlattenInfo.hs ndpFlatten/FlattenMonad.hs ndpFlatten/Flattening.hs ndpFlatten/NDPCoreUtils.hs ndpFlatten/PArrAnal.hs parser/Ctype.lhs parser/LexCore.hs parser/Lexer.hs parser/Parser.hs parser/ParserCore.hs parser/ParserCoreUtils.hs parser/RdrHsSyn.lhs prelude/ForeignCall.lhs prelude/PrelInfo.lhs prelude/PrelNames.lhs prelude/PrelRules.lhs prelude/PrimOp.lhs prelude/TysPrim.lhs prelude/TysWiredIn.lhs profiling/CostCentre.lhs profiling/SCCfinal.lhs rename/RnBinds.lhs rename/RnEnv.lhs rename/RnExpr.lhs rename/RnHsSyn.lhs rename/RnNames.lhs rename/RnSource.lhs rename/RnTypes.lhs simplCore/CSE.lhs simplCore/FloatIn.lhs simplCore/FloatOut.lhs simplCore/LiberateCase.lhs simplCore/OccurAnal.lhs simplCore/SAT.lhs simplCore/SATMonad.lhs simplCore/SetLevels.lhs simplCore/SimplCore.lhs simplCore/SimplEnv.lhs simplCore/SimplMonad.lhs simplCore/SimplUtils.lhs simplCore/Simplify.lhs simplStg/SRT.lhs simplStg/SimplStg.lhs simplStg/StgStats.lhs specialise/Rules.lhs specialise/SpecConstr.lhs specialise/Specialise.lhs stgSyn/CoreToStg.lhs stgSyn/StgLint.lhs stgSyn/StgSyn.lhs stranal/DmdAnal.lhs stranal/SaAbsInt.lhs stranal/SaLib.lhs stranal/StrictAnal.lhs stranal/WorkWrap.lhs stranal/WwLib.lhs typecheck/Inst.lhs typecheck/TcArrows.lhs typecheck/TcBinds.lhs typecheck/TcClassDcl.lhs typecheck/TcDefaults.lhs typecheck/TcDeriv.lhs typecheck/TcEnv.lhs typecheck/TcExpr.lhs typecheck/TcForeign.lhs typecheck/TcGenDeriv.lhs typecheck/TcHsSyn.lhs typecheck/TcHsType.lhs typecheck/TcInstDcls.lhs typecheck/TcMType.lhs typecheck/TcMatches.lhs typecheck/TcPat.lhs typecheck/TcRnDriver.lhs typecheck/TcRnMonad.lhs typecheck/TcRnTypes.lhs typecheck/TcRules.lhs typecheck/TcSimplify.lhs typecheck/TcSplice.lhs typecheck/TcTyClsDecls.lhs typecheck/TcTyDecls.lhs typecheck/TcType.lhs typecheck/TcUnify.lhs types/Class.lhs types/FunDeps.lhs types/Generics.lhs types/InstEnv.lhs types/Kind.lhs types/TyCon.lhs types/Type.lhs types/TypeRep.lhs types/Unify.lhs utils/Bag.lhs utils/Binary.hs utils/BitSet.lhs utils/BufWrite.hs utils/Digraph.lhs utils/Encoding.hs utils/FastMutInt.lhs utils/FastString.lhs utils/FastTypes.lhs utils/FiniteMap.lhs utils/IOEnv.hs utils/ListSetOps.lhs utils/Maybes.lhs utils/OrdList.lhs utils/Outputable.lhs utils/Panic.lhs utils/Pretty.lhs utils/StringBuffer.lhs utils/UniqFM.lhs utils/UniqSet.lhs utils/Util.lhs
<<ghc: 364716068 bytes, 51 GCs, 4470122/9975092 avg/max bytes residency (4 samples), 25M in use, 0.00 INIT (0.00 elapsed), 0.65 MUT (4.87 elapsed), 0.11 GC (0.13 elapsed) :ghc>>
../utils/mkdependC/mkdependC -f .depend-BASE -D__GLASGOW_HASKELL__=606 -I../includes -Iutils -IbasicTypes -Itypes -IhsSyn -Iprelude -Irename -Itypecheck -IdeSugar -IcoreSyn -Ispecialise -IsimplCore -Istranal -IstgSyn -IsimplStg -IcodeGen -Imain -Iprofiling -Iparser -IcprAnalysis -IndpFlatten -Iiface -Icmm -InativeGen -Ighci -I../includes    -- -O -I/opt/local/include -Iparser -I. -O    -- parser/cutils.c parser/hschooks.c 
/opt/local/bin/perl -pe 'binmode(stdin); binmode(stdout); s@^(\S*\.o)@stage2/$1@g; s@(\S*\.hi)@stage2/$1@g; s@^.*/compat.*$@@g;' <.depend-BASE >.depend-2
make -C compiler stage=2
../compiler/stage1/ghc-inplace -H16m -O -I/opt/local/include -I/usr/include -L/opt/local/lib -L/usr/lib  -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/ndpFlatten  -istage2/iface  -istage2/cmm  -istage2/nativeGen  -istage2/ghci -Istage2 -DGHCI -DBREAKPOINT -package template-haskell -threaded -package readline -DUSE_READLINE -cpp -fglasgow-exts -fno-generics -Rghc-timing -I. -Iparser -package unix -package Cabal -package regex-compat -ignore-package lang -recomp -Rghc-timing  -H16M '-#include "cutils.h"' -package-name  ghc-6.6.1   -fgenerics    -c basicTypes/OccName.lhs-boot -o stage2/basicTypes/OccName.o-boot  -ohi stage2/basicTypes/OccName.hi-boot

basicTypes/OccName.lhs-boot:1:0:
    Failed to load interface for `Prelude':
      Use -v to see a list of the files searched for.
<<ghc: 22897732 bytes, 4 GCs, 140148/140148 avg/max bytes residency (1 samples), 16M in use, 0.00 INIT (0.00 elapsed), 0.03 MUT (0.06 elapsed), 0.01 GC (0.02 elapsed) :ghc>>
make[2]: *** [stage2/basicTypes/OccName.o-boot] Error 1
make[1]: *** [stage2] Error 2
make: *** [bootstrap2] Error 2

Error: Status 1 encountered during processing.

comment:3 Changed 16 years ago by emertens@…

GHC 6.8.1 (the most recent stable version) was just released and should probably be a higher priority than getting 6.6.1 working in ports.

comment:4 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: rzilibowitz@… gwright@… bonelake@… added
Summary: ghc 6.6.1 does not build on Leopardghc 6.6.1 does not build on Mac OS X 10.5 Leopard

comment:5 Changed 16 years ago by dynasticon@…

Just a note to say that I would love to see ghc 6.8.1 for Mac OS X 10.5 (Leopard). It's supposed to be somewhat amazingly faster (generates faster code). I've been checking for it here on MacPorts pretty much every day. Just another vote for the mix. (FWIW, I also see the build problem with 6.6.1.)

comment:6 Changed 16 years ago by bfulgham@…

Does the GHC team indicate they can build under Leopard? Last I checked, there were various e-mail indicating the problem was not resolved.

It might be possible to build using the same trick as for O'Caml, which basically tells the system to build as OS 10.4:

platform darwin 9 {

# In DP 1.6... # macosx_deployment_target 10.4

# For now, specify manually to build with Tiger-style: configure.env-append MACOSX_DEPLOYMENT_TARGET=10.4 build.env-append MACOSX_DEPLOYMENT_TARGET=10.4 destroot.env-append MACOSX_DEPLOYMENT_TARGET=10.4

}

Could someone try this and report back if it allows GHC to build?

comment:7 in reply to:  6 Changed 16 years ago by dynasticon@…

bfulgham asked:

Does the GHC team indicate they can build under Leopard? Last I checked, there were various e-mails indicating the problem was not resolved.

I just read through the ghc-users mailing list. It appears there are some thorny problems in the PPC build of 6.8.1 for Mac OS 10.5. The Intel build seems to work, or can be made to work fairly easily. (There are at least two theories on how to make it work, though.)

I have to admit, it seems a little early to do the port of 6.8.1 unless the port master wants to help debug the PPC build.

The MACOSX_DEPLOYMENT_TARGET idea is a good one. As you say, it seems to have worked for the OCaml port.

Thanks for the quick response!

comment:8 Changed 16 years ago by jeremy@…

I have tried both of the mechanisms posted here. My results from the patch are the same as rzilibowitz.

The 2nd option, the MACOSX_DEPLOYMENT_TARGET I attempted as pasting this into the Portfile:

platform darwin 9 { 

    # In DP 1.6... 
    # macosx_deployment_target 10.4

    # For now, specify manually to build with Tiger-style: 
    configure.env-append MACOSX_DEPLOYMENT_TARGET=10.4 
    build.env-append MACOSX_DEPLOYMENT_TARGET=10.4 
    destroot.env-append MACOSX_DEPLOYMENT_TARGET=10.4

} 

This resulted in :

[ ... snipped ... ]
--->  Configuring ghc
DEBUG: Executing org.macports.configure (ghc)
DEBUG: No compiler collection selected explicitly
DEBUG: Environment: CXXFLAGS='-O2' CPPFLAGS='-I/opt/local/include' CFLAGS='-O2 -I/opt/local/include' DYLD_FALLBACK_LIBRARY_PATH='/opt/local/lib' LDFLAGS='-L/opt/local/lib -L/usr/lib' MACOSX_DEPLOYMENT_TARGET='10.4'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1" && ./configure --prefix=/opt/local --prefix=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local --mandir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local/share/man/ --with-readline-includes=/opt/local/include --with-readline-libraries=/opt/local/lib --disable-openal --disable-alut'
checking build system type... i686-apple-darwin9.1.0
checking host system type... i686-apple-darwin9.1.0
checking target system type... i686-apple-darwin9.1.0
Canonicalised to: i386-apple-darwin
checking for path to top of build tree... /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1
checking for ghc... no
checking for ghc-pkg matching ... no
checking for ghc-pkg... no
checking whether ghc has readline package... no
checking for nhc... no
checking for nhc98... no
checking for hbc... no
configure: error: GHC is required unless bootstrapping from .hc files.
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1" && ./configure --prefix=/opt/local --prefix=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local --mandir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local/share/man/ --with-readline-includes=/opt/local/include --with-readline-libraries=/opt/local/lib --disable-openal --disable-alut " returned error 1
Command output: checking build system type... i686-apple-darwin9.1.0
checking host system type... i686-apple-darwin9.1.0
checking target system type... i686-apple-darwin9.1.0
Canonicalised to: i386-apple-darwin
checking for path to top of build tree... /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1
checking for ghc... no
checking for ghc-pkg matching ... no
checking for ghc-pkg... no
checking whether ghc has readline package... no
checking for nhc... no
checking for nhc98... no
checking for hbc... no
configure: error: GHC is required unless bootstrapping from .hc files.

Warning: the following items did not execute (for ghc): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

It doesn't look like that works either. I really don't know much about ports, but I use darcs a considerable amount and need to get ghc built so that I can build darcs.

In the meantime, can I fake out ports with a installation from a 10.4 machine ? And how would I go about doing that ?

comment:9 Changed 16 years ago by waqar@…

Cc: waqar@… added

comment:10 Changed 16 years ago by a.paul.smith@…

It's not clear to me from the above thread of comments what the resolution is here. Will 6.6.1 be fixed or are we stuck without a ports version of GHC until 6.8.1 is available?

Paul

comment:11 Changed 16 years ago by gwright@…

Status: newassigned

Status update on the ghc port:

As of today, 20 Dec 07, I have successfully built 6.8.2 on Leopard (10.5.1) intel and Tiger (10.4.11) intel and ppc. New bootstrap compilers have been built and upload to haskell.org. Leopard ppc will not be supported initially, since there is not yet a successful full build of ghc on that platform (linker bugs).

The remaining problem seems to be a compiler bug which causes file locking errors. This was all rewritten for the 6.8 branch so it is not surprising. The bug causes one out of every four or five ghc builds to fail, so it needs to be fixed before the 6.8.2 portfile is ready for general release.

comment:12 in reply to:  11 Changed 16 years ago by macports@…

Replying to gwright@macports.org:

Leopard ppc will not be supported initially, since there is not yet a successful full build of ghc on that platform (linker bugs).

So are you working on getting 6.6.1 working until there is a working 6.8.2 for Leopard/PPC? Or are you planning on waiting until there is a fix for the 6.8.2 problems?

comment:13 Changed 16 years ago by macports@…

I now have a working ghc-6.6.1 build on my Leopard box (without the GMP.framework or GNUreadline.framework requirements of the binary builds provided at the GHC site). How do you make your bootstrap builds? If it easy, I would be happy to try to contribute a Leopard/PPC 6.6.1 bootstrap build.

comment:14 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

What is the status of this ticket? The ghc portfile is already at version 6.8.2.

comment:15 Changed 16 years ago by gwright@…

Resolution: fixed
Status: assignedclosed

Closed, long since fixed by the update to 6.8.2.

comment:16 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.