
Hello, I am trying to compile GHC 7.8.3 on Windows. I was following the instructions from the GHC wiki, but I have encountered errors during the make process. I have filed a bug report describing my issue: https://ghc.haskell.org/trac/ghc/ticket/9513 Does anyone had working setup for building GHC and would be willing to share information on how to achieve it? -- Best regards, Marek Wawrzos

1. I see you've set ticket's 'Architecture' field to be 'x86_64' while make output suggests you try to build 32-bit ghc. 2. You are using 'old' MSys which is known to be problematic when building GHC. It's much better to use MSYS2 now: https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2. Also, remember, MSYS2 is only a *build environment*, so you can use 64-bit MSYS2 to build 32-bit GHC on 64-bit Windows. My experience is that 64-bit MSYS2 is more solid and stable than 32-bit MSYS2. And it's extremely important to remember you must *not* use msys2_shell.bat to start MSYS2 shell, only mingwXX_shell.bat (XX stands for 32 or 64) shall be used to start MSYS2 shell -- otherwise GHC make system would not recognize build triplet. Cheers, Kyra On 8/29/2014 17:50, Marek Wawrzos wrote:
Hello,
I am trying to compile GHC 7.8.3 on Windows. I was following the instructions from the GHC wiki, but I have encountered errors during the make process.
I have filed a bug report describing my issue: https://ghc.haskell.org/trac/ghc/ticket/9513
Does anyone had working setup for building GHC and would be willing to share information on how to achieve it?
-- Best regards, Marek Wawrzos
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

2014-08-29 17:59 GMT+02:00 kyra
it's extremely important to remember you must *not* use msys2_shell.bat to start MSYS2 shell, only mingwXX_shell.bat (XX stands for 32 or 64) shall be used to start MSYS2 shell -- otherwise GHC make system would not recognize build triplet.
For what it is worth -- to my experience --, one could build GHC successfully on Windows without using mingwXX_shell.bat. Only the MSYSTEM environment variable has to be set properly (to either MINGW32 or MINGW64). That is what mingwXX_shell.bat also does.

Yup. This is the MSYSTEM env. variable which determines 'uname' output for client, see: http://www.haskell.org/pipermail/ghc-devs/2013-October/002920.html. Cheers, Kyra On 8/29/2014 20:22, Páli Gábor János wrote:
2014-08-29 17:59 GMT+02:00 kyra
: it's extremely important to remember you must *not* use msys2_shell.bat to start MSYS2 shell, only mingwXX_shell.bat (XX stands for 32 or 64) shall be used to start MSYS2 shell -- otherwise GHC make system would not recognize build triplet. For what it is worth -- to my experience --, one could build GHC successfully on Windows without using mingwXX_shell.bat. Only the MSYSTEM environment variable has to be set properly (to either MINGW32 or MINGW64). That is what mingwXX_shell.bat also does.
ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

