egonSchiele / chips

A clone of Chips Challenge in Haskell
Other
142 stars 14 forks source link

Cabal install fails #3

Closed ashishnegi closed 9 years ago

ashishnegi commented 10 years ago

This is the log error :

cabal install Resolving dependencies... Configuring OpenGLRaw-1.4.0.0... 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-1.4.0.0 cabal: Error: some packages failed to install: ActionKid-0.1.0.0 depends on OpenGLRaw-1.4.0.0 which failed to install. Chips-0.1.0.0 depends on OpenGLRaw-1.4.0.0 which failed to install. GLURaw-1.4.0.1 depends on OpenGLRaw-1.4.0.0 which failed to install. GLUT-2.5.1.1 depends on OpenGLRaw-1.4.0.0 which failed to install. OpenGL-2.8.0.0 depends on OpenGLRaw-1.4.0.0 which failed to install. OpenGLRaw-1.4.0.0 failed during the configure step. The exception was: ExitFailure 1 gloss-1.0.0.0 depends on OpenGLRaw-1.4.0.0 which failed to install. gloss-juicy-0.1.2 depends on OpenGLRaw-1.4.0.0 which failed to install.

I am using sandbox . I am new to haskell and just following guidelines about how to compile the projects.

It would be great if you put the steps in Readme.md

egonSchiele commented 9 years ago

You are running the right command, but you need OpenGL installed on your system first. From the error message:

This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version)

ardumont commented 9 years ago

Hello,

but you need OpenGL installed on your system first

Right.

It could also be that GL is installed but not found on your system. I had the problem for actionkid which is the main dependency here. I solved it by using cabal's extra options --extra-lib-dirs, --extra-include-dirs.

cabal install --extra-lib-dirs=/nix/store/mnhsckfydh097i747rsgxdrhlyv48vh1-glu-9.0.0/lib --extra-lib-dirs=/run/opengl-driver/lib --extra-lib-dirs=/nix/store/ffk2phimb6kgcn61jkx2hb5gm58qbdl6-freeglut-2.8.1/lib --extra-include-dirs=/nix/store/mnhsckfydh097i747rsgxdrhlyv48vh1-glu-9.0.0/include --extra-include-dirs=/run/opengl-driver/include --extra-include-dirs=/nix/store/ffk2phimb6kgcn61jkx2hb5gm58qbdl6-freeglut-2.8.1/include

(So for other beginners, this could help)

The path i used should be changed according to your platform...

Cheers,

Note For nix and nixos' users, this is not the right solution though... Use shell.nix..

egonSchiele commented 9 years ago

Thanks @ardumont ! I'm going to close this issue for now.