[GHC] #9513: Building GHC on Windows

#9513: Building GHC on Windows -------------------------------------+------------------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.8.3 Keywords: | Operating System: Architecture: x86_64 (amd64) | Unknown/Multiple Difficulty: Unknown | Type of failure: Building Blocked By: | GHC failed Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- I am trying to build GHC 7.8.3 on my computer, but in final phase of building it fails. I have downloaded both packages with sources, one with compiler and minimal set of libraries, second with extra building tools required on Windows. I have unzipped files to same folder. I was following instructions given in your wiki. I installed required tools and set PATH variable. Next I run ./configure and it finished successfully, but when I have executed make, it has stopped with errors In a block below there is an output of make. {{{ ===--- building phase 0 make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds make[1]: Nothing to be done for `phase_0_builds'. ===--- building phase 1 make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds make[1]: Nothing to be done for `phase_1_builds'. ===--- building final phase make -r --no-print-directory -f ghc.mk phase=final all driver/ghci/ghc.mk:39: driver/ghci/dist/build/.depend.c_asm: No such file or directory rts/ghc.mk:515: rts/dist/build/.depend-v-p-l-debug-thr-thr_debug-thr_l- thr_p.c_asm: No such file or directory libraries/old-time/ghc.mk:5: libraries/old-time/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/old-time/ghc.mk:5: libraries/old-time/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/haskell98/ghc.mk:5: libraries/haskell98/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/haskell98/ghc.mk:5: libraries/haskell98/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/haskell2010/ghc.mk:5: libraries/haskell2010/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/haskell2010/ghc.mk:5: libraries/haskell2010/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/ghc-prim/ghc.mk:4: libraries/ghc-prim/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/ghc-prim/ghc.mk:4: libraries/ghc-prim/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/integer-gmp/ghc.mk:4: libraries/integer-gmp/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/integer-gmp/ghc.mk:4: libraries/integer-gmp/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/base/ghc.mk:4: libraries/base/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/base/ghc.mk:4: libraries/base/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/filepath/ghc.mk:4: libraries/filepath/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/filepath/ghc.mk:4: libraries/filepath/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/array/ghc.mk:4: libraries/array/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/array/ghc.mk:4: libraries/array/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/deepseq/ghc.mk:4: libraries/deepseq/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/deepseq/ghc.mk:4: libraries/deepseq/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/bytestring/ghc.mk:4: libraries/bytestring/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/bytestring/ghc.mk:4: libraries/bytestring/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/containers/ghc.mk:4: libraries/containers/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/containers/ghc.mk:4: libraries/containers/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/old-locale/ghc.mk:4: libraries/old-locale/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/old-locale/ghc.mk:4: libraries/old-locale/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/Win32/ghc.mk:4: libraries/Win32/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/Win32/ghc.mk:4: libraries/Win32/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/time/ghc.mk:4: libraries/time/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/time/ghc.mk:4: libraries/time/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/directory/ghc.mk:4: libraries/directory/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/directory/ghc.mk:4: libraries/directory/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/process/ghc.mk:4: libraries/process/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/process/ghc.mk:4: libraries/process/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/hpc/ghc.mk:4: libraries/hpc/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/hpc/ghc.mk:4: libraries/hpc/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/pretty/ghc.mk:4: libraries/pretty/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/pretty/ghc.mk:4: libraries/pretty/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/template-haskell/ghc.mk:4: libraries/template-haskell/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/template-haskell/ghc.mk:4: libraries/template-haskell/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/Cabal/Cabal/ghc.mk:4: libraries/Cabal/Cabal/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/Cabal/Cabal/ghc.mk:4: libraries/Cabal/Cabal/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/binary/ghc.mk:4: libraries/binary/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/binary/ghc.mk:4: libraries/binary/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/bin-package-db/ghc.mk:4: libraries/bin-package-db/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/bin-package-db/ghc.mk:4: libraries/bin-package-db/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/hoopl/ghc.mk:4: libraries/hoopl/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/hoopl/ghc.mk:4: libraries/hoopl/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/transformers/ghc.mk:4: libraries/transformers/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/transformers/ghc.mk:4: libraries/transformers/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/xhtml/ghc.mk:4: libraries/xhtml/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/xhtml/ghc.mk:4: libraries/xhtml/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/haskeline/ghc.mk:4: libraries/haskeline/dist- install/build/.depend-v-p.haskell: No such file or directory libraries/haskeline/ghc.mk:4: libraries/haskeline/dist- install/build/.depend-v-p.c_asm: No such file or directory libraries/integer-gmp/mkGmpDerivedConstants/ghc.mk:20: libraries/integer- gmp/mkGmpDerivedConstants/dist/build/.depend.c_asm: No such file or directory utils/haddock/ghc.mk:15: utils/haddock/dist/build/.depend.haskell: No such file or directory utils/haddock/ghc.mk:15: utils/haddock/dist/build/.depend.c_asm: No such file or directory compiler/ghc.mk:640: compiler/stage2/build/.depend-v-p.haskell: No such file or directory make -C libffi/build MAKEFLAGS= install MAKE i686-pc-mingw32 : 0 * install make[3]: Entering directory `/c/ghc-7.8.3/libffi/build/i386-unknown- mingw32' Making install in include make[4]: Entering directory `/c/ghc-7.8.3/libffi/build/i386-unknown- mingw32/include' make[5]: Entering directory `/c/ghc-7.8.3/libffi/build/i386-unknown- mingw32/include' make[5]: Nothing to be done for `install-exec-am'. test -z "c:/ghc-7.8.3/libffi/build/inst/lib/libffi-3.0.11/include" || /c/MinGHC/msys/1.0/bin/mkdir -p "c:/ghc-7.8.3/libffi/build/inst/lib/libffi-3.0.11/include" ../install-sh -c -m 644 ffi.h ffitarget.h 'c:/ghc-7.8.3/libffi/build/inst/lib/libffi-3.0.11/include' /bin/sh: line 7: ../install-sh: No such file or directory make[5]: *** [install-nodist_includesHEADERS] Error 127 make[5]: Leaving directory `/c/ghc-7.8.3/libffi/build/i386-unknown- mingw32/include' make[4]: *** [install-am] Error 2 make[4]: Leaving directory `/c/ghc-7.8.3/libffi/build/i386-unknown- mingw32/include' make[3]: *** [install-recursive] Error 1 make[3]: Leaving directory `/c/ghc-7.8.3/libffi/build/i386-unknown- mingw32' make[2]: *** [install] Error 2 make[1]: *** [libffi/stamp.ffi.static.install] Error 2 make: *** [all] Error 2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows -------------------------------------+------------------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Building | Related Tickets: GHC failed | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by schyler): Did you `perl boot` and `./sync-all get` ? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows -------------------------------------+------------------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Building | Related Tickets: GHC failed | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by srutownik): Thank you for the quick reply. When I tried to build GHC yesterday I omitted executing {{{ perl boot}}}, because I am using source package distribution (obtained by your downloads page), the sources are not from git. In wiki it was mentioned that {{{ perl boot}}} is unnecessary in this case. However I have done everything from the beginning to make sure that I have not missed any step. I have created two separate dirs containing unzipped packages. Next I have executed {{{perl boot}}} in one of then. What is following I have executed {{{./configure}}} and {{{make}}} in both directories, but in both cases I have encountered the same errors as before. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows -------------------------------------+------------------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Building | Related Tickets: GHC failed | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by srutownik): I have tried to build GHC with sources cloned from git. I have also redirected output to files, so you can see whole output. steps: - {{{git clone -b ghc-7.8.3-release --recursive git://git.haskell.org/ghc.git ghc-7.8.3}}} - {{{cd ghc-7.8.3}}} - {{{git clone git://git.haskell.org/ghc-tarballs.git}}} - {{{sync-all get}}} - {{{perl boot}}} - {{{./configure}}} - {{{make}}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows -------------------------------------+------------------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Building | Related Tickets: GHC failed | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by rwbarton): {{{ checking for a BSD-compatible install... ../install-sh -c }}} This appears to be the problem. The `install-sh` detected by configure needs to be an absolute path so that it can be invoked by sub-Makefiles. Do you have `..` in your PATH? Looks like that could cause this. (Though I am just judging from what happens on Linux; I have no familiarity with Windows.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows -------------------------------------+------------------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Building | Related Tickets: GHC failed | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by srutownik): During installation I am using msys Before all steps mentioned above I have set path as below {{{ export PATH=/c/ghc-7.8.3/inplace/mingw/bin:/c/Python27:/c/MinGHC/bin:/c/MinGHC/msys/1.0/bin:"/C/Program Files (x86)/Git/bin":/c/dev/llvm/bin:/e/2014.2.0.0-32/bin:/e/2014.2.0.0-32/lib/extralibs/bin:/e/VCMI/libs/x86 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows -------------------------------------+------------------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Building | Related Tickets: GHC failed | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by rwbarton): OK, I read farther in configure and I see where `../install-sh` is coming from now. I can see how that ''could'' work but for some reason it doesn't actually appear to be working. How does your `libffi/build/i386-unknown-mingw32/include/Makefile` define `INSTALL`? (e.g. mine is `INSTALL = /usr/bin/install -c`.) It should be `../../install-sh -c`, but I expect it will actually be `../install-sh -c`. I would suggest as a workaround ensuring that you have an `install` on your path somewhere. Or someone familiar with Windows and autoconf should comment. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows -------------------------------------+------------------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Building | Related Tickets: GHC failed | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by srutownik): Files {{{Makefile}}} in both, package and repository distribution, contains two definitions with {{{install-sh}}} string: {{{INSTALL = ../../install-sh -c}}} and {{{install_sh = ${SHELL} /c/new-1inst/ghc-7.8.3/libffi/build/install-sh}}} ({{{SHELL = /bin/sh}}}) {{{/c/new-1inst/ghc-7.8.3}}} is a root root directory for my ghc installation. install-sh file exists in specified path Thank you for your help. I would gladly accept any other suggestions. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows ----------------------------------------------+--------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86 Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ----------------------------------------------+--------------------------- Changes (by srutownik): * architecture: x86_64 (amd64) => x86 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows ----------------------------------------------+--------------------------- Reporter: srutownik | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86 Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ----------------------------------------------+--------------------------- Comment (by srutownik): I have finally succeeded -- it was necessary to use MSYS2 as building environment. I have posted further details in the mail http://www.haskell.org/pipermail/ghc-devs/2014-September/006217.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9513: Building GHC on Windows ----------------------------------------------+--------------------------- Reporter: srutownik | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Build System | Version: 7.8.3 Resolution: worksforme | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ----------------------------------------------+--------------------------- Changes (by thomie): * status: new => closed * resolution: => worksforme * os: Unknown/Multiple => Windows Comment: For others that are running into this problem, please see the greatly improved wiki page [wiki:Building/Preparation/Windows]. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9513#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC