Skip to content

Support 64-bit Windows #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3noch opened this issue Jun 10, 2015 · 21 comments
Closed

Support 64-bit Windows #261

3noch opened this issue Jun 10, 2015 · 21 comments
Assignees
Milestone

Comments

@3noch
Copy link
Member

3noch commented Jun 10, 2015

I can't use stack until it supports two things:

  1. 64-bit GHC on Windows
  2. Compiling the same code for both 32-bit and 64-bit (possibly with some flag to specify which)

I couldn't find a way to accomplish (2) but it might already be in place. (1) is disabled for some reason ATM. I think @ndmitchell has fears about 64-bit GHC's stability on Windows? I personally have never had issues (other than some libraries not fully supporting 64-bit, but that's not GHC's fault).

@ndmitchell
Copy link
Contributor

I have enough concerns about 64bit windows that if you only support one binary download, it should be 32bit. But you should support both ideally :) Partly its just newer and historically had some issues (the first version was dire) - now I suspect it's just less tested.

@3noch
Copy link
Member Author

3noch commented Jun 10, 2015

@ndmitchell I'm curious how long it's been since that first version. Did it produce incorrect code?

@ndmitchell
Copy link
Contributor

A long time! I think it segfaulted with NAG dlls or something, pretty rare and a long time ago. Now it's just less tested.

@snoyberg snoyberg self-assigned this Jun 10, 2015
@snoyberg snoyberg modified the milestone: First stable release (0.1.0.0?) Jun 10, 2015
@snoyberg snoyberg added the ready label Jun 10, 2015
@snoyberg
Copy link
Contributor

Alright, I think I've got this working. Try running with the --arch x86_64 flag, or adding arch: x86_64 to your stack.yaml file. I'll test this out on my Windows machine today and see how it goes.

@3noch
Copy link
Member Author

3noch commented Jun 11, 2015

I've successfully built a project with both 32- and 64-bit GHC! I still need to test installing GHC.

@3noch
Copy link
Member Author

3noch commented Jun 11, 2015

Installing 64-bit GHC worked!

@snoyberg
Copy link
Contributor

Awesome! Should we consider this resolved?

@3noch
Copy link
Member Author

3noch commented Jun 12, 2015

Is there a way to specify which GHC version you want in stack.yaml and/or via command-line?

@ndmitchell
Copy link
Contributor

I would have thought stack.yaml was the wrong place for it - you want that to be a cross-platform file.

@snoyberg
Copy link
Contributor

stack setup 7.8 or stack setup 7.10 will work. The resolver field in stack.yaml determines which version of GHC should be used.

@3noch
Copy link
Member Author

3noch commented Jun 12, 2015

Ok I was aware of the setup bit, but I wasn't sure how to get stack to actually use a particular setup. So the resolver includes GHC version. Very well. Thank you. I think this is solved, then. Amazing work.

@3noch
Copy link
Member Author

3noch commented Jun 12, 2015

With that in mind, can/does setup deduce the proper GHC?

@3noch
Copy link
Member Author

3noch commented Jun 12, 2015

Also, I keep getting Would add the following to PATH:... at the end up stack setup. I don't understand it.

@snoyberg
Copy link
Contributor

With that in mind, can/does setup deduce the proper GHC?

Yes.

Also, I keep getting Would add the following to PATH:... at the end up stack setup. I don't understand it.

Please feel free to update the text to be more user-friendly. It's intended to let the user how the PATH environment variable would be modified for any subprocesses, which would be useful information to have if the user wanted to use that GHC directly.

@3noch
Copy link
Member Author

3noch commented Jun 12, 2015

Ok that makes sense now. I wasn't sure if it was telling me that I should change my PATH, or if stack would do it, or if it was informational only (i.e. stack will use the right GHC regardless of PATH).

@gregwebs
Copy link
Contributor

Is this fixed in the latest release?

@snoyberg
Copy link
Contributor

I think so, let's close it.

@wismill
Copy link

wismill commented Jun 16, 2015

Hi, please reopen this issue, there is something wrong with the installer of GHC 7.10 64 bits (stack Version 0.0.2, Git revision ca93c89).

With .\stack setup 7.10 --arch x86_64 it completes the installation (message "everything is Ok") but at the end I got the message "Executable named ghc not found on path: [...]".

In fact, the structure of the GHC directory looks strange (I have remaining "stage1" and "stage2" subdirectories):



    Verzeichnis: C:\Users\qrn\AppData\Local\Programs\stack\x86_64-windows\ghc-7.10.1


Mode                LastWriteTime     Length Name                                                                                                                                  
----                -------------     ------ ----                                                                                                                                  
d----        2015-06-16     10:48            compiler                                                                                                                              
d----        2015-06-16     10:48            docs                                                                                                                                  
d----        2015-06-16     10:48            driver                                                                                                                                
d----        2015-06-16     10:48            ghc                                                                                                                                   
d----        2015-06-16     10:48            includes                                                                                                                              
d----        2015-06-16     10:48            inplace                                                                                                                               
d----        2015-06-16     10:48            libffi                                                                                                                                
d----        2015-06-16     10:48            libraries                                                                                                                             
d----        2015-06-16     10:48            mk                                                                                                                                    
d----        2015-06-16     10:48            rts                                                                                                                                   
d----        2015-06-16     10:48            rules                                                                                                                                 
d----        2015-06-16     10:48            utils                                                                                                                                 
-a---        2015-03-28     07:18        233 bindist.mk                                                                                                                            
-a---        2014-12-22     16:55      42856 config.guess                                                                                                                          
-a---        2014-12-22     16:55      35740 config.sub                                                                                                                            
-a---        2015-03-28     07:18     207272 configure                                                                                                                             
-a---        2015-02-23     12:48      51617 ghc.mk                                                                                                                                
-a---        2014-12-22     16:55       1376 INSTALL                                                                                                                               
-a---        2014-12-22     16:55      13997 install-sh                                                                                                                            
-a---        2014-12-22     16:55       1611 LICENSE                                                                                                                               
-a---        2015-03-21     23:30       3518 Makefile                                                                                                                              
-a---        2014-12-22     16:55       5463 packages                                                                                                                              
-a---        2014-12-22     16:55        420 README                                                                                                                                
-a---        2015-03-21     23:30       1402 settings.in

Also, could you consider to make by default the architecture of GHC the same than the one of Windows? It is counter-intuitive to have by default 32 bits on a 64 bits system.

@snoyberg
Copy link
Contributor

Good catch, there was an incorrect URL. Can you delete your Programs directory (or at least the downloaded tarball and unpacked directory) and try again? No need to redownload stack.

We're defaulting to 32-bit for now because there's still some concern about the reliability of 64-bit GHC on Windows.

@snoyberg snoyberg reopened this Jun 16, 2015
@wismill
Copy link

wismill commented Jun 16, 2015

It works now! I have installed both 32 and 64 bits versions.

@snoyberg
Copy link
Contributor

Cool, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants