[GHC] #14077: libmingw32.a: Not x86_64 PEi386

#14077: libmingw32.a: Not x86_64 PEi386 -------------------------------------+------------------------------------- Reporter: YoYoYonnY | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Keywords: | Operating System: Windows Architecture: x86_64 | Type of failure: Installing GHC (amd64) | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- After a fresh installation of the Haskell Platform (on Windows), I received the following error: {{{
ghci GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help ghc.exe: D:/MinGW/bin/../lib/libmingw32.a: Not x86_64 PEi386 ghc.exe: internal error: loadArchive: error whilst reading `D:/MinGW/bin/../lib/libmingw32.a' (GHC version 8.0.2 for x86_64_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. }}} Invoking GHC will instead error with a bunch of GCC error messages related to standard C library headers (multiple definitions of {{{time_t}}}, etc.). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14077 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14077: libmingw32.a: Not x86_64 PEi386 -------------------------------------+------------------------------------- Reporter: YoYoYonnY | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: Operating System: Windows | Architecture: x86_64 Type of failure: Installing GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): `ghc.exe: D:/MinGW/bin/../lib/libmingw32.a: Not x86_64 PEi386` This path doesn't look like it's the one bundled with Platform. This looks like you have a 32-bit MinGW install on your PATH, which makes findFiles return that `libmingw32.a` instead of the ones bundled with GHC. It's even more suspicious that calling GHC fails with GCC errors about standard headers... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14077#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14077: libmingw32.a: Not x86_64 PEi386 -------------------------------------+------------------------------------- Reporter: YoYoYonnY | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: Operating System: Windows | Architecture: x86_64 Type of failure: Installing GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by YoYoYonnY): Is there a way to have Haskell ignore my environment variables and my MinGW installation, then, and if not, shouldn't there be? Unfortunately, installing Haskell Platform for 32 bits doesn't work, and neither would I prefer to do so. Haskell ships with a different version of GCC, for starters. I might look into MinGW-w64 but from my experience, it's not nearly as easy to install as MinGW is. Removing the following from my environment variables ''does'' makes Haskell work: {{{ LIBRARY_PATH=D:\MinGW\bin;%LIBRARY_PATH% INCLUDE_PATH=D:\MinGW\include;%INCLUDE_PATH% }}} However, it makes other programs fail (to compile, but also to run). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14077#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14077: libmingw32.a: Not x86_64 PEi386 -------------------------------------+------------------------------------- Reporter: YoYoYonnY | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: invalid | Keywords: Operating System: Windows | Architecture: x86_64 Type of failure: Installing GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * status: new => closed * resolution: => invalid Comment: The compiler will only do what you tell it to. As such it follows the standard search path to find dependencies. You're globally modifying your library directories and so telling it to look there, it's doing just that. I believe platform also provides an msys2 shell, you can configure that not to inherit your environment values or remove them in your bash profile. You can try reporting this to https://github.com/haskell/haskell-platform but I can't speak for them whether this is a bug or not. They likely don't want to modify your global environment by default in a heavy handed way. But this is just a configuration issue. Setting `LIBRARY_PATH` will affect all GCC's on the machine if you set it globally. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14077#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC