首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >OpenGL-2.9.2.0无法使用ghc 7.10.1进行编译

OpenGL-2.9.2.0无法使用ghc 7.10.1进行编译
EN

Stack Overflow用户
提问于 2015-05-31 23:30:58
回答 1查看 70关注 0票数 1

知道是什么原因造成的吗?怎样才能修复它呢?

代码语言:javascript
运行
复制
joco@vm001:~$ cabal install hsqml-demo-samples
Resolving dependencies...
Configuring OpenGL-2.9.2.0...
Building OpenGL-2.9.2.0...
Failed to install OpenGL-2.9.2.0
Build log ( /home/joco/.cabal/logs/OpenGL-2.9.2.0.log ):
Configuring OpenGL-2.9.2.0...
Building OpenGL-2.9.2.0...
Preprocessing library OpenGL-2.9.2.0...
[  1 of 117] Compiling Graphics.Rendering.OpenGL.GL.VertexAttributes ( Graphics/Rendering/OpenGL/GL/VertexAttributes.hs, dist/build/Graphics/Rendering/OpenGL/GL/VertexAttributes.o )

Graphics/Rendering/OpenGL/GL/VertexAttributes.hs:25:1: Warning:
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
[  2 of 117] Compiling Graphics.Rendering.OpenGL.GL.Texturing.Filter ( Graphics/Rendering/OpenGL/GL/Texturing/Filter.hs, dist/build/Graphics/Rendering/OpenGL/GL/Texturing/Filter.o )
[  3 of 117] Compiling Graphics.Rendering.OpenGL.GL.PointParameter ( Graphics/Rendering/OpenGL/GL/PointParameter.hs, dist/build/Graphics/Rendering/OpenGL/GL/PointParameter.o )
[  4 of 117] Compiling Graphics.Rendering.OpenGL.GL.PixelFormat ( Graphics/Rendering/OpenGL/GL/PixelFormat.hs, dist/build/Graphics/Rendering/OpenGL/GL/PixelFormat.o )
[  5 of 117] Compiling Graphics.Rendering.OpenGL.GL.ComparisonFunction ( Graphics/Rendering/OpenGL/GL/ComparisonFunction.hs, dist/build/Graphics/Rendering/OpenGL/GL/ComparisonFunction.o )
[  6 of 117] Compiling Graphics.Rendering.OpenGL.GL.BlendingFactor ( Graphics/Rendering/OpenGL/GL/BlendingFactor.hs, dist/build/Graphics/Rendering/OpenGL/GL/BlendingFactor.o )
[  7 of 117] Compiling Graphics.Rendering.OpenGL.GL.Texturing.PixelInternalFormat ( Graphics/Rendering/OpenGL/GL/Texturing/PixelInternalFormat.hs, dist/build/Graphics/Rendering/OpenGL/GL/Texturing/PixelInternalFormat.o )
[  8 of 117] Compiling Graphics.Rendering.OpenGL.GL.FramebufferObjects.FramebufferTarget ( Graphics/Rendering/OpenGL/GL/FramebufferObjects/FramebufferTarget.hs, dist/build/Graphics/Rendering/OpenGL/GL/FramebufferObjects/FramebufferTarget.o )
[  9 of 117] Compiling Graphics.Rendering.OpenGL.GL.BufferMode ( Graphics/Rendering/OpenGL/GL/BufferMode.hs, dist/build/Graphics/Rendering/OpenGL/GL/BufferMode.o )
[ 10 of 117] Compiling Graphics.Rendering.OpenGL.GL.IOState ( Graphics/Rendering/OpenGL/GL/IOState.hs, dist/build/Graphics/Rendering/OpenGL/GL/IOState.o )

Graphics/Rendering/OpenGL/GL/IOState.hs:32:10:
    No instance for (Applicative (IOState s))
      arising from the superclasses of an instance declaration
    In the instance declaration for ‘Monad (IOState s)’

Graphics/Rendering/OpenGL/GL/IOState.hs:45:4:
    Could not deduce (Applicative (IOState a))
      arising from a do statement
    from the context (Storable a)
      bound by the type signature for
                 peekIOState :: Storable a => IOState a a
      at Graphics/Rendering/OpenGL/GL/IOState.hs:43:16-40
    In a stmt of a 'do' block: ptr <- getIOState
    In the expression:
      do { ptr <- getIOState;
           x <- liftIOState $ peek ptr;
           putIOState (ptr `plusPtr` sizeOf x);
           return x }
    In an equation for ‘peekIOState’:
        peekIOState
          = do { ptr <- getIOState;
                 x <- liftIOState $ peek ptr;
                 putIOState (ptr `plusPtr` sizeOf x);
                 .... }

Graphics/Rendering/OpenGL/GL/IOState.hs:57:12:
    Could not deduce (Applicative (IOState b))
      arising from a use of ‘replicateM’
    from the context (Integral a)
      bound by the type signature for
                 nTimes :: Integral a => a -> IOState b c -> IOState b [c]
      at Graphics/Rendering/OpenGL/GL/IOState.hs:56:11-57
    In the expression: replicateM (fromIntegral n)
    In an equation for ‘nTimes’: nTimes n = replicateM (fromIntegral n)
cabal: Error: some packages failed to install:
OpenGL-2.9.2.0 failed during the building phase. The exception was:
ExitFailure 1
hsqml-demo-samples-0.3.3.0 depends on OpenGL-2.9.2.0 which failed to install.
EN

回答 1

Stack Overflow用户

发布于 2015-05-31 23:53:31

好的,这只适用于旧版本的OpenGL。较新的版本应该可以构建。https://travis-ci.org/haskell-opengl/OpenGL

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30559182

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档