Problem with ghc on Windows ME

Hi, I'm trying to help someone compile some code of mine and unfortunately they seem to have hit a problem with ghc. Since this is all second hand info I suspect it contains errors and/or isn't useful, but I'm hoping someone recognises the problem as already known and can help out. ghc runs, and preoduces hi files, but doesn't produce a final executable. No warnings are produced. Typical output: C:\halipeto>ghc --make Demo.lhs -o Demo -O -fglasgow-exts Chasing modules from: Demo.lhs (and that's it). I asked him to compile a simple hello world (hw.hs), and a similar thing happens (no "Linking ...") C:\>type hw.hs main = do putStrLn "hello World" C:\>ghc --make hw Chasing modules from: hw Compiling Main ( hw.hs, hw.o ) C:\>a.out Bad command or file name This is ghc6.2 (downloaded in the last day or two): C:\>ghc --version The Glorious Glasgow Haskell Compilation System, version 6.2 Any suggestions? Thanks, Andrew -- personal web site: http://www.acooke.org/andrew personal mail list: http://www.acooke.org/andrew/compute.html

On Sun, 25 Jan 2004 22:51:47 -0300 (CLST)
"andrew cooke"
Any suggestions?
Use the -v (or -vN for some digit N) to get verbose output, it should point out exactly where the problem is happening. I'm betting it's some problem finding/using gcc or ld, or potentially an issue with temporary files.

the output is enclosed. the problem seems to be temporary files. what would cause that (i've just emailed him to check that the TEMP directory exists)? thanks for the quick response, andrew ps unlikely to reply again today (bed!) Derek Elkins said:
On Sun, 25 Jan 2004 22:51:47 -0300 (CLST) "andrew cooke"
wrote: Any suggestions?
Use the -v (or -vN for some digit N) to get verbose output, it should point out exactly where the problem is happening. I'm betting it's some problem finding/using gcc or ld, or potentially an issue with temporary files.
-- personal web site: http://www.acooke.org/andrew personal mail list: http://www.acooke.org/andrew/compute.html

andrew cooke (andrew@acooke.org) wrote:
the output is enclosed. the problem seems to be temporary files. what would cause that (i've just emailed him to check that the TEMP directory exists)?
[...]
*** Literate pre-processor C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs C:\WINDOWS\TEMP\ghc-1160737.lpp
Failed: C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs C:\WINDOWS\TEMP\ghc-1160737.lpprawSystem: does not exist (No such file or directory) *** Deleting temp files Deleting: C:/WINDOWS/TEMP/ghc-1160737.lpp Warning: deleting non-existent C:/WINDOWS/TEMP/ghc-1160737.lpp
Yup. The same thing as here. 6.0.1 works in the same environment. Sincerely, Gour -- Gour gour@mail.inet.hr Registered Linux User #278493

the directory exists. andrew andrew cooke said:
the output is enclosed. the problem seems to be temporary files. what would cause that (i've just emailed him to check that the TEMP directory exists)?
thanks for the quick response, andrew
ps unlikely to reply again today (bed!)
Derek Elkins said:
On Sun, 25 Jan 2004 22:51:47 -0300 (CLST) "andrew cooke"
wrote: Any suggestions?
Use the -v (or -vN for some digit N) to get verbose output, it should point out exactly where the problem is happening. I'm betting it's some problem finding/using gcc or ld, or potentially an issue with temporary files.
-- personal web site: http://www.acooke.org/andrew personal mail list: http://www.acooke.org/andrew/compute.html___________________________________... Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
-- personal web site: http://www.acooke.org/andrew personal mail list: http://www.acooke.org/andrew/compute.html

On Mon, 26 Jan 2004 00:12:56 -0300 (CLST)
"andrew cooke"
the output is enclosed. the problem seems to be temporary files. what would cause that (i've just emailed him to check that the TEMP directory exists)?
*** Literate pre-processor C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs C:\WINDOWS\TEMP\ghc-1160737.lpp
Failed: C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs C:\WINDOWS\TEMP\ghc-1160737.lpprawSystem: does not exist (No such file or directory)*** Deleting temp files Deleting: C:/WINDOWS/TEMP/ghc-1160737.lpp Warning: deleting non-existent C:/WINDOWS/TEMP/ghc-1160737.lpp
The "rawSystem" part is the function GHC uses to execute external programs, see System.Cmd.rawSystem. The error suggests that it can't find unlit.exe. At any rate, I would suggest finding and testing unlit to see if it works directly with the input that GHC provides it. If that works and GHC is capable of compiling the output you at least have a work-around, otherwise you know where the problem is or you're SOL ;) Suffice to say I have not had this problem using the GHC 6.2 binaries on Win2k so I can't recreate it.

i am using win2k too. i've forwarded your message to the person with the problem. but we already know that the problem is not restricted to unlit. he cannot compile a simple "hello world" in a plain .hs file (see my first email). is there any way to raise this as a bug so that someone involved with ghc finds a suitable machine and solves the problem? it's not just my client that's having problems - someone else here has reported something similar. sorry if i seem a little frayed, but it's not cool to send software to someone only to find that they can't compile because ghc doesn't work on a platform it is advertised to support. i know that ghc is a largely voluntary effort, but they've still got more resources than me... andrew Derek Elkins said:
On Mon, 26 Jan 2004 00:12:56 -0300 (CLST) "andrew cooke"
wrote: the output is enclosed. the problem seems to be temporary files. what would cause that (i've just emailed him to check that the TEMP directory exists)?
*** Literate pre-processor C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs C:\WINDOWS\TEMP\ghc-1160737.lpp
Failed: C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs C:\WINDOWS\TEMP\ghc-1160737.lpprawSystem: does not exist (No such file or directory)*** Deleting temp files Deleting: C:/WINDOWS/TEMP/ghc-1160737.lpp Warning: deleting non-existent C:/WINDOWS/TEMP/ghc-1160737.lpp
The "rawSystem" part is the function GHC uses to execute external programs, see System.Cmd.rawSystem. The error suggests that it can't find unlit.exe. At any rate, I would suggest finding and testing unlit to see if it works directly with the input that GHC provides it. If that works and GHC is capable of compiling the output you at least have a work-around, otherwise you know where the problem is or you're SOL ;) Suffice to say I have not had this problem using the GHC 6.2 binaries on Win2k so I can't recreate it.
-- personal web site: http://www.acooke.org/andrew personal mail list: http://www.acooke.org/andrew/compute.html

On Mon, 26 Jan 2004 13:16:21 -0300 (CLST)
"andrew cooke"
i am using win2k too. i've forwarded your message to the person with the problem.
but we already know that the problem is not restricted to unlit. he cannot compile a simple "hello world" in a plain .hs file (see my first email).
Well, what's the -v output for the "hello world" file? In a nutshell, what's all the information that could be provided that might possibly be useful and does anything go wrong doing the things GHC is attempting to do directly. Finally, if it's not necessary to use 6.2, try 6.0.1.
is there any way to raise this as a bug so that someone involved with ghc finds a suitable machine and solves the problem? it's not just my client that's having problems - someone else here has reported something similar.
sorry if i seem a little frayed, but it's not cool to send software to someone only to find that they can't compile because ghc doesn't work on a platform it is advertised to support. i know that ghc is a largely voluntary effort, but they've still got more resources than me...
http://www.haskell.org/ghc/docs/latest/html/users_guide/bug-reporting.html

Derek Elkins (ddarius@hotpop.com) wrote:
Well, what's the -v output for the "hello world" file? In a nutshell, what's all the information that could be provided that might possibly be useful and does anything go wrong doing the things GHC is attempting to do directly.
I've already provided (in previous thread) output for "hello world". Please, if you can tell me if you need soem specific -vN output?
Finally, if it's not necessary to use 6.2, try 6.0.1.
One of the things that bothered me in compiling & running darcs is bug with renameFile (confirmed at Sourceforge) in 6.0.1, so 6.2 is needed. Sincerely, Gour -- Gour gour@mail.inet.hr Registered Linux User #278493

On Tue, 27 Jan 2004 09:24:43 +0100
Gour
Derek Elkins (ddarius@hotpop.com) wrote:
Well, what's the -v output for the "hello world" file? In a nutshell, what's all the information that could be provided that might possibly be useful and does anything go wrong doing the things GHC is attempting to do directly.
I've already provided (in previous thread) output for "hello world".
Please, if you can tell me if you need soem specific -vN output?
Finally, if it's not necessary to use 6.2, try 6.0.1.
One of the things that bothered me in compiling & running darcs is bug with renameFile (confirmed at Sourceforge) in 6.0.1, so 6.2 is needed.
Looking at (the next post by) kyra that you linked to, the only difference that is apparent is the quotes. There are some changes to the rawSystem command that might make that difference* (or the difference might be at it's use). So you might want to try modifying that and seeing if that makes a difference. If GHCi loads, you can probably test the difference by using rawSystem and sending the command in the -v output and explicitly adding \"s (after making sure it doesn't work). Unless I missed it, Microsoft doesn't mention any differences in CreateProcess between Windows versions with regards to this issue. Or the issue may be somewhere else entirely. I'm sure the GHC maintainers would find an example as small and simple as: <<'rawSystem "gcc" ["-c","c:\\foo\\bar.c"]' doesn't work but 'rawSystem"gcc" ["\"-c\"","\"c:\\foo\\bar.c\""]' does>> nice. *(http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/Syste m/Cmd.hs.diff?r1=1.13%3Aghc-6-2&tr1=1.14&r2=1.11%3Aghc-6-0-1&tr2=1.14&f =h)

andrew cooke (andrew@acooke.org) wrote:
is there any way to raise this as a bug so that someone involved with ghc finds a suitable machine and solves the problem? it's not just my client that's having problems - someone else here has reported something similar.
I'd also like to see this marked as a bug - ghc-6.2 is broken on Win98 & ME platforms. Unfortunately, I do not know enough Haskell to try to fix it, but there is definitely issue with the temporary files. However, I'm ready to spend (and I'm already spending time) soem time to try different routes in order to help fix the bug. (My primary platform is Gentoo Linux, but would like to know that Haskell programs are multi-platform, and at the moment Win98 - under Win4Lin - is my 2nd dev. paltform.) Sincerely, Gour -- Gour gour@mail.inet.hr Registered Linux User #278493

Derek Elkins (ddarius@hotpop.com) wrote:
Use the -v (or -vN for some digit N) to get verbose output, it should point out exactly where the problem is happening. I'm betting it's some problem finding/using gcc or ld, or potentially an issue with temporary files.
Didn't know about -vN switch - thanks! I bet (according to my experience) it's a problem with temporary files. Sincerely, Gour

andrew cooke (andrew@acooke.org) wrote: Hi Andrew!
I'm trying to help someone compile some code of mine and unfortunately they seem to have hit a problem with ghc. Since this is all second hand info I suspect it contains errors and/or isn't useful, but I'm hoping someone recognises the problem as already known and can help out.
I'm soooooooooo glad you hit this problem since I have the same on Win98 (see my thread(s) about broken ghc) and no help so far. I have even tried to compile it from the source, and after building stage1, ghc dies with the similar symptoms, so I'm very eager to see if someone can resolve the issue?
Any suggestions?
Not, at the moment. I just can say that ghc-6.0.1 works nicely, while 6.2 is broken on Win98 & ME :-) Sincerely, Gour -- Gour gour@mail.inet.hr Registered Linux User #278493
participants (3)
-
andrew cooke
-
Derek Elkins
-
Gour