Re: [Hugs-users] graphics
On Wed, Dec 27, 2006 at 10:10:50PM +0000, Dave@haskell.org wrote:
Do soe.hs based graphics work in hugs98? I am getting one error after another just trying to get the soe module to load.
I works for me (but the module is called Graphics.SOE rather than SOEGraphics). What errors do you get? (If you've copied the module to the current directory, it's not going to work.) I had done that. I will delete the file from my local directory. I had done an install of hugs98 into /usr/local/lib/hugs but I notice that almost none of the hugs98 packages got copied into /usr... So I set HUGSDIR=path/to/packages/in/my/user/account. I keep getting new "not found" errors for include files pulled in by the soe.hs file.
I'm now reading Hudak's book _The Haskell School of Expression_ and finding it very helpful. I've just got into the "simple graphics" and I thought I would try it out. I think the problem I'm having is that the includes in soe are for old-style libraries and the files to be included are not found. I'm slowly starting to try to figure out what's going on with the includes since that seems to be where the problem lies.
On Wed, Dec 27, 2006 at 11:13:43PM +0000, dfeustel@mindspring.com wrote:
I had done an install of hugs98 into /usr/local/lib/hugs but I notice that almost none of the hugs98 packages got copied into /usr... So I set HUGSDIR=path/to/packages/in/my/user/account.
The X11 and HGL packages won't be built if the system you built Hugs on lacks an X11 build environment (check hugs98/packages/X11/X11.buildinfo). (Similarly OpenGL, GLUT, OpenAL, ALUT.) But at least a dozen packages should be built and installed in all cases. You could set HUGSDIR=.../hugs98/hugsdir but the packages in there should all be installed by make install. Pointing at the top-level source directory gets you the unprocessed source files, which won't work.
I keep getting new "not found" errors for include files pulled in by the soe.hs file.
I presume you mean imports rather that includes. Perhaps you could post some of what happens.
Ross Paterson schrieb:
The X11 and HGL packages won't be built if the system you built Hugs on lacks an X11 build environment (check hugs98/packages/X11/X11.buildinfo).
For some reason hugs wasn't build with X11 under linux and powerpc-mac for me, although X11 works for ghc. I only have the file: .../lib/hugs/packages/X11/autogen/Paths_X11.hs and I get an error when I use HGL: ERROR ".../lib/hugs/packages/HGL/Graphics/HGL/Internals/Types.hs" - Can't find imported module "Graphics.X11.Xlib" On our pc-solaris machines hugs works correctly, having the following files in lib/hugs/packages/X11/ : Graphics/ LICENSE Paths_X11.hs Nowhere I've found a file X11.buildinfo. I've used the release: http://cvs.haskell.org/Hugs/downloads/2006-09/hugs98-plus-Sep2006.tar.gz and made: ./configure --prefix=... make make install I wonder, how I can make hugs find my X11? (Other packages seem to be okay.) Cheers Christian P.S. eventually I was able to install X11-1.2.20060921 using cabal. (runhugs -98 Setup.hs configure --hugs) Although X11.buildinfo contained: buildable: True cc-options: -I/usr/X11R6/include ld-options: -L/usr/X11R6/lib I had to pass -L/usr/X11R6/lib explicitely (via the --lflag of hsc2hs), in order to avoid: /usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld: cannot find -lX11 collect2: ld returned 1 exit status linking Graphics/X11/Types_hsc_make.o failed Furthermore "runhugs -98 Setup.hs install" failed with: copy dist/build/Graphics/X11/Xlib/Atom.so to ... Program error: <handle>: IO.getContents: protocol error (input contains non-character data - use binary I/O for binary data) But "runghc Setup.hs install" worked.
participants (3)
-
Christian Maeder -
dfeustel@mindspring.com -
Ross Paterson