Closed iblech closed 9 years ago
The real question is: Why does cabal
decide to install an ancient gloss
version? OpenGL 2.6.* is only possible in the range gloss-1.7.6.6 .. gloss-1.7.8.2, and those versions are several years old. Probably you have some other packages installed which force old versions.
With a Haskell Platform 7.10.2-a and a fresh sandbox, doing a cabal update
followed by a cabal install gloss
just installs 3 new packages, including the latest gloss
:
To somehow simulate what happens on your side I tried
cabal install --constraint=OpenGL==2.6.* gloss
but cabal
doesn't find a build plan then. I'm a bit reluctant to change the constraint without being able to test it. Perhaps you have an old GHC, what does ghc-pkg list
print for you? Does adding --constraint=ObjectName==1.0.0.*
to your cabal
invocation work (without any other changes)?
Thanks for taking your time to look into this somewhat weird issue (which will probably not affect many users)! Indeed, on the particular system on which I performed this installation, the GHC is truly ancient: 7.4.1. This is straight from the repositories of Ubuntu 12.04. Cabal and cabal-install are up-to-date, though. See below for the package list.
Temporarily moving ~/.ghc
out of the way (as a brute-force method to temporarily unregister all user-installed packages) also allows to reconstruct the build plan (see below). This also shows that --constraint=ObjectName==1.0.0.*
would fairly probably work, although I didn't test it.
If you want to, I can nuke ~/.ghc
and ~/.cabal
(to restore a pristine Ubuntu 12.04), and actually try building gloss again with the constraint.
$ ghc-pkg list
Cabal-1.14.0
QuickCheck-1.2.0.1
QuickCheck-2.4.2
X11-1.5.0.1
X11-xft-0.3.1
array-0.4.0.0
base-4.5.0.0
bin-package-db-0.0.0.0
binary-0.5.1.0
bytestring-0.9.2.1
containers-0.4.2.1
deepseq-1.3.0.0
directory-1.1.0.2
dlist-0.5
extensible-exceptions-0.1.1.4
filepath-1.3.0.0
ghc-7.4.1
ghc-prim-0.2.0.0
haskell2010-1.1.0.1
haskell98-2.0.0.1
hoopl-3.8.7.3
hpc-0.5.1.1
integer-gmp-0.4.0.0
mtl-2.0.1.0
old-locale-1.0.0.4
old-time-1.1.0.0
pretty-1.1.1.0
process-1.1.0.1
random-1.0.1.1
rts-1.0
smallcheck-0.6
syb-0.3.6
template-haskell-2.7.0.0
time-1.4
transformers-0.2.2.0
unix-2.5.1.0
utf8-string-0.3.7
xmonad-0.10
xmonad-contrib-0.10
/home/iblech/.ghc/i386-linux-7.4.1/package.conf.d
Cabal-1.22.4.0
GLURaw-1.4.0.2
GLUT-2.3.1.0
HTTP-4000.2.20
ObjectName-1.0.0.0
ObjectName-1.0.1.1
OpenGL-2.6.0.1
OpenGLRaw-1.3.0.0
StateVar-1.0.1.1
Tensor-1.0.0.1
binary-0.5.1.1
bmp-1.2.3.4
bytestring-0.10.6.0
directory-1.2.3.1
frpnow-0.18
frpnow-gloss-0.12
gloss-1.7.7.201204.1
network-2.6.2.1
network-uri-2.6.0.3
parsec-3.1.9
process-1.2.3.0
stm-2.4.4
text-1.2.1.3
zlib-0.5.4.2
$ mv .ghc .ghc-bak
$ cabal --dry-run install gloss
Resolving dependencies...
In order, the following would be installed (use -v for more details):
ObjectName-1.0.1.1
OpenGLRaw-1.3.0.0
GLURaw-1.4.0.2
StateVar-1.0.1.1
Tensor-1.0.0.1
OpenGL-2.6.0.1
GLUT-2.3.1.0
bytestring-0.10.6.0
binary-0.5.1.1
bmp-1.2.3.4
gloss-1.7.7.201204.1
$ cabal --dry-run --constraint=ObjectName==1.0.0.* install gloss
Resolving dependencies...
In order, the following would be installed (use -v for more details):
ObjectName-1.0.0.0
OpenGLRaw-1.3.0.0
GLURaw-1.4.0.2
StateVar-1.0.1.1
Tensor-1.0.0.1
OpenGL-2.6.0.1
GLUT-2.3.1.0
bytestring-0.10.6.0
binary-0.5.1.1
bmp-1.2.3.4
gloss-1.7.7.201204.1
OK, and old GHC would explain things. I've updated the constraint for OpenGL-2.6.0.1 on Hackage, It would be great if you could do a cabal update && cabal install gloss
and report if things work now for you.
Thanks! Now it works out of the box, as it should. Your efforts are very much appreciated. :-)
In OpenGL-2.6.0.1, the version bound on ObjectName is too loose. It says
ObjectName (==1.0.*)
, while it should sayObjectName (==1.0.0.*)
. This is becausegenObjectNames
was a method of classObjectName
only in ObjectName 1.0.0.0 (and no longer in ObjectName 1.0.1.0).Apparently it's possible to retroactively change the dependency list in Hackage.
There is of course a bigger question: Why am I reporting this in 2015? OpenGL-2.6.0.1 was released in 2012. I don't know the deeper reason, but I can state for a fact that this version is what a (naive?)
cabal install gloss
just tried to install.