
Simon Marlow wrote:
Christian is having trouble compiling the HOpenGL in GHC 6.4 on Solaris. The symptom is a gcc crash when compiling Graphics.Rendering.OpenGL.GL.VertexSpec (see attached log). It fails with gcc 4.0.0 and 3.3.6.
Is there anything in that file that might cause gcc trouble, such as foreign calls to inline C functions maybe? Any guesses at a workaround?
I must admit that I am a bit clueless here. Google showed similar problems in various projects, but I haven't found a cure or the exact reason for this. Maybe we steal too many SPARC registers? But why does it only happen for this module? Perhaps Sun has still the bad habit of deviating from the standard and uses macros instead of function calls for some OpenGL entry points, see e.g.: http://docs.sun.com/app/docs/doc/805-1015/6j112onu7?a=view ftp://docs-pdf.sun.com/805-4445-12/805-4445-12.pdf Christian: Can you try to hack the Makefile to add -DSUN_OGL_NO_VERTEX_MACROS to gcc invocations, please? Another test might be using Mesa instead of Sun's OpenGL. Cheers, S.