Package: ghc6
Version: 6.4.1-2.1
Severity: normal
Tags: patch

When building 'ghc6' on ppc64/unstable, I get the following error:

gcc -O    -c System/Time_hsc.c -o System/Time_hsc.o
gcc -O    -c Text/Regex/Posix_hsc.c -o Text/Regex/Posix_hsc.o
rm -f libHSbase.a
/usr/bin/ar q    libHSbase.a Control/Concurrent_stub.o Control/Arrow.o 
Control/Concurrent.o Control/Concurrent/Chan.o Control/Concurrent/MVar.o 
Control/Concurrent/QSem.o Control/Concurrent/QSemN.o 
Control/Concurrent/SampleVar.o Control/Exception.o Control/Monad.o 
Control/Monad/Fix.o Control/Monad/ST.o Control/Monad/ST/Lazy.o 
Control/Monad/ST/Strict.o Control/Parallel.o Control/Parallel/Strategies.o 
Data/Array.o Data/Array/Base.o Data/Array/Diff.o Data/Array/IArray.o 
Data/Array/IO.o Data/Array/IO/Internals.o Data/Array/MArray.o Data/Array/ST.o 
Data/Array/Storable.o Data/Array/Unboxed.o Data/Bits.o Data/Bool.o Data/Char.o 
Data/Complex.o Data/Dynamic.o Data/Either.o Data/FiniteMap.o Data/FunctorM.o 
Data/Generics.o Data/Generics/Aliases.o Data/Generics/Basics.o 
Data/Generics/Instances.o Data/Generics/Schemes.o Data/Generics/Text.o 
Data/Generics/Twins.o Data/Graph.o Data/HashTable.o Data/IORef.o Data/Int.o 
Data/IntMap.o Data/IntSet.o Data/Ix.o Data/List.o Data/Map.o Data/Maybe.o 
Data/Monoid.o Data/PackedString.o Data/Queue.o Data/Ratio.o Data/STRef.o 
Data/STRef/Lazy.o Data/STRef/Strict.o Data/Set.o Data/Tree.o Data/Tuple.o 
Data/Typeable.o Data/Unique.o Data/Version.o Data/Word.o Debug/Trace.o 
Foreign.o Foreign/C.o Foreign/C/Error.o Foreign/C/String.o Foreign/C/Types.o 
Foreign/Concurrent.o Foreign/ForeignPtr.o Foreign/Marshal.o 
Foreign/Marshal/Alloc.o Foreign/Marshal/Array.o Foreign/Marshal/Error.o 
Foreign/Marshal/Pool.o Foreign/Marshal/Utils.o Foreign/Ptr.o 
Foreign/StablePtr.o Foreign/Storable.o GHC/Arr.o GHC/Base.o GHC/Conc.o 
GHC/ConsoleHandler.o GHC/Dotnet.o GHC/Enum.o GHC/Err.o GHC/Exception.o 
GHC/Exts.o GHC/Float.o GHC/ForeignPtr.o GHC/Handle.o GHC/IO.o GHC/IOBase.o 
GHC/Int.o GHC/List.o GHC/Num.o GHC/PArr.o GHC/Pack.o GHC/PrimopWrappers.o 
GHC/Ptr.o GHC/Read.o GHC/Real.o GHC/ST.o GHC/STRef.o GHC/Show.o GHC/Stable.o 
GHC/Storable.o GHC/TopHandler.o GHC/Unicode.o GHC/Weak.o GHC/Word.o Numeric.o 
Prelude.o System/CPUTime.o System/Cmd.o System/Console/GetOpt.o 
System/Directory.o System/Directory/Internals.o System/Environment.o 
System/Exit.o System/IO.o System/IO/Error.o System/IO/Unsafe.o System/Info.o 
System/Locale.o System/Mem.o System/Mem/StableName.o System/Mem/Weak.o 
System/Posix/Internals.o System/Posix/Signals.o System/Posix/Types.o 
System/Process.o System/Process/Internals.o System/Random.o System/Time.o 
Text/Html.o Text/Html/BlockTable.o Text/ParserCombinators/ReadP.o 
Text/ParserCombinators/ReadPrec.o Text/PrettyPrint.o 
Text/PrettyPrint/HughesPJ.o Text/Printf.o Text/Read.o Text/Read/Lex.o 
Text/Regex.o Text/Regex/Posix.o Text/Show.o Text/Show/Functions.o 
System/CPUTime_hsc.o System/Time_hsc.o Text/Regex/Posix_hsc.o  
/usr/bin/ar: creating libHSbase.a
: libHSbase.a
/usr/bin/ld -r -x -o HSbase.o Control/Concurrent_stub.o Control/Arrow.o 
Control/Concurrent.o Control/Concurrent/Chan.o Control/Concurrent/MVar.o 
Control/Concurrent/QSem.o Control/Concurrent/QSemN.o 
Control/Concurrent/SampleVar.o Control/Exception.o Control/Monad.o 
Control/Monad/Fix.o Control/Monad/ST.o Control/Monad/ST/Lazy.o 
Control/Monad/ST/Strict.o Control/Parallel.o Control/Parallel/Strategies.o 
Data/Array.o Data/Array/Base.o Data/Array/Diff.o Data/Array/IArray.o 
Data/Array/IO.o Data/Array/IO/Internals.o Data/Array/MArray.o Data/Array/ST.o 
Data/Array/Storable.o Data/Array/Unboxed.o Data/Bits.o Data/Bool.o Data/Char.o 
Data/Complex.o Data/Dynamic.o Data/Either.o Data/FiniteMap.o Data/FunctorM.o 
Data/Generics.o Data/Generics/Aliases.o Data/Generics/Basics.o 
Data/Generics/Instances.o Data/Generics/Schemes.o Data/Generics/Text.o 
Data/Generics/Twins.o Data/Graph.o Data/HashTable.o Data/IORef.o Data/Int.o 
Data/IntMap.o Data/IntSet.o Data/Ix.o Data/List.o Data/Map.o Data/Maybe.o 
Data/Monoid.o Data/PackedString.o Data/Queue.o Data/Ratio.o Data/STRef.o 
Data/STRef/Lazy.o Data/STRef/Strict.o Data/Set.o Data/Tree.o Data/Tuple.o 
Data/Typeable.o Data/Unique.o Data/Version.o Data/Word.o Debug/Trace.o 
Foreign.o Foreign/C.o Foreign/C/Error.o Foreign/C/String.o Foreign/C/Types.o 
Foreign/Concurrent.o Foreign/ForeignPtr.o Foreign/Marshal.o 
Foreign/Marshal/Alloc.o Foreign/Marshal/Array.o Foreign/Marshal/Error.o 
Foreign/Marshal/Pool.o Foreign/Marshal/Utils.o Foreign/Ptr.o 
Foreign/StablePtr.o Foreign/Storable.o GHC/Arr.o GHC/Base.o GHC/Conc.o 
GHC/ConsoleHandler.o GHC/Dotnet.o GHC/Enum.o GHC/Err.o GHC/Exception.o 
GHC/Exts.o GHC/Float.o GHC/ForeignPtr.o GHC/Handle.o GHC/IO.o GHC/IOBase.o 
GHC/Int.o GHC/List.o GHC/Num.o GHC/PArr.o GHC/Pack.o GHC/PrimopWrappers.o 
GHC/Ptr.o GHC/Read.o GHC/Real.o GHC/ST.o GHC/STRef.o GHC/Show.o GHC/Stable.o 
GHC/Storable.o GHC/TopHandler.o GHC/Unicode.o GHC/Weak.o GHC/Word.o Numeric.o 
Prelude.o System/CPUTime.o System/Cmd.o System/Console/GetOpt.o 
System/Directory.o System/Directory/Internals.o System/Environment.o 
System/Exit.o System/IO.o System/IO/Error.o System/IO/Unsafe.o System/Info.o 
System/Locale.o System/Mem.o System/Mem/StableName.o System/Mem/Weak.o 
System/Posix/Internals.o System/Posix/Signals.o System/Posix/Types.o 
System/Process.o System/Process/Internals.o System/Random.o System/Time.o 
Text/Html.o Text/Html/BlockTable.o Text/ParserCombinators/ReadP.o 
Text/ParserCombinators/ReadPrec.o Text/PrettyPrint.o 
Text/PrettyPrint/HughesPJ.o Text/Printf.o Text/Read.o Text/Read/Lex.o 
Text/Regex.o Text/Regex/Posix.o Text/Show.o Text/Show/Functions.o 
System/CPUTime_hsc.o System/Time_hsc.o Text/Regex/Posix_hsc.o  
/usr/bin/ld: TOC section size exceeds 64k
make[3]: *** [HSbase.o] Error 1
make[2]: *** [all] Error 1
make[2]: Leaving directory `/ghc6-6.4.1/libraries'

With the attached patch 'ghc6' can be compiled on ppc64.

The patch sets "GhcWithInterpreter=NO" on ppc64 to avoid the TOC section
size problem. This solution to make ghc work on ppc64 has been taken 
from Gentoo.

Regards
Andreas Jochens

diff -urN ../tmp-orig/ghc6-6.4.1/debian/rules ./debian/rules
--- ../tmp-orig/ghc6-6.4.1/debian/rules 2006-03-30 17:11:26.000000000 +0000
+++ ./debian/rules      2006-03-30 07:05:19.000000000 +0000
@@ -40,6 +40,12 @@
        echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
        echo "SplitObjs=NO" >> mk/build.mk
 endif
+
+# avoid build error (TOC section size exceeds 64k) on ppc64
+ifneq (,$(findstring $(shell dpkg-architecture -qDEB_HOST_ARCH), ppc64))
+       echo "GhcWithInterpreter=NO" >> mk/build.mk
+endif
+
 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        echo "SRC_HC_OPTS   += -H32m -O0" >> mk/build.mk
        echo "GhcHcOpts     += -Rghc-timing -DDEBUG" >> mk/build.mk


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to