[GHC] #14926: failed to build cross-compiler

#14926: failed to build cross-compiler -------------------------------------+------------------------------------- Reporter: rueshyna | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.1 Keywords: | Operating System: Linux Architecture: | Type of failure: Building GHC Unknown/Multiple | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I'm trying to build cross-compiler(ghc-8.4.1) but got an error. Target platform is 32-bit windows. Here is what I do: 1. pull docker image[1]: `docker pull gregweber/ghc-haskell-dev` 2. install gcc-mingw-w64-i686: `apt-get install gcc-mingw-w64-i686` 3. download ghc source and switch to tag ghc-8.4.1-release 4. run `./boot` 5. `CC=/usr/bin/i686-w64-mingw32-gcc ./configure --target=i686-w64-mingw32 --enable-unregisterised` 6. `cp mk/build.mk.sample mk/build.mk` 7. uncomment the line: `BuildFlavour = quick-cross-ncg` 8. run `make` Error message: {{{ Configuring ghc-pkg-6.9... "inplace/bin/mkdirhier" utils/ghc-pkg/dist/build/tmp//. "/opt/ghc/8.2.1/bin/ghc" -o utils/ghc-pkg/dist/build/tmp/ghc-pkg -hisuf hi -osuf o -hcsuf hc -static -O0 -H64m -Wall -package-db libraries/bootstrapping.conf -hide-all-packages -i -iutils/ghc-pkg/. -iutils/ghc-pkg/dist/build -Iutils/ghc-pkg/dist/build -iutils/ghc- pkg/dist/build/ghc-pkg/autogen -Iutils/ghc-pkg/dist/build/ghc-pkg/autogen -optP-include -optPutils/ghc-pkg/dist/build/ghc-pkg/autogen/cabal_macros.h -no-user-package-db -rtsopts -odir utils/ghc-pkg/dist/build -hidir utils/ghc-pkg/dist/build -stubdir utils/ghc-pkg/dist/build -static -O0 -H64m -Wall -package-db libraries/bootstrapping.conf -hide-all- packages -i -iutils/ghc-pkg/. -iutils/ghc-pkg/dist/build -Iutils/ghc- pkg/dist/build -iutils/ghc-pkg/dist/build/ghc-pkg/autogen -Iutils/ghc- pkg/dist/build/ghc-pkg/autogen -optP-include -optPutils/ghc- pkg/dist/build/ghc-pkg/autogen/cabal_macros.h -no-user-package-db -rtsopts -no-auto-link-packages -no-hs-main ghc: no input files Usage: For basic information, try the `--help' option. utils/ghc-pkg/ghc.mk:70: recipe for target 'utils/ghc-pkg/dist/build/tmp /ghc-pkg' failed make[1]: *** [utils/ghc-pkg/dist/build/tmp/ghc-pkg] Error 1 Makefile:122: recipe for target 'all' failed make: *** [all] Error 2 }}} If using `BuildFlavour = quick`, it works well. [1]https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux#Docker -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14926 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14926: failed to build cross-compiler -------------------------------------+------------------------------------- Reporter: rueshyna | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.1 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * cc: angerman (added) Comment: Hmm, interesting. CCing angerman who is working on cross-compilation currently. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14926#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14926: failed to build cross-compiler -------------------------------------+------------------------------------- Reporter: rueshyna | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.1 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by angerman): I've not see this error before. It seems strange that we invoke ghc without and source files. Does that same happen when `configuring` without `--enable-unregistered`? The only difference to what I build is that I built for 64bit windows. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14926#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14926: failed to build cross-compiler -------------------------------------+------------------------------------- Reporter: rueshyna | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.1 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rueshyna): Nope, it doesn't work without `--enable-unregistered`. I also tried to build for 64bit windows, it turns out the same error here. Here is a command for building 64bit windows, the other commands/settings are the same for 32bit one: `CC=/usr/bin/x86_64-w64-mingw32-gcc ./configure --target=x86_64-w64-mingw32` Just to be sure, so you used this docker image `egweber/ghc-haskell-dev` and our build env are the same? I also found out that if I ran `make` second times, it shows different error messages: {{{ Configuring ghc-pkg-6.9... [312/1603] "/opt/ghc/8.2.1/bin/ghc" -hisuf hi -osuf o -hcsuf hc -static -O0 -H64m -Wall -package-db libraries/bootstrapping.conf -hide-all-packages -i -iutil s/ghc-pkg/. -iutils/ghc-pkg/dist/build -Iutils/ghc-pkg/dist/build -iutils /ghc-pkg/dist/build/ghc-pkg/autogen -Iutils/ghc-pkg/dist/build/ghc- pkg/autogen -optP-DWITH_TERMINFO -optP-include -optPutils/ghc-pkg/dist/build/ghc- pkg/autogen/cabal_macros.h -package-id base-4.10.0.0 -package-id directory-1.3 .0.2 -package-id process-1.6.1.0 -package-id containers-0.5.10.2 -package- id filepath-1.4.1.2 -package-id Cabal-2.2.0.0 -package-id binary-0.8.5.1 -pac kage-id ghc-boot-8.4.1 -package-id bytestring-0.10.8.2 -package-id terminfo-0.4.1.1-package-id unix-2.7.2.2 -XHaskell2010 -no-user-package- db -rtsopts -odir utils/ghc-pkg/dist/build -hidir utils/ghc-pkg/dist/build -stubdir utils/ghc-pkg/dist/build -c utils/ghc-pkg/./Main.hs -o utils /ghc-pkg /dist/build/Main.o utils/ghc-pkg/Main.hs:30:1: error: Could not find module ‘Version’ Use -v to see a list of the files searched for. | 30 | import Version ( version, targetOS, targetARCH ) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:31:1: error: Could not find module ‘GHC.PackageDb’ There are files missing in the ‘ghc-boot-8.4.1’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 31 | import qualified GHC.PackageDb as GhcPkg | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:32:1: error: Could not find module ‘GHC.PackageDb’ There are files missing in the ‘ghc-boot-8.4.1’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 32 | import GHC.PackageDb (BinaryStringRep(..)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:33:1: error: Could not find module ‘Distribution.Simple.PackageIndex’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 33 | import qualified Distribution.Simple.PackageIndex as PackageIndex [272/1603] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:35:1: error: Could not find module ‘Distribution.ModuleName’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 35 | import qualified Distribution.ModuleName as ModuleName | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:36:1: error: Could not find module ‘Distribution.ModuleName’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 36 | import Distribution.ModuleName (ModuleName) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:37:1: error: Could not find module ‘Distribution.InstalledPackageInfo’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 37 | import Distribution.InstalledPackageInfo as Cabal | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:38:1: error: Could not find module ‘Distribution.Compat.ReadP’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 38 | import Distribution.Compat.ReadP hiding (get) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:39:1: error: Could not find module ‘Distribution.ParseUtils’ [232/1603] There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 39 | import Distribution.ParseUtils | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:40:1: error: Could not find module ‘Distribution.Package’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 40 | import Distribution.Package hiding (installedUnitId) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:41:1: error: Could not find module ‘Distribution.Text’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 41 | import Distribution.Text | ^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:42:1: error: Could not find module ‘Distribution.Version’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 42 | import Distribution.Version | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:43:1: error: Could not find module ‘Distribution.Backpack’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | [192/1603] 43 | import Distribution.Backpack | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:44:1: error: Could not find module ‘Distribution.Types.UnqualComponentName’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 44 | import Distribution.Types.UnqualComponentName | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:45:1: error: Could not find module ‘Distribution.Types.MungedPackageName’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 45 | import Distribution.Types.MungedPackageName | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:46:1: error: Could not find module ‘Distribution.Types.MungedPackageId’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 46 | import Distribution.Types.MungedPackageId | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/Main.hs:47:1: error: Could not find module ‘Distribution.Simple.Utils’ There are files missing in the ‘Cabal-2.2.0.0’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 47 | import Distribution.Simple.Utils (fromUTF8BS, toUTF8BS, writeUTF8File, readUTF8File) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [153/1603] utils/ghc-pkg/Main.hs:96:1: error: Could not find module ‘System.Console.Terminfo’ There are files missing in the ‘terminfo-0.4.1.1’ package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. | 96 | import System.Console.Terminfo as Terminfo | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utils/ghc-pkg/ghc.mk:70: recipe for target 'utils/ghc- pkg/dist/build/Main.o' failed make[1]: *** [utils/ghc-pkg/dist/build/Main.o] Error 1 Makefile:122: recipe for target 'all' failed make: *** [all] Error 2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14926#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14926: failed to build cross-compiler -------------------------------------+------------------------------------- Reporter: rueshyna | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.1 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by angerman): That sounds very suspect. I did not build with the docker image, I might get a chance to do so tomorrow. I usually built on macOS. Could you post the final output of the `./configure` call in the meantime? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14926#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14926: failed to build cross-compiler -------------------------------------+------------------------------------- Reporter: rueshyna | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.1 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rueshyna): Thanks for help! Here you are. The output of `./configure` https://gist.github.com/rueshyna/99cb26289e8a631c1cccb6a1e2b79cea Please let me know if you need any other information. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14926#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14926: failed to build cross-compiler -------------------------------------+------------------------------------- Reporter: rueshyna | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.4.1 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by denisshevchenko): I have exactly the same error. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14926#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC