You are not logged in.

#1 2016-03-30 04:44:31

tmoore1984
New Member
Registered: 2016-03-30
Posts: 3

installing libghc-opengl

I'd like to follow a tutorial of using openGL with GHC Haskell, but I am running into dependency issues. I know some things about Linux and Debian, but I don't want to #$#% up my computer so I decided I would just ask. I hope that I just need a quick lesson in installing old versions of stuff without dragging in too many outdated dependencies. Here we go.

So Cabal acts as a library manager for Haskell. I don't know how it interacts with APT but I think that there's some redundancy.

$ cabal install opengl
Resolving dependencies...
Downloading OpenGLRaw-2.6.1.1...
Configuring OpenGLRaw-2.6.1.1...
cabal: Missing dependency on a foreign library:
* Missing C library: GL
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.
Failed to install OpenGLRaw-2.6.1.1
cabal: Error: some packages failed to install:
GLURaw-1.5.0.3 depends on OpenGLRaw-2.6.1.1 which failed to install.
OpenGL-2.13.2.1 depends on OpenGLRaw-2.6.1.1 which failed to install.
OpenGLRaw-2.6.1.1 failed during the configure step. The exception was:
ExitFailure 1

So I saw this nifty-looking package in apt-cache, but it wouldn't happen either.

$ sudo apt-get install libghc-opengl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libghc-opengl-dev : Depends: libghc-gluraw-dev-1.3.0.0-9f9cf
                     Depends: libghc-openglraw-dev-1.3.0.0-3fbff
N: Ignoring file '50unattended-upgrades.ucf-old' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Unable to correct problems, you have held broken packages.

So I tried installing one of the listed dependencies, just to see what the error would say.

sudo apt-get install libghc-gluraw-dev-1.3.0.0-9f9cf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libghc-gluraw-dev' instead of 'libghc-gluraw-dev-1.3.0.0-9f9cf'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libghc-gluraw-dev : Depends: libghc-openglraw-dev-1.3.0.0-3fbff
                     Depends: libglu1-mesa-dev but it is not going to be installed
N: Ignoring file '50unattended-upgrades.ucf-old' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Unable to correct problems, you have held broken packages.

Here's my sources.list and preferences files, warts and all.


$ cat /etc/apt/sources.list
## CRUNCHBANG
## Compatible with Debian Wheezy, but use at your own risk.
## deb http://packages.crunchbang.org/waldorf waldorf main
# deb-src http://packages.crunchbang.org/waldorf waldorf main

## DEBIAN
deb http://http.debian.net/debian jessie main contrib non-free
# deb-src http://http.debian.net/debian wheezy main contrib non-free
deb http://http.debian.net/debian wheezy main contrib non-free

# /etc/apt/sources.list :
deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.us.debian.org/debian/ squeeze main contrib non-free

# /etc/apt/sources.list :
deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free

## DEBIAN SECURITY
deb http://security.debian.org/ jessie/updates main
# deb-src http://security.debian.org/ wheezy/updates main

# Testing repository - main, contrib and non-free branches

deb http://http.us.debian.org/debian testing main non-free contrib

deb-src http://http.us.debian.org/debian testing main non-free contrib

# Testing security updates repository

deb http://security.debian.org/ testing/updates main contrib non-free

deb-src http://security.debian.org/ testing/updates main contrib non-free

# Unstable repo main, contrib and non-free branches, no security updates here

deb http://http.us.debian.org/debian unstable main non-free contrib

deb-src http://http.us.debian.org/debian unstable main non-free contrib

deb http://deb.i2p2.no/ stable main
deb-src http://deb.i2p2.no/ stable main

# #!++ Hydrogen
deb http://pkg.bunsenlabs.org/debian bunsen-hydrogen main
deb http://pkg.bunsenlabs.org/debian jessie-backports main
$ cat /etc/apt/preferences
Package: *
Pin: release a=jessie
Pin-Priority: 900

Package: *
Pin: release a=testing
Pin-Priority: -10

Package: *
Pin: release a=unstable
Pin-Priority: -10

Package: *
Pin: release a=bunsen-hydrogen
Pin-Priority: 900

Package: *
Pin: release a=wheezy
Pin-Priority: -10

Package: *
Pin: release a=squeeze
Pin-Priority: -10

Package: *
Pin: release a=stretch
Pin-Priority: -10

???

Offline

