
Hello all, this my first time.
I've installed Cygwin and GHC + GreenCard for win32.
X Window and OpenGL (Mesa) is operative. I think that
is a full installation of Cygwin (all packages).
HOpenGL install doesn't succeed, I've attached the
make output, if anyone can help me.
I tried to make RedBook_C examples, too, but linker
doesn't resolve glut calls.
Thanks, and sorry for bad grammar ;).
___________________________________________________
Yahoo! Sorteos
Consulta si tu número ha sido premiado en
Yahoo! Sorteos http://loteria.yahoo.es
manuel@PCMANUEL /usr/src/HOpenGL-1.03
$ ./configure
checking for gcc... gcc
checking for C compiler default output... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix... .exe
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for green-card... /usr/greencard/green-card
checking for ghc... /usr/ghc/bin/ghc
checking for etags... /usr/bin/etags
checking for hstags... no
configure: WARNING: Using etags as a replacement for hstags
checking for ghc-pkg... /usr/ghc/bin/ghc-pkg
checking syslib for GetOpt... util
checking syslib for Addr... lang
checking for buggy readXXXOffAddr/inliner and hGetBufFull/Foreign... no
checking for -package-name GHC flag... yes
checking for -split-objs bug... no
checking whether Green Card has comma bug... no
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... no
checking for shmat in -lipc... no
checking for IceConnectionNumber in -lICE... yes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for library containing glEnd... -lGL
checking for library containing gluNewQuadric... -lGLU
checking for library containing glXWaitX... none required
checking for library containing glutMainLoop... no
checking OpenGL flags... -I/usr/X11R6/include
checking OpenGL libs... -lGLU -lGL -lSM -lICE -L/usr/X11R6/lib -lX11 -lXext -
lXmu -lXt -lXi
checking GL version... 1.2
checking GLU version... 1.3
checking for GL/glut.h... yes
checking GLUT API version... 3
checking GLUT Xlib implementation... >= 13
checking size of char... 1
checking alignment of char... 1
checking size of int... 4
checking alignment of int... 4
checking size of void *... 4
checking alignment of void *... 4
checking size of float... 4
checking alignment of float... 4
checking size of double... 8
checking alignment of double... 8
configure: creating ./config.status
config.status: creating config.mk
config.status: creating lib/HOpenGL.conf
config.status: creating lib/Makefile
config.status: creating lib/GL_FFI.hs
config.status: creating lib/GL_CoordTrans.gc
config.status: creating lib/GL_Colors.gc
config.status: creating lib/GL_VertexArray.gc
config.status: creating lib/GL_PixelRect.gc
config.status: creating lib/GL_Texturing.gc
config.status: creating lib/GL_PerFragment.gc
config.status: creating lib/GL_EnumQueries2.gc
config.status: creating lib/GL_EnumQueries3.gc
config.status: creating lib/GL_EnumQueries4.gc
config.status: creating lib/GL_EnumQueries5.gc
config.status: creating lib/GL_EnumQueries7.gc
config.status: creating lib/GL.hs
config.status: creating lib/GLU_NURBS.gc
config.status: creating lib/GLUT.hs
config.status: creating lib/GLUT_CBWindow.gc
config.status: creating lib/GLUT_CBGlobal.gc
config.status: creating lib/GLUT_Fonts.gc
config.status: creating lib/GLUT_Game.gc
config.status: creating lib/GLUT_Init.gc
config.status: creating lib/GLUT_Misc.gc
config.status: creating lib/GLUT_Overlay.hs
config.status: creating lib/GLUT_Resize.gc
config.status: creating lib/GLUT_State.gc
config.status: creating lib/GLUT_Window.gc
config.status: creating examples/misc/Makefile
config.status: creating examples/misc/TestGLUT.hs
config.status: creating examples/redbook_HS/Makefile
config.status: creating examples/redbook_C/Makefile.linux
*******************************************************
Configuration done successfully.
Now do "make depend " and then "make" or "make install"
*******************************************************
manuel@PCMANUEL /usr/src/HOpenGL-1.03
$ make depend
------------------------------------------------------------------------
Recursively making `depend' in lib examples ...
PWD = /usr/src/HOpenGL-1.03
------------------------------------------------------------------------
------------------------------------------------------------------------
make depend - --unix;
in /usr/src/HOpenGL-1.03/lib
------------------------------------------------------------------------
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_CBGlobal
.gc -o GLUT_CBGlobal.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_CBWindow
.gc -o GLUT_CBWindow.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_Fonts.gc
-o GLUT_Fonts.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_Game.gc
-o GLUT_Game.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_Init.gc
-o GLUT_Init.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_Menu.gc
-o GLUT_Menu.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_Misc.gc
-o GLUT_Misc.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_Objects.
gc -o GLUT_Objects.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_Resize.g
c -o GLUT_Resize.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_State.gc
-o GLUT_State.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLUT_Window.g
c -o GLUT_Window.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLU_Errors.gc
-o GLU_Errors.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLU_Init.gc -
o GLU_Init.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLU_Matrix.gc
-o GLU_Matrix.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLU_Mipmap.gc
-o GLU_Mipmap.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLU_NURBS.gc
-o GLU_NURBS.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLU_Quadrics.
gc -o GLU_Quadrics.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GLU_Tess.gc -
o GLU_Tess.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_BasicTypes
.gc -o GL_BasicTypes.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_BeginEnd.g
c -o GL_BeginEnd.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Bitmaps.gc
-o GL_Bitmaps.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Clipping.g
c -o GL_Clipping.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Colors.gc
-o GL_Colors.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_CoordTrans
.gc -o GL_CoordTrans.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_DIS.gc -o
GL_DIS.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_DisplayLis
t.gc -o GL_DisplayList.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_EnumQuerie
s1.gc -o GL_EnumQueries1.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_EnumQuerie
s2.gc -o GL_EnumQueries2.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_EnumQuerie
s3.gc -o GL_EnumQueries3.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_EnumQuerie
s4.gc -o GL_EnumQueries4.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_EnumQuerie
s5.gc -o GL_EnumQueries5.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_EnumQuerie
s6.gc -o GL_EnumQueries6.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_EnumQuerie
s7.gc -o GL_EnumQueries7.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Errors.gc
-o GL_Errors.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Evaluators
.gc -o GL_Evaluators.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Feedback.g
c -o GL_Feedback.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Fog.gc -o
GL_Fog.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Framebuffe
r.gc -o GL_Framebuffer.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Hints.gc -
o GL_Hints.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_LineSeg.gc
-o GL_LineSeg.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_MovePixels
.gc -o GL_MovePixels.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_PerFragmen
t.gc -o GL_PerFragment.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_PixelRect.
gc -o GL_PixelRect.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Points.gc
-o GL_Points.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Polygons.g
c -o GL_Polygons.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Query.gc -
o GL_Query.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_QueryUtils
.gc -o GL_QueryUtils.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_RasterPos.
gc -o GL_RasterPos.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Rectangles
.gc -o GL_Rectangles.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_SavResStat
e.gc -o GL_SavResState.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Selection.
gc -o GL_Selection.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_Texturing.
gc -o GL_Texturing.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_VertexArra
y.gc -o GL_VertexArray.hs
"/usr/greencard/green-card" -t ghc --name-mangling-scheme=classic GL_VertexSpec
.gc -o GL_VertexSpec.hs
"/usr/ghc/bin/ghc" -M -optdep-f -optdep.depend -syslib lang -split-objs -pack
age-name HOpenGL -fglasgow-exts -I/usr/X11R6/include "-#include

Manuel Garcia Rodriguez wrote:
[...] checking GL version... 1.2 checking GLU version... 1.3
That's a problem with the current Cygwin headers: They are simply lying, the DLLs under WinDoze only implement OpenGL 1.1 and GLU 1.2.2. The rest is available as extensions, but HOpenGL 1.03 doesn't use the extension mechanism (yet). A quick fix would be: * In HOpenGL's configure, replace the line '#ifndef GL_VERSION_1_2' with something like '#ifndef ThisIsVeryUnlikely'. * Re-run configure and make. Given this situation, I should really rewrite the autoconf stuff for version detection... *sigh* Cheers, S.

Hello. Thanks for replying.
--- Sven Panne
[...] checking GL version... 1.2 checking GLU version... 1.3
That's a problem with the current Cygwin headers: They are simply lying, the DLLs under WinDoze only implement OpenGL 1.1 and GLU 1.2.2.
Mmm, but I think that my video card drivers replace
this files. I compile and install a module in Mandrake
9.0 for my Radeon 9000 and this is glxinfo output
(under Linux):
[root@localhost HOpenGL-1.03]# glxinfo
name of display: :0.0
Loading required GL library
/usr/X11R6/lib/libGL.so.1.2
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_EXT_import_context
client glx vendor string: SGI
client glx version string: 1.2
client glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_EXT_import_context,
GLX_ATI_pixel_format_float
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_EXT_import_context
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: Radeon 9000/Mobility Fire GL
8800 Prototype DDR Athlon (3DNow!)
OpenGL version string: 1.3.3477 (X4.2.0-2.5.1)
OpenGL extensions:
GL_ARB_multitexture, GL_EXT_texture_env_add,
GL_EXT_compiled_vertex_array,
GL_S3_s3tc, GL_ARB_point_parameters,
GL_ARB_texture_border_clamp,
GL_ARB_texture_compression,
GL_ARB_texture_cube_map,
GL_ARB_texture_env_add,
GL_ARB_texture_env_combine,
GL_ARB_texture_env_crossbar,
GL_ARB_texture_env_dot3,
GL_ARB_texture_mirrored_repeat,
GL_ARB_transpose_matrix,
GL_ARB_vertex_blend, GL_ARB_vertex_program,
GL_ARB_window_pos,
GL_ATI_element_array, GL_ATI_envmap_bumpmap,
GL_ATI_fragment_shader,
GL_ATI_map_object_buffer,
GL_ATI_texture_env_combine3,
GL_ATI_texture_mirror_once,
GL_ATI_vertex_array_object,
GL_ATI_vertex_attrib_array_object,
GL_ATI_vertex_streams,
GL_ATIX_texture_env_combine3,
GL_ATIX_texture_env_route,
GL_ATIX_vertex_shader_output_point_size,
GL_EXT_abgr, GL_EXT_bgra,
GL_EXT_blend_color, GL_EXT_blend_func_separate,
GL_EXT_blend_minmax,
GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
GL_EXT_draw_range_elements, GL_EXT_fog_coord,
GL_EXT_multi_draw_arrays,
GL_EXT_packed_pixels, GL_EXT_point_parameters,
GL_EXT_rescale_normal,
GL_EXT_polygon_offset, GL_EXT_secondary_color,
GL_EXT_separate_specular_color,
GL_EXT_stencil_wrap,
GL_EXT_texgen_reflection, GL_EXT_texture3D,
GL_EXT_texture_compression_s3tc,
GL_EXT_texture_cube_map,
GL_EXT_texture_edge_clamp,
GL_EXT_texture_env_combine,
GL_EXT_texture_env_dot3,
GL_EXT_texture_filter_anisotropic,
GL_EXT_texture_lod_bias, GL_EXT_texture_object,
GL_EXT_texture_rectangle,
GL_EXT_vertex_array, GL_EXT_vertex_shader,
GL_HP_occlusion_test,
GL_NV_texgen_reflection, GL_NV_blend_square,
GL_NV_occlusion_query,
GL_SGI_texture_edge_clamp,
GL_SGIS_texture_border_clamp,
GL_SGIS_texture_lod, GL_SGIS_generate_mipmap,
GL_SGIS_multitexture,
GL_SUN_multi_draw_arrays
glu version: 1.3
glu extensions:
GLU_EXT_nurbs_tessellator,
GLU_EXT_object_space_tess
visual x bf lv rg d st colorbuffer ax dp st
accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g
b a ns b eat
----------------------------------------------------------------------
0x23 24 tc 0 24 0 r y . 8 8 8 8 0 24 8 16 16
16 16 0 0 Slow
0x24 24 tc 0 24 0 r . . 8 8 8 8 0 24 8 16 16
16 16 0 0 Slow
0x25 24 tc 0 24 0 r y . 8 8 8 8 0 24 0 16 16
16 16 0 0 Slow
0x26 24 tc 0 24 0 r . . 8 8 8 8 0 24 0 16 16
16 16 0 0 Slow
0x27 24 tc 0 24 0 r y . 8 8 8 8 0 24 8 0 0
0 0 0 0 None
0x28 24 tc 0 24 0 r . . 8 8 8 8 0 24 8 0 0
0 0 0 0 None
0x29 24 tc 0 24 0 r y . 8 8 8 8 0 24 0 0 0
0 0 0 0 None
0x2a 24 tc 0 24 0 r . . 8 8 8 8 0 24 0 0 0
0 0 0 0 None
0x2b 24 dc 0 24 0 r y . 8 8 8 8 0 24 8 16 16
16 16 0 0 Slow
0x2c 24 dc 0 24 0 r . . 8 8 8 8 0 24 8 16 16
16 16 0 0 Slow
0x2d 24 dc 0 24 0 r y . 8 8 8 8 0 24 0 16 16
16 16 0 0 Slow
0x2e 24 dc 0 24 0 r . . 8 8 8 8 0 24 0 16 16
16 16 0 0 Slow
0x2f 24 dc 0 24 0 r y . 8 8 8 8 0 24 8 0 0
0 0 0 0 None
0x30 24 dc 0 24 0 r . . 8 8 8 8 0 24 8 0 0
0 0 0 0 None
0x31 24 dc 0 24 0 r y . 8 8 8 8 0 24 0 0 0
0 0 0 0 None
0x32 24 dc 0 24 0 r . . 8 8 8 8 0 24 0 0 0
0 0 0 0 None
Redbook_C examples work fine. But making Redbook_HS
fails:
...
make all - --no-print-directory;
in /root/fuentes/HOpenGL-1.03/examples/misc
------------------------------------------------------
"/usr/bin/ghc" -i../../lib -I../../lib -syslib util
-fglasgow-exts -I/usr/X11R6/include "-#include

Manuel Garcia Rodriguez wrote:
Sven Panne wrote:
That's a problem with the current Cygwin headers: They are simply lying, the DLLs under WinDoze only implement OpenGL 1.1 and GLU 1.2.2.
Mmm, but I think that my video card drivers replace this files.
That's not the case: The DLL is still 1.1, even in 2003. :-) All cool new stuff is available only via the OpenGL extension mechanism. As a start you can read e.g. http://www.opengl.org/developers/code/features/OGLextensions/OGLextensions.h...
I compile and install a module in Mandrake 9.0 for my Radeon 9000 and this is glxinfo output (under Linux):
Linux and most *nices are a bit different in this respect. The OpenGL libraries are normally 'real' 1.{2,3,4} ones, although the extension mechanism still works, too.
[...] Redbook_C examples work fine. But making Redbook_HS fails:
... make all - --no-print-directory; in /root/fuentes/HOpenGL-1.03/examples/misc ------------------------------------------------------ "/usr/bin/ghc" -i../../lib -I../../lib -syslib util -fglasgow-exts -I/usr/X11R6/include "-#include
" -O -c Info.hs -o Info.o Prologue junk?: .globl __stginit_Main __stginit_Main: pushl %ebp movl %esp, %ebp
What version of GHC are you using? Upgrading to 5.04.2 could help here.
With WinXP + Cygwin + GHC neither C nor HS compile:
redbook_HS: ... h:\DOCUME~1\manuel\CONFIG~1\Temp\ghc1744.hc:844: `GL_UNSIGNED_INT_2_10_10_10_REV' undeclared (first use in this function)
Lying OpenGL headers again...
redbook_C: [...] Unable to link any GLUT functions. Maybe GLUT isn't properly installed...
Yes, that seems to be the case. The relevant line from your configure log: checking for library containing glutMainLoop... no I don't know what's wrong with your Cygwin setup. I've installed a fresh Cygwin a few days ago and everything is fine. I don't have a full installation, though, only the default stuff + development + graphics, IIRC.
GHC for Windows comes with some parts of GCC compiler, and I installed gcc for Cygwin also.
That's OK, the only trouble is that they sometimes see different headers.
Please I need some help, I must finish some work this week, Linux or Windows, GHC or Hugs.
Does HOpenGL-1.03 work with your Mandrake Linux? I'm developing on SuSE Linux, but there shouldn't be any differences. Cheers, S.
participants (2)
-
Manuel Garcia Rodriguez
-
Sven Panne