
[Forwarded to the HOpenGL list, because it might be of general interest] Am Friday 07 August 2009 08:06:04 schrieben Sie:
Sven,
I got this working by *removing* GL from the line extra-libraries: GL in the *cabal file.
It seems to work with this change. Perhaps GL is needed for another build method?
Thank you for doing the hard work with OpenGL and OpenGLRaw, that lets us experiment with our ChalkBoard accelerator.
Andy
Begin forwarded message:
From: Andy Gill
Date: August 6, 2009 10:53:37 PM CDT To: Sven Panne Cc: Kevin Matlage Subject: OpenGLRaw Hi Sven,
I get the following error when trying to include OpenGLRaw, as build out of the box.
$ cat Main.hs import Graphics.Rendering.OpenGL.Raw
main = print "Hello" $ ghc --make Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... ld: library not found for -lGL collect2: ld returned 1 exit status
*Any* ideas? I'm stuck. I've got a OSX 10.5. Are there any gotyas I should know about?
Andy Gill
Andy Gill,
Assistant Professor The University of Kansas, EECS Department Information and Telecommunication Technology Center
Is this generally the case for Mac OS X users? If yes, the extra-libraries line should be excluded in the Cabal file for this platform. Have others experienced the same problem? Reports would be nice, regardless if things work or not... Cheers, S.

Am Montag, 10. August 2009 19:55:24 schrieb Sven Panne:
[...] Is this generally the case for Mac OS X users? If yes, the extra-libraries line should be excluded in the Cabal file for this platform. Have others experienced the same problem? Reports would be nice, regardless if things work or not...
Just another idea from a different email: Perhaps "-framework OpenGL" is missing for Mac OS X? It would be nice to hear what the right fix is, I don't have access to any Macs... Cheers, S.

Am Montag, 10. August 2009 20:03:53 schrieb Sven Panne:
Am Montag, 10. August 2009 19:55:24 schrieb Sven Panne:
[...] Is this generally the case for Mac OS X users? If yes, the extra-libraries line should be excluded in the Cabal file for this platform. Have others experienced the same problem? Reports would be nice, regardless if things work or not...
Just another idea from a different email: Perhaps "-framework OpenGL" is missing for Mac OS X? It would be nice to hear what the right fix is, I don't have access to any Macs...
Hmmm, no replies yet... So I'd like to The OpenGLRaw.cabal obviously needs some tweaks on Mac OS X, but it is not clear for me what to do. Should a) the "extra-libraries: GL" line be removed for the "os(darwin)" case? b) a "frameworks: OpenGL" line be added? What is the right way to fix things? a) alone? b) alone? Or both a) and b)? Feedback would be highly appreciated, because I don't have access to Macs. Cheers, S.

Sven Panne wrote:
Just another idea from a different email: Perhaps "-framework OpenGL" is missing for Mac OS X? It would be nice to hear what the right fix is, I don't have access to any Macs...
Hmmm, no replies yet... So I'd like to The OpenGLRaw.cabal obviously needs some tweaks on Mac OS X, but it is not clear for me what to do. Should
a) the "extra-libraries: GL" line be removed for the "os(darwin)" case?
b) a "frameworks: OpenGL" line be added?
What is the right way to fix things? a) alone? b) alone? Or both a) and b)? Feedback would be highly appreciated, because I don't have access to Macs.
Sven, For what it is worth, I built OpenGLRaw on my Mac (OSX 10.5.8) by simply removing the "extra-libraries: GL" line from the Cabal file - it was not necessary to add anything else. If you leave the extra-libraries directive in the Cabal file, you can still build, if you must then provide explicit paths to the include and lib dirs, i.e.: runhaskell Setup.hs configure --extra-include-dirs=/System/Library/Frameworks/OpenGL.framework/Headers/ --extra-lib-dirs=/System/Library/Frameworks/OpenGL.framework/Libraries I tried adding "frameworks: OpenGL" to the Cabal file, but this made no difference, the configure step still complained about missing GL libraries. This surprised me, in that I expected cabal to work with the OSX framework mechanism. But I'm not an expert on either Mac frameworks or cabal - the above are simply what I've used and observed. regards, David -- Dr. David Duke E: djd@comp.leeds.ac.uk School of Computing W: www.comp.leeds.ac.uk/djd/ University of Leeds T: +44 113 3436800 Leeds, LS2 9JT, U.K.

Am Sonntag, 16. August 2009 17:25:36 schrieb Sven Panne:
Hmmm, no replies yet... So I'd like to The OpenGLRaw.cabal obviously needs some tweaks on Mac OS X, but it is not clear for me what to do. Should
a) the "extra-libraries: GL" line be removed for the "os(darwin)" case?
b) a "frameworks: OpenGL" line be added?
What is the right way to fix things? a) alone? b) alone? Or both a) and b)? Feedback would be highly appreciated, because I don't have access to Macs.
Although personally I think that b) might be better, there seems to be a tendency that a) is the right way for Mac OS X users. What about the GLURaw package? It has basically the same structure, so the same question arises there: Should the line "extra-libraries: GLU" be removed from GLURaw.cabal for the "os(darwin)" case? I guess that this is the case, otherwise things would be quite obscure. As always, feedback is highly appreciated. Cheers, S.
participants (2)
-
David Duke
-
Sven Panne