I have tried (unsuccessfully, obviously :) ) to get profiling to work under 
GHC 4.08 for Win32.  As the sesion captures below the sig show, even the 
suggested example from the manual doesn't work.

I did use the -static option, since that was suggested by a response to a 
bug report (and was ?later? listed in the mini-FAQ), but it didn't seem to 
help.

I hope I'm not bothering you all with a setup issue, but I really can't 
find anything wrong with the way it's set up.  I read all the installation 
instructions carefully, and tried the suggestions in the manual, but to no 
avail.

Thanks in advance for any light you may be able to shed my way.

_________________
Mattias Andersson
[EMAIL PROTECTED]



************ Begin session capture (edited, but only cosmetically) 
************


BASH.EXE-2.02$ uname -a
CYGWIN_98-4.10 MATTIASA 20.1 (0.3/1/1) 1998-12-3 20:39:18 i586 unknown

BASH.EXE-2.02$ gcc -v
Reading specs from 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

BASH.EXE-2.02$ ls -l
total 1
-rw-r--r--   1 500      everyone       79 Jul 19 14:24 main.hs

BASH.EXE-2.02$ cat main.hs
main = print (nfib 25)
nfib n = if n < 2 then 1 else nfib (n-1) + nfib (n-2)

BASH.EXE-2.02$ ghc main.hs
Output file not specified, defaulting to "main.exe"

BASH.EXE-2.02$ ./main.exe
121393

BASH.EXE-2.02$ ls -l
total 97
-rw-r--r--   1 500      everyone      141 Jul 21 01:00 Main.hi
-rwxr-xr-x   1 500      everyone   190273 Jul 21 01:01 main.exe
-rw-r--r--   1 500      everyone       79 Jul 19 14:24 main.hs
-rw-r--r--   1 500      everyone     4031 Jul 21 01:00 main.o

BASH.EXE-2.02$ rm *.hi *.exe *.o

BASH.EXE-2.02$ ls -l
total 1
-rw-r--r--   1 500      everyone       79 Jul 19 14:24 main.hs

BASH.EXE-2.02$ ghc -prof -auto-all main.hs
Output file not specified, defaulting to "main.exe"
/PROGRAMS/CYGNUS/CYGWIN~1/H-I586~1/i586-cygwin32/bin/ld: cannot open 
-lHSstd_p_imp: No such file or directory
collect2: ld returned 1 exit status

BASH.EXE-2.02$ ls -l
total 7
-rw-r--r--   1 500      everyone      141 Jul 21 01:03 Main.hi
-rw-r--r--   1 500      everyone       79 Jul 19 14:24 main.hs
-rw-r--r--   1 500      everyone     8462 Jul 21 01:04 main.o

BASH.EXE-2.02$ rm *.o *.hi