I have finally builded GHC 7.8.3 on Windows. The wiki page with MSYS2 that
you linked to proved to be useful reference. Indeed using the latest 64 bit
MSYS2 as building environment solved my problems. However there are some
issues with the instructions presented:
-- the MSYS2 package that is linked to in the page fails to initial update.
Using the latest official MSYS2 package does solve that (
https://sourceforge.net/projects/msys2/files/Base/x86_64 );
-- initial update has to be done along the instructions from
http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ ;
There are some error outputs during initial update but they do not seem to
cause any harm
I thing it might be a good idea to give stronger encouragement to use MSYS2
on the page with Windows-specific instructions. It suggests that old MSYS
can be used successfully while it apparently fails and is not supported.
2014-08-29 17:59 GMT+02:00 kyra
1. I see you've set ticket's 'Architecture' field to be 'x86_64' while make output suggests you try to build 32-bit ghc.
2. You are using 'old' MSys which is known to be problematic when building GHC. It's much better to use MSYS2 now: https://ghc.haskell.org/trac/ ghc/wiki/Building/Preparation/Windows/MSYS2.
Also, remember, MSYS2 is only a *build environment*, so you can use 64-bit MSYS2 to build 32-bit GHC on 64-bit Windows. My experience is that 64-bit MSYS2 is more solid and stable than 32-bit MSYS2. And it's extremely important to remember you must *not* use msys2_shell.bat to start MSYS2 shell, only mingwXX_shell.bat (XX stands for 32 or 64) shall be used to start MSYS2 shell -- otherwise GHC make system would not recognize build triplet.
Cheers, Kyra
On 8/29/2014 17:50, Marek Wawrzos wrote:
Hello,
I am trying to compile GHC 7.8.3 on Windows. I was following the instructions from the GHC wiki, but I have encountered errors during the make process.
I have filed a bug report describing my issue: https://ghc.haskell.org/trac/ghc/ticket/9513
Does anyone had working setup for building GHC and would be willing to share information on how to achieve it?
-- Best regards, Marek Wawrzos
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
-- Z poważaniem, Marek Wawrzos

Thanks for the input Marek. I kept the pages separate at first because
it wasn't clear if we wanted to buy into MSYS2 - hence why it's on a
separate page.
I think it's proven itself enough that we can now move the pages
around - making the current page a 'legacy only' page, and moving the
MSYS2 docs to the forefront.
On Tue, Sep 2, 2014 at 4:26 AM, Marek Wawrzos
I have finally builded GHC 7.8.3 on Windows. The wiki page with MSYS2 that you linked to proved to be useful reference. Indeed using the latest 64 bit MSYS2 as building environment solved my problems. However there are some issues with the instructions presented: -- the MSYS2 package that is linked to in the page fails to initial update. Using the latest official MSYS2 package does solve that ( https://sourceforge.net/projects/msys2/files/Base/x86_64 ); -- initial update has to be done along the instructions from http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ ; There are some error outputs during initial update but they do not seem to cause any harm I thing it might be a good idea to give stronger encouragement to use MSYS2 on the page with Windows-specific instructions. It suggests that old MSYS can be used successfully while it apparently fails and is not supported.
2014-08-29 17:59 GMT+02:00 kyra
: 1. I see you've set ticket's 'Architecture' field to be 'x86_64' while make output suggests you try to build 32-bit ghc.
2. You are using 'old' MSys which is known to be problematic when building GHC. It's much better to use MSYS2 now: https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows/MSYS2.
Also, remember, MSYS2 is only a *build environment*, so you can use 64-bit MSYS2 to build 32-bit GHC on 64-bit Windows. My experience is that 64-bit MSYS2 is more solid and stable than 32-bit MSYS2. And it's extremely important to remember you must *not* use msys2_shell.bat to start MSYS2 shell, only mingwXX_shell.bat (XX stands for 32 or 64) shall be used to start MSYS2 shell -- otherwise GHC make system would not recognize build triplet.
Cheers, Kyra
On 8/29/2014 17:50, Marek Wawrzos wrote:
Hello,
I am trying to compile GHC 7.8.3 on Windows. I was following the instructions from the GHC wiki, but I have encountered errors during the make process.
I have filed a bug report describing my issue: https://ghc.haskell.org/trac/ghc/ticket/9513
Does anyone had working setup for building GHC and would be willing to share information on how to achieve it?
-- Best regards, Marek Wawrzos
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
-- Z poważaniem, Marek Wawrzos
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
-- Regards, Austin Seipp, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/

Marek
This sounds great. Can you update the wiki page so that it says exactly what to do?
I’m copying Neil Mitchell who is interested in doing the same
Thank you!
Simon
From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Marek Wawrzos
Sent: 02 September 2014 10:26
Cc: ghc-devs@haskell.org
Subject: Re: Problems with building GHC 7.8.3 on Windows
I have finally builded GHC 7.8.3 on Windows. The wiki page with MSYS2 that you linked to proved to be useful reference. Indeed using the latest 64 bit MSYS2 as building environment solved my problems. However there are some issues with the instructions presented:
-- the MSYS2 package that is linked to in the page fails to initial update. Using the latest official MSYS2 package does solve that ( https://sourceforge.net/projects/msys2/files/Base/x86_64 );
-- initial update has to be done along the instructions from http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ ;
There are some error outputs during initial update but they do not seem to cause any harm
I thing it might be a good idea to give stronger encouragement to use MSYS2 on the page with Windows-specific instructions. It suggests that old MSYS can be used successfully while it apparently fails and is not supported.
2014-08-29 17:59 GMT+02:00 kyra
participants (5)
-
Austin Seipp
-
kyra
-
Marek Wawrzos
-
Páli Gábor János
-
Simon Peyton Jones