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 _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 
C:/GHC/GHC-6.0.1/gcc-lib/crt2.o C:/GHC/GHC-6.0.1/gcc-lib/crtbegin.o -LC:/GHC/GHC-6.0.1 
-LC:/GHC/GHC-6.0.1/gcc-lib -LC:/GHC/GHC-6.0.1/gcc-lib 
-L/mingw/lib/gcc-lib/mingw32/3.2/../../../../mingw32/lib 
-L/mingw/lib/gcc-lib/mingw32/3.2/../../.. main.o -lHShaskell98 -lHSbase -lHSbase_cbits 
-lwsock32 -lmsvcrt -lkernel32 -luser32 -lHSrts -lm -lgmp -lwsock32 -lmingw32 -lgcc 
-lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc 
-lmoldname -lmingwex -lmsvcrt C:/GHC/GHC-6.0.1/gcc-lib/crtend.o
*** Deleting temp files
Deleting: c:/windows/temp/ghc-508751.s c:/windows/temp/ghc-508751.hspp 
c:/windows/temp/ghc-508751.hscpp
Warning: deleting non-existent c:/windows/temp/ghc-508751.hspp
Warning: deleting non-existent c:/windows/temp/ghc-508751.hscpp
    Result size = 10
    Result size = 10
    Result size = 8
    Result size = 8
    Result size = 8
    Result size = 10


and here is the proof the main.exe executable is generated:

$ ls -al main.*
-rwxr-xr-x    1 unknown  unknown    481966 Jan  1 19:39 main.exe
-rw-r--r--    1 unknown  unknown        63 Jan  1 07:40 main.hs
-rw-r--r--    1 unknown  unknown        64 Jan  1 07:39 main.hs~
-rw-r--r--    1 unknown  unknown      2011 Jan  1 19:39 main.o


Conclusion: something is broken with 6.2.msi package (at least on my machine).

Any idea?

Sincerely,
Gour

-- 
Gour
[EMAIL PROTECTED]
Registered Linux User #278493

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to