BASH.EXE-2.02$ ghc -prof -auto-all -static main.hs
Output file not specified, defaulting to "main.exe"
c:/programs/lang/ghc/ghc-4.08/lib/libHSrts_p.a(Itimer.p_o)(.text+0x17):g  
hc6679.c: undefined reference to `timeBeginPeriod'
collect2: ld returned 1 exit status

BASH.EXE-2.02$ ls -l
total 7
-rw-r--r--   1 500      everyone      141 Jul 20 13:20 Main.hi
-rw-r--r--   1 500      everyone       79 Jul 19 14:24 main.hs
-rw-r--r--   1 500      everyone     8332 Jul 20 13:20 main.o

BASH.EXE-2.02$ rm main.o main.hi

BASH.EXE-2.02$ ghc -v -prof -auto-all -static main.hs
The Glorious Glasgow Haskell Compilation System, version 4.08

Effective command line: -v -prof -auto-all -static

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

real0m0.060s
user0m0.000s
sys0m0.000s
ghc:compile:Output file main.o doesn't exist
ghc:compile:Interface file main.hi doesn't exist
ghc:recompile:Input file main.hs newer than main.o

Haskell compiler:
c:/programs/lang/ghc/ghc-4.08/lib/hsc c:/tmp/ghc1071.cpp 
 -fauto-sccs-on-all-toplevs -fscc-profiling -fignore-interface-pragmas 
-fomit-interface-pragmas -fsimplify [ -fmax-simplifier-iterations4 ] 
 -fmassage-stg-for-profiling -fwarn-overlapping-patterns 
-fwarn-missing-methods -fwarn-missing-fields -fwarn-deprecations 
-fwarn-duplicate-exports -fhi-version=408 -static 
"-himap=.%.hi:c:/programs/lang/ghc/ghc-4.08/lib/imports/std%.p_hi" 
"-himap-sep=:"    -v -hifile=c:/tmp/ghc1071.hi -olang=C 
-ofile=c:/tmp/ghc1071.hc -F=c:/tmp/ghc1071_stb.c -FH=c:/tmp/ghc1071_stb.h 
+RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 4.08, for Haskell 98, compiled by GHC 
version 4.07

real0m1.430s
user0m0.000s
sys0m0.000s

Pin on Haskell consistency info:
echo 'static char ghc_hsc_ID[] = "@(#)hsc main.hs40.0,_p,";' >> 
c:/tmp/ghc1071.hc

real0m0.110s
user0m0.000s
sys0m0.000s
*** New hi file follows...
__interface "Main" Main  where
__export Main main;
import PrelFloat 1 !;
import Prelude 1;
main :: PrelIOBase.IO PrelBase.Z0T ;


ghc: module version changed to 1; reason: no old .hi file

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

real0m0.160s
user0m0.000s
sys0m0.000s

C compiler:
gcc -v  -DDONT_WANT_WIN32_DLL_SUPPORT -S -Wimplicit -DPROFILING -O 
-mno-cygwin -DSTOLEN_X86_REGS=4 -fomit-frame-pointer -fno-defer-pop  -I. 
-Ic:/programs/lang/ghc/ghc-4.08/lib/includes ghc1071.c > 
c:/tmp/ghc1071.ccout 2>&1 && ( if [ ghc1071.s != c:/tmp/ghc1071_o.s ] ; 
then mv ghc1071.s c:/tmp/ghc1071_o.s ; else exit 0 ; fi )

real0m1.810s
user0m0.000s
sys0m0.000s
Reading specs from 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\cpp.exe -lang-c -v -I. 
-Ic:/programs/lang/ghc/ghc-4.08/lib/includes -iprefix 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib/gcc-lib/i586-cygwin32\eg  
cs-2.91.57\ -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -Di386 -D_WIN32 -DWINNT 
-D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) 
-D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) 
-D__i386__ -D_WIN32 -D__WINNT__ -D_X86_=1 -D__STDC__=1 
-D__stdcall=__attribute__((__stdcall__)) 
-D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) 
-D__i386 -D__WINNT -Asystem(winnt) -Acpu(i386) -Amachine(i386) 
-D__OPTIMIZE__ -Wimplicit -remap -Acpu(i386) -Amachine(i386) -Di386 
-D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium 
-D__pentium__ -iwithprefixbefore ../../../../i586-cygwin32/include/mingw32 
-D__MINGW32__=0.2 -DDONT_WANT_WIN32_DLL_SUPPORT -DPROFILING 
-DSTOLEN_X86_REGS=4 ghc1071.c c:/tmp\ccLknQOj.i
GNU CPP version egcs-2.91.57 19980901 (egcs-1.1 release) (80386, BSD 
syntax)
#include "..." search starts here:
#include <...> search starts here:
 .
 c:\programs\lang\ghc\ghc-4.08\lib\includes
 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\..\..\..\..\i586-cygwin32\include\mingw32
 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\..\..\..\..\..\include
 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\..\..\..\..\i586-cygwin32\include
 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\include
End of search list.
 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\cc1.exe c:/tmp\ccLknQOj.i -quiet -dumpbase ghc1071.c -mno-cygwin 
-O -Wimplicit -version -fomit-frame-pointer -fno-defer-pop -o ghc1071.s
GNU C version egcs-2.91.57 19980901 (egcs-1.1 release) (i586-cygwin32) 
compiled by GNU C version egcs-2.91.57 19980901 (egcs-1.1 release).

Unix assembler:
gcc -o main.o -c  -I. -Ic:/programs/lang/ghc/ghc-4.08/lib/includes 
c:/tmp/ghc1071.s
0.00user 0.00system 0:00.44elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+0minor)pagefaults 0swaps
Output file not specified, defaulting to "main.exe"

Linker:
gcc -v -u _PrelMain_mainIO_closure -u _PrelBase_Izh_static_info -u 
_PrelBase_Czh_static_info -u _PrelFloat_Fzh_static_info -u 
_PrelFloat_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 _PrelFloat_Fzh_con_info 
-u _PrelFloat_Dzh_con_info -u _PrelAddr_Azh_con_info -u _PrelAddr_Wzh_co  
n_info -u _PrelAddr_I64zh_con_info -u _PrelAddr_W64zh_con_info -u 
_PrelStable_StablePtr_con_info -u _PrelBase_False_closure -u 
_PrelBase_True_closure -u _PrelPack_unpackCString_closure -u 
_PrelException_stackOverflow_closure -u _PrelException_heapOverflow_closure 
-u _PrelException_NonTermination_closure -u 
_PrelException_PutFullMVar_closure -u 
_PrelException_BlockedOnDeadMVar_closure -u ___init_Prelude -u 
___init_PrelMain -static -static -mno-cygwin -o main.exe main.o 
-Lc:/programs/lang/ghc/ghc-4.08/lib  -lHSstd_p -lHSstd_cbits -lHSrts_p 
-lwinmm -lwsock32 -lgmp
Reading specs from 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\collect2.exe -o main.exe -u _PrelMain_mainIO_closure -u 
_PrelBase_Izh_static_info -u _PrelBase_Czh_static_info -u 
_PrelFloat_Fzh_static_info -u _PrelFloat_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 _PrelFloat_Fzh_con_info -u 
_PrelFloat_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_closure -u 
_PrelBase_True_closure -u _PrelPack_unpackCString_closure -u 
_PrelException_stackOverflow_closure -u _PrelException_heapOverflow_closure 
-u _PrelException_NonTermination_closure -u 
_PrelException_PutFullMVar_closure -u 
_PrelException_BlockedOnDeadMVar_closure -u ___init_Prelude -u 
___init_PrelMain 
C:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\eg  
cs-2.91.57\..\..\..\..\i586-cygwin32\lib\crt1.o 
-Lc:/programs/lang/ghc/ghc-4.08/lib 
-LC:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\  
egcs-2.91.57 -LC:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib 
-LC:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\  
egcs-2.91.57\..\..\..\..\i586-cygwin32\lib 
-LC:\PROGRAMS\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\  
egcs-2.91.57\..\..\.. main.o -lHSstd_p -lHSstd_cbits -lHSrts_p -lwinmm 
-lwsock32 -lgmp -lgcc -lmingw32 -lmoldname -lcrtdll -lkernel32 -ladvapi32 
-lshell32 -lgcc
c:/programs/lang/ghc/ghc-4.08/lib/libHSrts_p.a(Itimer.p_o)(.text+0x17):g  
hc6679.c: undefined reference to `timeBeginPeriod'
collect2: ld returned 1 exit status
Command exited with non-zero status 1
0.00user 0.00system 0:04.89elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+0minor)pagefaults 0swaps
deleting... main.exe

rm -f c:/tmp/ghc1071*

BASH.EXE-2.02$ ls -l
total 7
-rw-r--r--   1 500      everyone      141 Jul 21 01:06 Main.hi
-rw-r--r--   1 500      everyone       79 Jul 19 14:24 main.hs
-rw-r--r--   1 500      everyone     8332 Jul 21 01:06 main.o


************ End session capture ************



Reply via email to