Problems compiling with profiling enabled

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Problems compiling with profiling enabled

by Yann Morvan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

when I try to compile a program that uses HOpenGL with profiling
enabled, GHC complains about types not being declared and functions not
being exported (all names belonging to the HOpenGL package).

Does HOpenGL lack profiling support or am I doing something wrong ?
How would I go about installing the package so that profiling works ?

Thank you for your help.

    Yann Morvan
_______________________________________________
HOpenGL mailing list
HOpenGL@...
http://www.haskell.org/mailman/listinfo/hopengl

Re: Problems compiling with profiling enabled

by Yann Morvan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I was trying to compile GLUT and HOpenGL with profiling on (I added
"GhcLibWays    = p" in buid.mk).
When it goes back to building the profiling versions, it fails with:

Graphics/UI/GLUT/Callbacks/Registration.hs:64:
    Couldn't match `Maybe Window' against `Window'
    Expected type: Maybe Window
    Inferred type: Window
    In the third argument of `maybe', namely `win'
    In the result of a 'do' expression:
    maybe (error (func ++ ": no current window")) return win

Even though things worked fine for the non profiling build.
I don't understand why it would behave differently.
I am using version 6.3 of the fptools disribution, because it is at that
time that I had to play around to get fragment programs working. Was
there known issues with profiling HOpenGL at that time ? Has a lot
happened since ?
Do I need to do more than set GhcLibWays ?

Thank you for your help,

    Yann Morvan
_______________________________________________
HOpenGL mailing list
HOpenGL@...
http://www.haskell.org/mailman/listinfo/hopengl

Re: Problems compiling with profiling enabled

by Yann Morvan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Apparently that last issue was solved by doing "make depend".
Sorry for the spam.
Still working on it.
_______________________________________________
HOpenGL mailing list
HOpenGL@...
http://www.haskell.org/mailman/listinfo/hopengl

Re: Problems compiling with profiling enabled

by Yann Morvan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I can get everything to compile with the -prof flag now, but I get those
two linking errors that I don't understand:

c:/ghc/ghc-6.2.1/libHSGLUT_p.a(Debugging.p_o)(.text+0x748):Debugging.p_hc:
undefined reference to
`GraphicsziRenderingziOpenGLziGLUziErrors_getErrors_closure'
c:/ghc/ghc-6.2.1/libHSGLUT_p.a(Debugging.p_o)(.text+0x7a4):Debugging.p_hc:
undefined reference to
`GraphicsziRenderingziOpenGLziGLUziErrors_getErrors_entry'
make: *** [renderer] Error 1

My configuration is a bit weird: I compile HOpenGL and GLUT from a 6.3
fptools distribution, but I install the resulting packages in a 6.2.1
binary distribution (because for some reason I don't remember I was
having trouble building the whole fptools 6.3).
I'm using cygwin on a win XP PC.

In case it's relevent, the package.conf entries for GLUT and OpenGL read
like this:

Package
    {name = "OpenGL",
     auto = True,
     import_dirs = ["$libdir/imports"],
     source_dirs = [],
     library_dirs = ["$libdir"],
     hs_libraries = ["HSOpenGL"],
     extra_libraries = ["HSOpenGL_cbits"],
     include_dirs = [],
     c_includes = ["HsOpenGL.h"],
     package_deps = ["base"],
     extra_ghc_opts = [],
     extra_cc_opts = [],
     extra_ld_opts = ["-lglu32", "-lopengl32"],
     framework_dirs = [],
     extra_frameworks = []},
 Package
    {name = "GLUT",
     auto = True,
     import_dirs = ["$libdir/imports"],
     source_dirs = [],
     library_dirs = ["$libdir"],
     hs_libraries = ["HSGLUT"],
     extra_libraries = ["HSGLUT_cbits"],
     include_dirs = [],
     c_includes = ["HsGLUT.h"],
     package_deps = ["base", "OpenGL"],
     extra_ghc_opts = [],
     extra_cc_opts = [],
     extra_ld_opts = ["-lglut32"],
     framework_dirs = [],
     extra_frameworks = []},

Thank you for your help,

    Yann Morvan
_______________________________________________
HOpenGL mailing list
HOpenGL@...
http://www.haskell.org/mailman/listinfo/hopengl