Simon Peyton-Jones ([EMAIL PROTECTED]) wrote:
> There's something very mysterious going on. GHC does not depend on you
> having any particular version of gcc etc; it all comes in the bundle.
Yes, it looks mysterious.
>
> Are you absolutely certain that you made no change at all to the
> installed binaries? Such as removing c:/ghc/ghc-6.2/gcc.exe?
>
> Maybe clean out c:/ghc/ghc-6.2 and try again. I have just done so and
> ghc Main.hs -o main
> ./main
> worked just fine for me.
I cleaned everything (both ghc-6.2 & c:\ghc folder) and installed ghc-6.2
from the scratch.
The result is the same not matter if I execute it under MSDOS prompt or MSYS
shell:
[...]
Hsc static flags: -static
*** Checking old interface for Main:
*** Parser:
*** Renamer/typechecker:
*** Desugar:
Result size = 10
*** Simplify:
Result size = 10
Result size = 8
Result size = 8
*** Tidy Core:
Result size = 8
*** CorePrep:
Result size = 10
*** Stg2Stg:
*** CodeGen:
*** CodeOutput:
*** Assembler
C:\GHC\GHC-6.2\gcc -B"C:\GHC\GHC-6.2\gcc-lib/" -I. -I. -c c:\windows\temp\ghc-511675.s
-o main.o
Failed: C:\GHC\GHC-6.2\gcc -B"C:\GHC\GHC-6.2\gcc-lib/" -I. -I. -c
c:\windows\temp\ghc-511675.s -o main.orawSystem: does not exist (No such file or
directory)
*** Deleting temp files
Deleting: c:/windows/temp/ghc-511675.s
Here are my Win setttings:
C:\msys\1.0\home\gour>set
COMSPEC=c:\COMMAND.COM
CD_DRIVE=o
DOS_SHARE_DRIVE=j
LANG=
PROMPT=$p$g
PATH=J:\DOS;J:\MERGE;C:\WINDOWS;C:\GHC\GHC-6.2\BIN;C:\PYTHON23;C:\AAP\EXEC;
TMP=c:\windows\temp
TEMP=C:\windows\temp
HOME=c:\msys\1.0\home\gour
windir=C:\WINDOWS
CMDLINE=ghc -v -o main.exe main.hs
and, as you can see, $TMP $TEMP are set,
and here is the test 'program':
$ cat main.hs
module Main(main) where
main = putStrLn "Hello world!\n"
GHC produces just main.hi & main.o, but not executable main.exe ??
After this test, I removed ghc-6.2 (with c:\ghc folder) and installed 6.0.1.
The environment is the same with the exception that $PATH is adjusted for
6.0.1 and here is the result:
[...]
Hsc static flags: -static -fignore-interface-pragmas -fomit-interface-pragmas
-fdo-lambda-eta-expansion -flet-no-escape
*** Checking old interface for Main:
*** Parser:
*** Renamer/typechecker:
*** Desugar:
*** Simplify:
*** Tidy Core:
*** CorePrep:
*** Stg2Stg:
*** CodeGen:
*** CodeOutput:
*** Assembler
C:\GHC\GHC-6.0.1\gcc -B"C:\GHC\GHC-6.0.1\gcc-lib/" "-I." "-I." "-c"
"c:\windows\temp\ghc-508751.s" "-o" "main.o"
*** Linker
C:\GHC\GHC-6.0.1\gcc -B"C:\GHC\GHC-6.0.1\gcc-lib/" "-v" "-o" "main"
"-DDONT_WANT_WIN32_DLL_SUPPORT" "main.o" "-LC:/GHC/GHC-6.0.1"
"-LC:/GHC/GHC-6.0.1/gcc-lib" "-lHShaskell98" "-lHSbase" "-lHSbase_cbits" "-lwsock32"
"-lmsvcrt" "-lkernel32" "-luser32" "-lHSrts" "-lm" "-lgmp" "-lwsock32" "-u"
"_GHCziBase_Izh_static_info" "-u" "_GHCziBase_Czh_static_info" "-u"
"_GHCziFloat_Fzh_static_info" "-u" "_GHCziFloat_Dzh_static_info" "-u"
"_GHCziPtr_Ptr_static_info" "-u" "_GHCziWord_Wzh_static_info" "-u"
"_GHCziInt_I8zh_static_info" "-u" "_GHCziInt_I16zh_static_info" "-u"
"_GHCziInt_I32zh_static_info" "-u" "_GHCziInt_I64zh_static_info" "-u"
"_GHCziWord_W8zh_static_info" "-u" "_GHCziWord_W16zh_static_info" "-u"
"_GHCziWord_W32zh_static_info" "-u" "_GHCziWord_W64zh_static_info" "-u"
"_GHCziStable_StablePtr_static_info" "-u" "_GHCziBase_Izh_con_info" "-u"
"_GHCziBase_Czh_con_info" "-u" "_GHCziFloat_Fzh_con_info" "-u"
"_GHCziFloat_Dzh_con_info" "-u" "_GHCziPtr_Ptr_con_info" "-u"
"_GHCziPtr_FunPtr_con_info" "-u" "_GHCziStable_StablePtr_con_info" "-u"
"_GHCziBase_False_closure" "-u" "_GHCziBase_True_closure" "-u"
"_GHCziPack_unpackCString_closure" "-u" "_GHCziIOBase_stackOverflow_closure" "-u"
"_GHCziIOBase_heapOverflow_closure" "-u" "_GHCziIOBase_NonTermination_closure" "-u"
"_GHCziIOBase_BlockedOnDeadMVar_closure" "-u" "_GHCziIOBase_Deadlock_closure" "-u"
"_GHCziWeak_runFinalizzerBatch_closure" "-u" "___stginit_Prelude"
Reading specs from C:/GHC/GHC-6.0.1/gcc-lib/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as
--host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls
--enable-languages=f77,c++,objc,ada --disable-win32-registry --disable-shared
Thread model: win32
gcc version 3.2 (mingw special 20020817-1)
C:\GHC\GHC-6.0.1\gcc-lib\ld.exe -Bdynamic -o main.exe -u _GHCziBase_Izh_static_info
-u _GHCziBase_Czh_static_info -u _GHCziFloat_Fzh_static_info -u
_GHCziFloat_Dzh_static_info -u _GHCziPtr_Ptr_static_info -u _GHCziWord_Wzh_static_info
-u _GHCziInt_I8zh_static_info -u _GHCziInt_I16zh_static_info -u
_GHCziInt_I32zh_static_info -u _GHCziInt_I64zh_static_info -u
_GHCziWord_W8zh_static_info -u _GHCziWord_W16zh_static_info -u
_GHCziWord_W32zh_static_info -u _GHCziWord_W64zh_static_info -u
_GHCziStable_StablePtr_static_info -u _GHCziBase_Izh_con_info -u
_GHCziBase_Czh_con_info -u _GHCziFloat_Fzh_con_info -u _GHCziFloat_Dzh_con_info -u
_GHCziPtr_Ptr_con_info -u _GHCziPtr_FunPtr_con_info -u _