Problem installing GLFW-0.4.2 on WinXP x86 32-bit using cabal

Sönke Hahn soenkehahn at gmail.com
Tue Jan 17 13:38:50 GMT 2012


Hi!

On 01/17/2012 08:52 AM, Michael Chin wrote:
> Hi, 
>  I noticed another posted here about issues installing GLFW and was
> wondering if someone could help me resolve why I am unable to build
> GLFW. I'm required to install GLFW for a class assignment. Any
> suggestions or help would be greatly appreciated. Thanks.
> 
> Here is the console output:
> $ cabal install GLFW
> Resolving dependencies...
> Configuring GLFW-0.4.2...
> Preprocessing library GLFW-0.4.2...
> Building GLFW-0.4.2...
> [1 of 1] Compiling Graphics.UI.GLFW ( Graphics\UI\GLFW.hs,
> dist\build\Graphics\UI\GLFW.o )
> 
> Graphics\UI\GLFW.hs:1002:24:
>     Ambiguous occurrence `unsafePerformIO'
>     It could refer to either `Foreign.unsafePerformIO',
>                              imported from Foreign at
> Graphics\UI\GLFW.hs:85:1-14
>                           or `System.IO.Unsafe.unsafePerformIO',
>                              imported from System.IO.Unsafe at
> Graphics\UI\GLFW.hs:89:1-23
> 
> ....
> 
> (More of the same errors)
> 
> ....
> 
> cabal.exe: Error: some packages failed to install:
> GLFW-0.4.2 failed during the building phase. The exception was:
> ExitFailure 1
> 
> Is there something wrong with my environment? 

No, I don't think so. I don't understand, why ghc thinks
'Foreign.unsafePerformIO' and 'System.IO.Unsafe.unsafePerformIO' are
different entities (the former should be a re-export of the latter), but
you can probably fix it in the code by changing the
Foreign-import-statement to:

import Foreign hiding (unsafePerformIO)

or something along those lines.

HTH,
Sönke

> 
> Environment:
> WinXP x86 
> Cygwin
> 
> $ ghc --version
> The Glorious Glasgow Haskell Compilation System, version 7.2.2
> 
> $ cabal --version
> cabal-install version 0.10.2
> using version 1.10.2.0 of the Cabal library
> 
> Thanks in advance,
>  Michael
> 
> 
> -- 
> Michael G. Chin
> 858.863.7584
> mgchin at gmail.com <mailto:mgchin at gmail.com>
> 
> 
> _______________________________________________
> GLFW mailing list
> GLFW at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/glfw

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://projects.haskell.org/pipermail/glfw/attachments/20120117/8279dc78/attachment.pgp>


More information about the GLFW mailing list