Re: ANNOUNCE: GHC version 6.0

Sven Panne <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
[ Redirected to hopengl mailing list ]

Ralf Hinze wrote:
 >>Compiling 6.0 from source fails with:
 >>
 >>../../ghc/compiler/ghc-inplace -H16m -O -Wall -fffi -Iinclude '-#include
 >>"HsOpenGL.h"' -cpp -I/usr/X11R6/include -DCALLCONV=ccall
 >>'-DGET_PROC_ADDRESS="glXGetProcAddressARB"' -package-name OpenGL -O
 >>-Rghc-timing  -package base -split-objs    -c
 >>Graphics/Rendering/OpenGL/GL/Extensions.hs -o
 >>Graphics/Rendering/OpenGL/GL/Extensions.o  -ohi
 >>Graphics/Rendering/OpenGL/GL/Extensions.hi
 >>Graphics/Rendering/OpenGL/GL/Extensions.hs:42: parse error on input
 >>`glXGetProcAddressARB' <<ghc: 3261568 bytes, 2 GCs, 20548/20548 avg/max
 >>bytes residency (1 samples), 5M in use, 0.00 INIT (0.00 elapsed), 0.01 MUT
 >>(0.09 elapsed), 0.01 GC (0.03 elapsed) :ghc>> make[2]: ***
 >>[Graphics/Rendering/OpenGL/GL/Extensions.o] Fehler 1
 >>make[1]: *** [all] Fehler 1
 >>make[1]: Leaving directory
 >>`/var/tmp/portage/ghc-6.0/work/stage2-build/libraries' make: *** [build]
 >>Fehler 1
 >
 >
 > The following patch worked for me (but does it cure the problem?)
 >
 > irrwisch root # diff libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Extensions.hs libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Extensions.hs-orig
 > 42c42
 > < foreign import CALLCONV unsafe GET_PROC_ADDRESS ::
 > ---
 >
 >>foreign import CALLCONV unsafe GET_PROC_ADDRESS glXGetProcAddressARB ::

Hmmmm, that's definitely no solution. What platform exactly are you
using? (ghc used for building, gcc version, etc.) Calling make with

    EXTRA_HC_OPTS="-v -keep-tmp-files"

and sending the output plus the generated *.hscpp file might help. I
guess that something goes wrong during the preprocessing stage. On a
non-WinDoze platform the last lines of Extensions.hs should expand
into:

    foreign import ccall unsafe "glXGetProcAddressARB" glXGetProcAddressARB ::
       CString -> IO (FunPtr a)

On WinDoze they should expand into:

    foreign import stdcall unsafe "wglGetProcAddress" glXGetProcAddressARB ::
       CString -> IO (FunPtr a)

Cheers,
    S.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.