#2 2016-03-30 04:48:56

tmoore1984
New Member
Registered: 2016-03-30
Posts: 3

Re: installing libghc-opengl

I wanted to add, that I had some similar issues trying to install Theano yesterday. I am hoping that I learn some general stuff here that will help me to fix those as well.

Offline

#3 2016-03-30 07:54:10

xaos52
The Good Doctor
From: Planet of the @pes
Registered: 2015-09-30
Posts: 695

Re: installing libghc-opengl

'Just Works' for me with bl RC2:

 /h/me apt-cache search cabal
cabal-debian - Create a debianization for a cabal package
debdry - Semi-assisted automatic Debian packaging
fortunes-fr - French fortunes cookies
ghc - The Glasgow Haskell Compilation system
ghc-doc - Documentation for the Glasgow Haskell Compilation system
ghc-prof - Profiling libraries for the Glasgow Haskell Compilation system
libghc-cabal-dev - Framework for packaging Haskell software
libghc-cabal-doc - Framework for packaging Haskell software; documentation
libghc-cabal-prof - Framework for packaging Haskell software; profiling libraries
libghc-cabal-file-th-dev - TH expressions for reading fields from a project's cabal file
libghc-cabal-file-th-doc - TH expressions for reading fields from a project's cabal file; documentation
libghc-cabal-file-th-prof - TH expressions for reading fields from a project's cabal file; profiling libraries
cabal-install - command-line interface for Cabal and Hackage
libghc-cmdargs-dev - command-line argument processing
libghc-cmdargs-doc - command-line argument processing; documentation
libghc-cmdargs-prof - command-line argument processing; profiling libraries
haskell-devscripts - Tools to help Debian developers build Haskell packages
libghc-monad-control-dev - Monad transformers to lift control operations
libghc-monad-control-doc - Monad transformers to lift control operations; documentation
libghc-monad-control-prof - Monad transformers to lift control operations; profiling libraries
libghc-quickcheck-instances-dev - common QuickCheck instances
libghc-quickcheck-instances-doc - common QuickCheck instances; documentation
libghc-quickcheck-instances-prof - common QuickCheck instances; profiling libraries
libghc-temporary-dev - Temporary files and directories
libghc-temporary-doc - Temporary files and directories; documentation
libghc-temporary-prof - Temporary files and directories; profiling libraries
libghc-uuagc-cabal-dev - Cabal plugin for UUAGC
libghc-uuagc-cabal-doc - Cabal plugin for UUAGC; documentation
libghc-uuagc-cabal-prof - Cabal plugin for UUAGC; profiling libraries
libhugs-cabal-bundled - A framework for packaging Haskell software
 /h/me aptinst cabal-install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
   ghc (7.6.3-21)
   libgmp-dev (6.0.0+dfsg-6)
   libgmpxx4ldbl (6.0.0+dfsg-6)
Suggested packages:
   ghc-prof (7.6.3-21)
   ghc-doc (7.6.3-21)
   haskell-doc (20061127)
   llvm (3.5-25)
   libgmp10-doc (6.0.0+dfsg-6)
   libmpfr-dev (3.1.2-2)
