[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Package to test: ghc-4.02 / Help: glibc, gcc and ld Guru needed.



Hello all, 

sorry for longish.

Packaging of Ghc 4.02 (ghc, ghc-doc, but no ghc-prof now) is almost
finished.  Because I'm now waiting for my maintainer permission, so
that who is interested in it can find it under
<http://www.cs.tu-berlin.de/~zhurui>.

The slink version (0.1), compiled with gcc 2.7.2.3, libc6, gmp2-dev
and Ghc 2.10 (upstream suggestion), should be useful now, since I've
used it to compile 0.2 and 0.3 version for potato, though in my slink
box .  But it definitely won't work on potato, as it just complain
undefined symbol __setjmp etc.

The potato version (0.3), compiled really in slink box as I've said,
has now problems.  Normally it compiles source Ok on potato, but
executable segfaults :-( !?  Because I've tried to use `gcc' and
`gcc272', it seems it's the problem of `ld', glibc2.1 or *mein*.
Nevertheless it works on slink, I mean executable from 0.3 on slink
seems work on both slink and potato.  But if you want to install 0.3
on slink, dpkg will complain about dependency of libgmp2-dev, however
if you have gmp2-dev installed, `ghc' should work though the package
itself is left unconfigured.

Maybe I need to build ghc on potato from scratch, i.e. create eggs
without hens :-)

Another problem:

All ghc (0.1-0.3) on both slink and potato make `ld' segfault with ghc
option `-optc-g', which means the underlied C compiler `cc' has option
`-g'.

Regards,
        Rui


Example sessions:

******************************************************************************
1. Slink
zhurui@monoid:3:~/Temp/functional/haskell/world$ dpkg -l binutils gcc libc6 ghc
Desired=Unknown/Install/Remove/Purge
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name            Version        Description
+++-===============-==============-============================================
ii  binutils        2.9.1.0.19a-2  The GNU assembler, linker and binary utiliti
ii  gcc             2.7.2.3-7      The GNU C compiler.
ii  libc6           2.0.7.19981211 GNU C Library: shared libraries
ii  ghc             4.02-0.1       Glasgow Haskell Compiler (GHC)

zhurui@monoid:3:~/Temp/functional/haskell/world$ ghc -v -optc-g world.hs 
The Glorious Glasgow Haskell Compilation System, version 4.02, patchlevel 0

Effective command line: -v -optc-g

Ineffective C pre-processor:
        echo '{-# LINE 1 "world.hs" -}' > /tmp/ghc663.cpp && cat world.hs >> /tmp/ghc663.cpp

real    0m0.081s
user    0m0.000s
sys     0m0.000s
ghc:compile:Interface file world.hi doesn't exist

Haskell compiler:
        /usr/lib/ghc/hsc ,-W ,/tmp/ghc663.cpp  -fignore-interface-pragmas -fomit-interface-pragmas -fsimplify [  -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -fdo-case-elim -freuse-con -fpedantic-bottoms -fmax-simplifier-iterations4  ]   -fwarn-overlapping-patterns -fwarn-missing-methods -fwarn-duplicate-exports -fhi-version=402 -himap=.%.hi:/usr/lib/ghc/imports/std%.hi   -v -hifile=/tmp/ghc663.hi -C=/tmp/ghc663.hc -F=/tmp/ghc663_stb.c -FH=/tmp/ghc663_stb.h +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 4.02, for Haskell 98

real    0m10.805s
user    0m4.790s
sys     0m0.270s

Pin on Haskell consistency info:
        echo 'static char ghc_hsc_ID[] = "@(#)hsc world.hs      40.0,,";' >> /tmp/ghc663.hc

real    0m0.001s
user    0m0.000s
sys     0m0.000s
*** New hi file follows...
__interface Main 402 where
import IO 1 :: putStr 1;
import PrelBase 1 :: Monad 1 String 1 addr2Integer 1 foldr 1 int2Integer 1 integer_0 1 integer_1 1 integer_2 1 integer_m1 1 zddmfail 1 zddmzgzg 1 zdfMonadZMZN 1;
import PrelIOBase 1 :: IO 1 zdfMonadIO 1;
import PrelPack 1 :: packCStringzh 1 unpackAppendCStringzh 1 unpackCStringzh 1 unpackFoldrCStringzh 1 unpackNByteszh 1;
__instimport IO ; __instimport PrelAddr ; __instimport PrelArr ; __instimport PrelBounded ; __instimport PrelCCall ; __instimport PrelConc ; __instimport PrelForeign ; __instimport PrelIOBase ; __instimport PrelNum ; __instimport PrelNumExtra ; __instimport PrelStable ; __instimport PrelTup ;

__export Main main;
main :: PrelIOBase.IO PrelBase.Z0T ;


ghc: module version unchanged at 1

Replace .hi file, if changed:
        cmp -s Main.hi /tmp/ghc663.hi-new || ( rm -f Main.hi && cp /tmp/ghc663.hi-new Main.hi )

real    0m0.034s
user    0m0.000s
sys     0m0.000s

C compiler:
        gcc -v  -S -Wimplicit -g -g -O -DSTOLEN_X86_REGS=4 -fomit-frame-pointer -fno-defer-pop  -I. -I/usr/lib/ghc/includes -I/usr/lib/ghc/includes ghc663.c > /tmp/ghc663.ccout 2>&1 && ( if [ ghc663.s != /tmp/ghc663_o.s ] ; then mv ghc663.s /tmp/ghc663_o.s ; else exit 0 ; fi )

real    0m2.614s
user    0m0.400s
sys     0m0.100s
Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.3/specs
gcc version 2.7.2.3
 /usr/lib/gcc-lib/i486-linux/2.7.2.3/cpp -lang-c -v -I. -I/usr/lib/ghc/includes -I/usr/lib/ghc/includes -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386) -D__OPTIMIZE__ -g -g -Wimplicit -DSTOLEN_X86_REGS=4 ghc663.c /tmp/cca00674
GNU CPP version 2.7.2.3 (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/lib/ghc/includes
 /usr/lib/ghc/includes
 /usr/local/include
 /usr/i486-linux/include
 /usr/lib/gcc-lib/i486-linux/2.7.2.3/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i486-linux/2.7.2.3/cc1 /tmp/cca00674 -quiet -dumpbase ghc663.c -g -g -O -Wimplicit -version -fomit-frame-pointer -fno-defer-pop -o ghc663.s
GNU C version 2.7.2.3 (i386 Linux/ELF) compiled by GNU C version 2.7.2.3.

Unix assembler:
        gcc -o world.o -c  -I. -I/usr/lib/ghc/includes -I/usr/lib/ghc/includes /tmp/ghc663.s
0.02user 0.03system 0:00.38elapsed 13%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (323major+105minor)pagefaults 0swaps

Linker:
        gcc -v -u PrelMain_mainIO_closure -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelBase_Fzh_static_info -u PrelBase_Dzh_static_info -u PrelAddr_Azh_static_info -u PrelAddr_Wzh_static_info -u PrelAddr_I64zh_static_info -u PrelAddr_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelBase_Fzh_con_info -u PrelBase_Dzh_con_info -u PrelAddr_Azh_con_info -u PrelAddr_Wzh_con_info -u PrelAddr_I64zh_con_info -u PrelAddr_W64zh_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_static_closure -u PrelBase_True_static_closure -u PrelPack_unpackCString_closure  world.o  -L/usr/lib/ghc  -lHS -lHS_cbits -lHSrts -lgmp2 -lm
Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.3/specs
gcc version 2.7.2.3
 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -u PrelMain_mainIO_closure -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelBase_Fzh_static_info -u PrelBase_Dzh_static_info -u PrelAddr_Azh_static_info -u PrelAddr_Wzh_static_info -u PrelAddr_I64zh_static_info -u PrelAddr_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelBase_Fzh_con_info -u PrelBase_Dzh_con_info -u PrelAddr_Azh_con_info -u PrelAddr_Wzh_con_info -u PrelAddr_I64zh_con_info -u PrelAddr_W64zh_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_static_closure -u PrelBase_True_static_closure -u PrelPack_unpackCString_closure /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i486-linux/2.7.2.3/crtbegin.o -L/usr/lib/ghc -L/usr/lib/gcc-lib/i486-linux/2.7.2.3 world.o -lHS -lHS_cbits -lHSrts -lgmp2 -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i486-linux/2.7.2.3/crtend.o /usr/lib/crtn.o
gcc: Internal compiler error: program ld got fatal signal 11
Command exited with non-zero status 1
0.49user 0.31system 0:01.85elapsed 43%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (817major+631minor)pagefaults 0swaps
deleting... a.out

rm -f /tmp/ghc663*

******************************************************************************
2. Potato
zhurui@unstable:6:~/Temp/functional/haskell/world$ dpkg -l binutils gcc libc6 ghc
Desired=Unknown/Install/Remove/Purge
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name            Version        Description
+++-===============-==============-============================================
ii  binutils        2.9.1.0.25-2   The GNU assembler, linker and binary utiliti
ii  gcc             2.91.66-2      The GNU (EGCS) C compiler.
ii  libc6           2.1.1-10       GNU C Library: Shared libraries and timezone
ii  ghc             4.02-0.3       Glasgow Haskell Compiler (GHC)

zhurui@unstable:6:~/Temp/functional/haskell/world$ ghc -v -optc-g world.hs 
The Glorious Glasgow Haskell Compilation System, version 4.02, patchlevel 0

Effective command line: -v -optc-g

Ineffective C pre-processor:
        echo '{-# LINE 1 "world.hs" -}' > /tmp/ghc693.cpp && cat world.hs >> /tmp/ghc693.cpp

real    0m0.034s
user    0m0.000s
sys     0m0.000s
ghc:compile:Interface file world.hi doesn't exist

Haskell compiler:
        /usr/lib/ghc/hsc ,-W ,/tmp/ghc693.cpp  -fignore-interface-pragmas -fomit-interface-pragmas -fsimplify [  -ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -fdo-case-elim -freuse-con -fpedantic-bottoms -fmax-simplifier-iterations4  ]   -fwarn-overlapping-patterns -fwarn-missing-methods -fwarn-duplicate-exports -fhi-version=402 -himap=.%.hi:/usr/lib/ghc/imports/std%.hi   -v -hifile=/tmp/ghc693.hi -C=/tmp/ghc693.hc -F=/tmp/ghc693_stb.c -FH=/tmp/ghc693_stb.h +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 4.02, for Haskell 98

real    0m13.841s
user    0m6.120s
sys     0m0.330s

Pin on Haskell consistency info:
        echo 'static char ghc_hsc_ID[] = "@(#)hsc world.hs      40.0,,";' >> /tmp/ghc693.hc

real    0m0.001s
user    0m0.000s
sys     0m0.000s
*** New hi file follows...
__interface Main 402 where
import IO 1 :: putStr 1;
import PrelBase 1 :: Monad 1 String 1 addr2Integer 1 foldr 1 int2Integer 1 integer_0 1 integer_1 1 integer_2 1 integer_m1 1 zddmfail 1 zddmzgzg 1 zdfMonadZMZN 1;
import PrelIOBase 1 :: IO 1 zdfMonadIO 1;
import PrelPack 1 :: packCStringzh 1 unpackAppendCStringzh 1 unpackCStringzh 1 unpackFoldrCStringzh 1 unpackNByteszh 1;
__instimport IO ; __instimport PrelAddr ; __instimport PrelArr ; __instimport PrelBounded ; __instimport PrelCCall ; __instimport PrelConc ; __instimport PrelForeign ; __instimport PrelIOBase ; __instimport PrelNum ; __instimport PrelNumExtra ; __instimport PrelStable ; __instimport PrelTup ;

__export Main main;
main :: PrelIOBase.IO PrelBase.Z0T ;


ghc: module version unchanged at 1

Replace .hi file, if changed:
        cmp -s Main.hi /tmp/ghc693.hi-new || ( rm -f Main.hi && cp /tmp/ghc693.hi-new Main.hi )

real    0m0.250s
user    0m0.010s
sys     0m0.010s

C compiler:
        cc -v  -S -Wimplicit -g -g -O -DSTOLEN_X86_REGS=4 -fomit-frame-pointer -fno-defer-pop  -I. -I/usr/lib/ghc/includes -I/usr/lib/ghc/includes ghc693.c > /tmp/ghc693.ccout 2>&1 && ( if [ ghc693.s != /tmp/ghc693_o.s ] ; then mv ghc693.s /tmp/ghc693_o.s ; else exit 0 ; fi )

real    0m4.030s
user    0m0.540s
sys     0m0.160s
Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release)
 /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/cpp -lang-c -v -I. -I/usr/lib/ghc/includes -I/usr/lib/ghc/includes -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__OPTIMIZE__ -g -g -Wimplicit -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di486 -D__i486 -D__i486__ -DSTOLEN_X86_REGS=4 ghc693.c /tmp/ccn7krmC.i
GNU CPP version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/lib/ghc/includes
 /usr/local/include
 /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/cc1 /tmp/ccn7krmC.i -quiet -dumpbase ghc693.c -g -g -O -Wimplicit -version -fomit-frame-pointer -fno-defer-pop -o ghc693.s
GNU C version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release) (i486-linux) compiled by GNU C version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release).

Unix assembler:
        cc -o world.o -c  -I. -I/usr/lib/ghc/includes -I/usr/lib/ghc/includes /tmp/ghc693.s
0.03user 0.03system 0:00.67elapsed 8%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (362major+119minor)pagefaults 0swaps

Linker:
        cc -v -u PrelMain_mainIO_closure -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelBase_Fzh_static_info -u PrelBase_Dzh_static_info -u PrelAddr_Azh_static_info -u PrelAddr_Wzh_static_info -u PrelAddr_I64zh_static_info -u PrelAddr_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelBase_Fzh_con_info -u PrelBase_Dzh_con_info -u PrelAddr_Azh_con_info -u PrelAddr_Wzh_con_info -u PrelAddr_I64zh_con_info -u PrelAddr_W64zh_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_static_closure -u PrelBase_True_static_closure -u PrelPack_unpackCString_closure  world.o  -L/usr/lib/ghc  -lHS -lHS_cbits -lHSrts -lgmp2 -lm
Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release)
 /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -u PrelMain_mainIO_closure -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelBase_Fzh_static_info -u PrelBase_Dzh_static_info -u PrelAddr_Azh_static_info -u PrelAddr_Wzh_static_info -u PrelAddr_I64zh_static_info -u PrelAddr_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelBase_Fzh_con_info -u PrelBase_Dzh_con_info -u PrelAddr_Azh_con_info -u PrelAddr_Wzh_con_info -u PrelAddr_I64zh_con_info -u PrelAddr_W64zh_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_static_closure -u PrelBase_True_static_closure -u PrelPack_unpackCString_closure /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/crtbegin.o -L/usr/lib/ghc -L/usr/lib/gcc-lib/i486-linux/egcs-2.91.66 world.o -lHS -lHS_cbits -lHSrts -lgmp2 -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/crtend.o /usr/lib/crtn.o
collect2: ld terminated with signal 11 [Segmentation fault]
Command exited with non-zero status 1
0.62user 0.29system 0:18.44elapsed 4%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (964major+762minor)pagefaults 0swaps
deleting... a.out

rm -f /tmp/ghc693*


Reply to: