[racket] openGL on Mac OS

From: Petr Samarin (petrsamarin at gmail.com)
Date: Wed Jun 27 09:04:43 EDT 2012

FFI bindings for openGL do not work when "glu-lib" and "gl-lib" in gl.rkt are linked to Apple's own openGL libraries in:
"/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL"
"/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU"

Any use of functions provided by (require sgl) library results in segmentation fault:
"Process scheme segmentation fault: 11"

And a crash report:
"
...
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
...
"

By linking the gl.rkt openGL from mac ports:
"/opt/local/lib/libGL"
"/opt/local/lib/libGLU"

the library works again.

What might be the cause for this?



Posted on the users mailing list.