The following NEW packages will be installed:
   cabal-install (1.20.0.3-1)
   ghc (7.6.3-21)
   libgmp-dev (6.0.0+dfsg-6)
   libgmpxx4ldbl (6.0.0+dfsg-6)
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.6 MB of archives.
After this operation, 306 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 [url]http://httpredir.debian.org/debian/[/url] jessie/main libgmpxx4ldbl amd64 2:6.0.0+dfsg-6 [22.1 kB]
Get:2 [url]http://httpredir.debian.org/debian/[/url] jessie/main libgmp-dev amd64 2:6.0.0+dfsg-6 [621 kB]
Get:3 [url]http://httpredir.debian.org/debian/[/url] jessie/main ghc amd64 7.6.3-21 [25.3 MB]
Get:4 [url]http://httpredir.debian.org/debian/[/url] jessie/main cabal-install amd64 1.20.0.3-1 [1,588 kB]             
Fetched 27.6 MB in 18s (1,476 kB/s)                                                                         
Selecting previously unselected package libgmpxx4ldbl:amd64.
(Reading database ... 196586 files and directories currently installed.)
Preparing to unpack .../libgmpxx4ldbl_2%3a6.0.0+dfsg-6_amd64.deb ...
Unpacking libgmpxx4ldbl:amd64 (2:6.0.0+dfsg-6) ...
Selecting previously unselected package libgmp-dev:amd64.
Preparing to unpack .../libgmp-dev_2%3a6.0.0+dfsg-6_amd64.deb ...
Unpacking libgmp-dev:amd64 (2:6.0.0+dfsg-6) ...
Selecting previously unselected package ghc.
Preparing to unpack .../ghc_7.6.3-21_amd64.deb ...
Unpacking ghc (7.6.3-21) ...
Selecting previously unselected package cabal-install.
Preparing to unpack .../cabal-install_1.20.0.3-1_amd64.deb ...
Unpacking cabal-install (1.20.0.3-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libgmpxx4ldbl:amd64 (2:6.0.0+dfsg-6) ...
Setting up libgmp-dev:amd64 (2:6.0.0+dfsg-6) ...
Setting up ghc (7.6.3-21) ...
update-alternatives: using /usr/bin/runghc to provide /usr/bin/runhaskell (runhaskell) in auto mode
update-alternatives: using /usr/bin/ghc to provide /usr/bin/haskell-compiler (haskell-compiler) in auto mode
Setting up cabal-install (1.20.0.3-1) ...
Processing triggers for libc-bin (2.19-18+deb8u3) ...
 /h/me command -v cabal
/usr/bin/cabal
 /h/me cabal install opengl
Config file path source is default config file.
Config file /home/me/.cabal/config not found.
Writing default configuration to /home/me/.cabal/config
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
cabal: There is no package named 'opengl'.
You may need to run 'cabal update' to get the latest list of available
packages.
 /h/me cabal update
Downloading the latest package list from hackage.haskell.org
 /h/me cabal install opengl
Resolving dependencies...
Downloading half-0.2.2.3...
Downloading stm-2.4.4.1...
Downloading transformers-0.5.2.0...
Configuring half-0.2.2.3...
Downloading text-1.2.2.1...
Configuring stm-2.4.4.1...
Configuring transformers-0.5.2.0...
Configuring text-1.2.2.1...
Building half-0.2.2.3...
Building stm-2.4.4.1...
Building transformers-0.5.2.0...
Building text-1.2.2.1...
Installed half-0.2.2.3
Installed stm-2.4.4.1
Installed transformers-0.5.2.0
Downloading ObjectName-1.1.0.1...
Downloading StateVar-1.1.0.3...
Configuring StateVar-1.1.0.3...
Configuring ObjectName-1.1.0.1...
Building ObjectName-1.1.0.1...
Building StateVar-1.1.0.3...
Installed ObjectName-1.1.0.1
Installed StateVar-1.1.0.3
Installed text-1.2.2.1
Downloading OpenGLRaw-2.6.1.1...
Configuring OpenGLRaw-2.6.1.1...
Building OpenGLRaw-2.6.1.1...
Installed OpenGLRaw-2.6.1.1
Downloading GLURaw-1.5.0.3...
Configuring GLURaw-1.5.0.3...
Building GLURaw-1.5.0.3...
Installed GLURaw-1.5.0.3
Downloading OpenGL-2.13.2.1...
Configuring OpenGL-2.13.2.1...
Building OpenGL-2.13.2.1...
Installed OpenGL-2.13.2.1
 /h/me 

You may need to run

cabal update

Offline

#4 2016-04-01 07:52:15

tmoore1984
New Member
Registered: 2016-03-30
Posts: 3

Re: installing libghc-opengl

I should have said, I did an APT and Cabal update beforehand.

$ cabal update
Downloading the latest package list from hackage.haskell.org
teacat@vspace:~/documents/haskell$ cabal install opengl
Resolving dependencies...
Configuring OpenGLRaw-2.6.1.1...
cabal: Missing dependency on a foreign library:
* Missing C library: GL
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.
Failed to install OpenGLRaw-2.6.1.1
cabal: Error: some packages failed to install:
GLURaw-1.5.0.3 depends on OpenGLRaw-2.6.1.1 which failed to install.
OpenGL-2.13.2.1 depends on OpenGLRaw-2.6.1.1 which failed to install.
OpenGLRaw-2.6.1.1 failed during the configure step. The exception was:
ExitFailure 1

Last edited by tmoore1984 (2016-04-01 07:57:52)

Offline

Board footer

Powered by FluxBB