Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,248
    • Issues 5,248
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 564
    • Merge requests 564
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #9712
Closed
Open
Issue created Oct 21, 2014 by gintas@trac-gintas

package "primitive" fails to install under msys2-i686 (Windows)

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?

Edited Mar 09, 2019 by gintas
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking