Ticket #1110 (closed merge: fixed)

Opened 1 year ago

Last modified 5 months ago

Setting PATH needed in Windows Vista

Reported by: br1@internet.com.uy Assigned to: igloo
Priority: high Milestone: 6.8.3
Component: Driver Version: 6.8.1
Severity: normal Keywords:
Cc: Difficulty: Easy (1 hr)
Test Case: Architecture: x86_64 (amd64)
Operating System: Windows

Description

I'm running Windows Vista 64 bits and GHC 6.6. I needed to put both ghc/bin and ghc/gcc-lib in my path for it to work, or I got cc1/as not found errors.

Attachments

z.cmd.txt (3.4 kB) - added by br1 on 02/27/07 12:53:43.
Output from cmd console
z.cygwin.txt (3.4 kB) - added by br1 on 02/27/07 12:54:15.
Output from cygwin console

Change History

01/26/07 14:22:45 changed by igloo

  • milestone set to 6.6.1.

02/14/07 08:42:32 changed by simonmar

  • priority changed from normal to high.

Vista support is a high prio for 6.6.1.

02/27/07 04:43:57 changed by igloo

I'm not sure what the problem is here, as we should be passing full paths. Perhaps it is a directory separator issue?

Can someone please attach to this bug report the output of something simple that shows the problem, perhaps like

echo 'main = putStrLn "Foo"' > z.hs
ghc -v z.hs -O -o z

and also please say what sort of terminal you are running from.

02/27/07 12:53:43 changed by br1

  • attachment z.cmd.txt added.

Output from cmd console

02/27/07 12:54:15 changed by br1

  • attachment z.cygwin.txt added.

Output from cygwin console

02/27/07 12:55:30 changed by br1

I attached the requested output. I made sure cygwin's native gcc is not interfering with the one in ghc by nukeing PATH.

02/28/07 04:10:22 changed by igloo

OK, so your (cygwin) log looks like this:

D:\programas\ghc-6.6\gcc -BD:\programas\ghc-6.6\gcc-lib/ ...
...
 cc1 -quiet ...
gcc: installation problem, cannot exec `cc1': No such file or directory

(the -B option tells gcc where to find its internal executables etc) whereas mine looks like this:

c:\ghc\ghc-6.6\gcc -Bc:\ghc\ghc-6.6\gcc-lib/ ...
...
 c:/ghc/ghc-6.6/gcc-lib/cc1.exe -quiet ...
...

Both claim to be gcc version 3.4.5 (mingw special).

My guess is that on Vista gcc has decided that the -B directory we give it doesn't exist, presumably because it's getting confused by directory separators.

Is someone with Vista able to see if they can work out what we need to pass please? You should be able to test with something like

c:/ghc/ghc-6.6/gcc q.c -o q -v -Bc:\\ghc\\ghc-6.6\\gcc-lib/

at a cygwin prompt (note the escaped '\'s), where q.c is just something like

int main(void) {
    return 0;
}

03/05/07 08:49:44 changed by simonmar

It's a bug in MinGW (and/or gcc). Here's the latest thread I could find:

http://thread.gmane.org/gmane.comp.gnu.mingw.user/21709/focus=21711

it doesn't look like the MinGW folks have a fix checked in yet. So we could be hosed. One temporary fix could be to set the GCC_EXEC_PREFIX env var from GHC, I'll try that here and see if it works.

03/06/07 06:52:23 changed by igloo

  • owner set to simonmar.

04/13/07 08:24:30 changed by simonmar

  • status changed from new to closed.
  • resolution set to fixed.

Now fixed and merged.

05/24/07 01:17:01 changed by simonmar

  • status changed from closed to reopened.
  • difficulty changed from Unknown to Easy (1 hr).
  • resolution deleted.
  • milestone changed from 6.6.1 to 6.8.

Reopening because I forgot to apply the workaround to ld too.

06/05/07 01:36:14 changed by simonmar

  • status changed from reopened to closed.
  • resolution set to fixed.

Now fixed.

Fri Jun  1 16:19:32 BST 2007  Simon Marlow <simonmar@microsoft.com>
  * FIX #1110: the linker also needs the workaround

11/05/07 07:03:47 changed by igloo

  • milestone changed from 6.8 branch to 6.8.1.

12/04/07 08:00:52 changed by bchallenor

  • status changed from closed to reopened.
  • version changed from 6.6 to 6.8.1.
  • resolution deleted.

I'm seeing this bug in Vista using "Version 6.8.1, for Haskell 98, stage 3 booted by GHC version 6.6".

I try to compile a file generated using Alex that needs the preprocessor and get the following error: "gcc: installation problem, cannot exec `cc1': No such file or directory". As suggested, adding gcc-lib to the Path fixes it, but that's a bad hack.

12/04/07 08:01:57 changed by bchallenor

Sorry, I should have mentioned that this is on x86 (Intel). I hope this is a good place to file the bug.

12/04/07 08:30:24 changed by simonmar

urgh, I think I know what the problem is. Can you confirm that using the -cpp option causes the failure? Try compiling a small source file with and without -cpp.

12/04/07 08:30:35 changed by simonmar

  • milestone changed from 6.8.1 to 6.8.3.

12/05/07 01:26:09 changed by bchallenor

I can confirm that without gcc-lib on the command line, the file "main = return 42" compiles fine without any switches, but dies immediately with the -cpp switch.

12/05/07 01:26:39 changed by bchallenor

Oops, I meant Path.

12/05/07 07:22:31 changed by simonmar

  • status changed from reopened to new.
  • owner changed from simonmar to igloo.
  • type changed from bug to merge.

Fixed, to merge:

Wed Dec  5 07:02:30 PST 2007  Simon Marlow <simonmar@microsoft.com>
  * FIX #1110: hackery also needed when running gcc for CPP

12/07/07 06:16:51 changed by igloo

  • status changed from new to closed.
  • resolution set to fixed.

Merged