I can't link even the tinest of programs (eg hello world)
compiling with ghc2.02 on sparc-sunos4.  Am I doing something
wrong?  A transcript follows.

I had a snoop around the libraries, and found that most of the
undefined symbols are referenced from libHSrts_p.a, FWIW.

J



shoval:~/Haskell/Src/Junk$ ghc202 -v -prof Main.hs
The Glorious Glasgow Haskell Compilation System, version 2.02, patchlevel 0

Ineffective C pre-processor:
        echo '#line 1 "Main.hs"' > /tmp/ghc13919.cpp && cat Main.hs >> 
/tmp/ghc13919.cpp
        0.1 real         0.0 user         0.0 sys  

Haskell compiler:
        /user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/hsc ,-S 
,/tmp/ghc13919.cpp  -fscc-profiling -hisuf-prelude=.p_hi -hisuf=.hi 
-fignore-interface-pragmas -fomit-interface-pragmas -fsimplify \(  
-ffloat-lets-exposing-whnf -ffloat-primops-ok -fcase-of-case -freuse-con 
-fpedantic-bottoms -fsimpl-uf-use-threshold0 -fessential-unfoldings-only 
-fmax-simplifier-iterations4 \)  -fmassage-stg-for-profiling 
-himap=.:/user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/imports   
-v -hifile=/tmp/ghc13919.hi -C=/tmp/ghc13919.hc +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 2.02, for Haskell 1.3

        7.1 real         5.3 user         0.7 sys  

Pin on Haskell consistency info:
        echo 'static char ghc_hsc_ID[] = "@(#)hsc Main.hs       31.0,_p,";' >> 
/tmp/ghc13919.hc
        0.1 real         0.0 user         0.0 sys  
*** New hi file follows...
{-# GHC_PRAGMA INTERFACE VERSION 20 #-}
_interface_ Main
_instance_modules_
PrelNum Foreign
_usages_
ArrBase 3 :: $d5 1 MutableArray 1 MutableVar 1;
Foreign 3 :: $d4 2;
IOBase 4 :: $d1 2 $d10 2 $d11 2 $d13 2 $d14 2 $d15 4 $d17 4 $d18 4 $d2 2 $d3 2 $d4 2 
$d5 4 $d8 4 $d9 4 BufferMode 2 Handle 2 Handle__ 2 IO 2 IOError 2 IOErrorType 2;
Ix 3 :: $d4 1 $d5 2 $d6 2 $d7 2 $d8 2 $d9 2 Ix 1;
PrelBase 3 :: $d1 2 $d11 2 $d14 2 $d15 2 $d2 2 $d21 2 $d26 1 $d27 2 $d32 2 $d33 2 $d34 
2 $d36 2 $d37 1 $d38 2 $d39 1 $d40 1 $d41 1 $d43 1 $d46 1 $d47 1 $d48 1 $d49 1 $d51 1 
$d52 1 $d53 1 $d54 2 $d55 2 $d56 2 $d58 2 $d59 1 $d6 2 $d60 1 $d61 2 $d62 2 $d63 1 
$d64 1 $d7 1 $d8 2 Addr 1 Either 1 Eq 1 Eval 1 ForeignObj 1 Maybe 1 Ord 1 Ordering 1 
Show 1 ShowS 1 String 1;
PrelIO 6 :: putStr 6;
PrelNum 3 :: $d10 1 $d17 1 $d18 1;
PrelTup 3 :: $d13 1 $d4 1 $d49 1 $d9 1;
STBase 3 :: $d9 1;
_exports_
Main main;
_declarations_

main _:_ IOBase.IO PrelBase.() ;;

ghc202:junk old iface line?:section::interface Main where {
ghc202:junk old iface line?:section::main :: _LibIO.IO ()   {-# ARITY main = 0 #-}{-# 
STRICTNESS main = "T,F" ST #-}
ghc202:junk old iface line?:section::}
ghc202: module version changed to 1; reason: usages changed

Replace .hi file, if changed:
        cmp -s Main.hi /tmp/ghc13919.hi-new || ( rm -f Main.hi && cp 
/tmp/ghc13919.hi-new Main.hi )
        0.1 real         0.0 user         0.0 sys  

C compiler:
        gcc -v  -S -DPROFILING -O -DSTACK_CHECK_BY_PAGE_FAULT=1 -D__STG_REV_TBLS__ 
-ansi -D__STG_GCC_REGS__ -D__STG_TAILJUMPS__   -D__HASKELL1__=4 -I. 
-I/user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/includes 
-I/user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/includes 
ghc13919.c > /tmp/ghc13919.ccout 2>&1 && ( if [ ghc13919.s != /tmp/ghc13919_o.s ] ; 
then mv ghc13919.s /tmp/ghc13919_o.s ; else exit 0 ; fi )
Reading specs from /apps/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2/specs
gcc version 2.7.2
 /apps/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2/cpp -lang-c89 -v -I. 
-I/user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/includes 
-I/user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/includes -undef 
-D__GNUC__=2 -D__GNUC_MINOR__=7 -trigraphs -$ -D__STRICT_ANSI__ -D__sparc__ -D__sun__ 
-D__unix__ -D__GCC_NEW_VARARGS__ -D__sparc -D__sun -D__unix -Asystem(unix) 
-Asystem(bsd) -Acpu(sparc) -Amachine(sparc) -D__OPTIMIZE__ -DPROFILING 
-DSTACK_CHECK_BY_PAGE_FAULT=1 -D__STG_REV_TBLS__ -D__STG_GCC_REGS__ 
-D__STG_TAILJUMPS__ -D__HASKELL1__=4 ghc13919.c /tmp/cca13939.i
GNU CPP version 2.7.2 (sparc)
#include "..." search starts here:
#include <...> search starts here:
 .
 /user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/includes
 /user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/includes
 /apps/gnu/include
 /apps/gnu/sparc-sun-sunos4.1/include
 /apps/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2/include
 /usr/include
End of search list.
 /apps/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2/cc1 /tmp/cca13939.i -quiet -dumpbase 
ghc13919.c -O -ansi -version -o ghc13919.s
GNU C version 2.7.2 (sparc) compiled by GNU C version 2.7.2.
        2.6 real         1.3 user         0.5 sys  

Unix assembler:
        gcc -o Main.o -c  /tmp/ghc13919.s
        0.4 real         0.0 user         0.1 sys  

Linker:
        gcc -v   Main.o 
/user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/TopClosure.o 
-L/user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02  -lHS_p 
-lHS_cbits -lHSrts_p -lHSclib -lgmp -lm
Reading specs from /apps/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2/specs
gcc version 2.7.2
 /apps/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2/ld -e start -dc -dp /lib/crt0.o 
-L/user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02 
-L/apps/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2 -L/apps/gnu/lib Main.o 
/user/julians/Tools/ghc-2.02/fptools/lib/sparc-sun-sunos4/ghc-2.02/TopClosure.o -lHS_p 
-lHS_cbits -lHSrts_p -lHSclib -lgmp -lm -lgcc -lc -lgcc
collect2: ld returned 2 exit status
ld: Undefined symbol 
   _time_str 
   _blockVtAlrmSignal 
   _unblockVtAlrmSignal 
   __regGHC 
   _initialize_virtual_timer 
   _startCcRegisteringWorld 
        5.8 real         2.4 user         0.9 sys  
deleting... a.out

rm -f /tmp/ghc13919*


shoval:~/Haskell/Src/Junk$ cat Main.hs
main = putStr "ahoy, przygodo\n"




Reply via email to