
#9712: package "primitive" fails to install under msys2-i686 (Windows) ---------------------------------------+--------------------------- Reporter: gintas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: None | Version: 7.9 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ---------------------------------------+--------------------------- Description changed by gintas: Old description:
If you follow the instructions for a 32-bit installation at https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows, installation of alex fails. Not sure if this is an issue with alex or with the environment. Transcript:
$ cabal install alex Resolving dependencies... Downloading primitive-0.5.4.0... Configuring primitive-0.5.4.0... Failed to install primitive-0.5.4.0 Build log ( C:\Users\Gintas\AppData\Roaming\cabal\logs\primitive-0.5.4.0.log ): [1 of 1] Compiling Main ( C:\Users\Gintas\Downloads\msys32\tmp\primitive-0.5.4.0-2404\primitive-0.5.4.0\dist\setup\setup.hs, C:\Users\Gintas\Downloads\msys32\tmp\primitive-0.5.4.0-2404\primitive-0.5.4.0\dist\setup\Main.o ) Linking C:\Users\Gintas\Downloads\msys32\tmp\primitive-0.5.4.0-2404\primitive-0.5.4.0\dist\setup\setup.exe ... Configuring primitive-0.5.4.0... setup-Simple-Cabal-1.18.1.3-i386-windows-ghc-7.8.3.exe: Missing dependency on a foreign library: * Missing (or bad) header file: primitive-memops.h This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. If the header file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages.
The primitive-memops.h file seems to be part of "primitive" itself.
Passing in -v3 does not print anything interesting.
$ cabal --version cabal-install version 1.20.0.3 using version 1.20.0.1 of the Cabal library
$ cabal get primitive && cd primitive-* && cabal configure && cabal build Unpacking to primitive-0.5.4.0\ Resolving dependencies... Configuring primitive-0.5.4.0... Building primitive-0.5.4.0... Preprocessing library primitive-0.5.4.0... [ 1 of 10] Compiling Data.Primitive.Internal.Compat ( Data\Primitive\Internal\Compat.hs, dist\build\Data\Primitive\Internal\Compat.o ) [ 2 of 10] Compiling Data.Primitive.MachDeps ( Data\Primitive\MachDeps.hs, dist\build\Data\Primitive\MachDeps.o ) [ 3 of 10] Compiling Data.Primitive.Internal.Operations ( Data\Primitive\Internal\Operations.hs, dist\build\Data\Primitive\Internal\Operations.o ) [ 4 of 10] Compiling Control.Monad.Primitive ( Control\Monad\Primitive.hs, dist\build\Control\Monad\Primitive.o ) [ 5 of 10] Compiling Data.Primitive.Types ( Data\Primitive\Types.hs, dist\build\Data\Primitive\Types.o ) [ 6 of 10] Compiling Data.Primitive.Array ( Data\Primitive\Array.hs, dist\build\Data\Primitive\Array.o )
Data\Primitive\Array.hs:32:1: Warning: The import of `Control.Monad.ST' is redundant except perhaps to import instances from `Control.Monad.ST' To import instances alone, use: import Control.Monad.ST() [ 7 of 10] Compiling Data.Primitive.ByteArray ( Data\Primitive\ByteArray.hs, dist\build\Data\Primitive\ByteArray.o ) [ 8 of 10] Compiling Data.Primitive.Addr ( Data\Primitive\Addr.hs, dist\build\Data\Primitive\Addr.o ) [ 9 of 10] Compiling Data.Primitive ( Data\Primitive.hs, dist\build\Data\Primitive.o ) [10 of 10] Compiling Data.Primitive.MutVar ( Data\Primitive\MutVar.hs, dist\build\Data\Primitive\MutVar.o ) In-place registering primitive-0.5.4.0...
Any idea what's missing here?
New description: If you follow the instructions for a 32-bit installation at https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows, installation of alex fails. Not sure if this is an issue with alex or with the environment. Transcript: {{{ $ cabal install alex Resolving dependencies... Downloading primitive-0.5.4.0... Configuring primitive-0.5.4.0... Failed to install primitive-0.5.4.0 Build log ( C:\Users\Gintas\AppData\Roaming\cabal\logs\primitive-0.5.4.0.log ): [1 of 1] Compiling Main ( C:\Users\Gintas\Downloads\msys32\tmp\primitive-0.5.4.0-2404\primitive-0.5.4.0\dist\setup\setup.hs, C:\Users\Gintas\Downloads\msys32\tmp\primitive-0.5.4.0-2404\primitive-0.5.4.0\dist\setup\Main.o ) Linking C:\Users\Gintas\Downloads\msys32\tmp\primitive-0.5.4.0-2404\primitive-0.5.4.0\dist\setup\setup.exe ... Configuring primitive-0.5.4.0... setup-Simple-Cabal-1.18.1.3-i386-windows-ghc-7.8.3.exe: Missing dependency on a foreign library: * Missing (or bad) header file: primitive-memops.h This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version). If the library is already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where it is. If the header file does exist, it may contain errors that are caught by the C compiler at the preprocessing stage. In this case you can re-run configure with the verbosity flag -v3 to see the error messages. }}} The primitive-memops.h file seems to be part of "primitive" itself. Passing in -v3 does not print anything interesting. {{{ $ cabal --version cabal-install version 1.20.0.3 using version 1.20.0.1 of the Cabal library $ cabal get primitive && cd primitive-* && cabal configure && cabal build Unpacking to primitive-0.5.4.0\ Resolving dependencies... Configuring primitive-0.5.4.0... Building primitive-0.5.4.0... Preprocessing library primitive-0.5.4.0... [ 1 of 10] Compiling Data.Primitive.Internal.Compat ( Data\Primitive\Internal\Compat.hs, dist\build\Data\Primitive\Internal\Compat.o ) [ 2 of 10] Compiling Data.Primitive.MachDeps ( Data\Primitive\MachDeps.hs, dist\build\Data\Primitive\MachDeps.o ) [ 3 of 10] Compiling Data.Primitive.Internal.Operations ( Data\Primitive\Internal\Operations.hs, dist\build\Data\Primitive\Internal\Operations.o ) [ 4 of 10] Compiling Control.Monad.Primitive ( Control\Monad\Primitive.hs, dist\build\Control\Monad\Primitive.o ) [ 5 of 10] Compiling Data.Primitive.Types ( Data\Primitive\Types.hs, dist\build\Data\Primitive\Types.o ) [ 6 of 10] Compiling Data.Primitive.Array ( Data\Primitive\Array.hs, dist\build\Data\Primitive\Array.o ) Data\Primitive\Array.hs:32:1: Warning: The import of `Control.Monad.ST' is redundant except perhaps to import instances from `Control.Monad.ST' To import instances alone, use: import Control.Monad.ST() [ 7 of 10] Compiling Data.Primitive.ByteArray ( Data\Primitive\ByteArray.hs, dist\build\Data\Primitive\ByteArray.o ) [ 8 of 10] Compiling Data.Primitive.Addr ( Data\Primitive\Addr.hs, dist\build\Data\Primitive\Addr.o ) [ 9 of 10] Compiling Data.Primitive ( Data\Primitive.hs, dist\build\Data\Primitive.o ) [10 of 10] Compiling Data.Primitive.MutVar ( Data\Primitive\MutVar.hs, dist\build\Data\Primitive\MutVar.o ) In-place registering primitive-0.5.4.0... }}} Any idea what's missing here? -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9712#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler