Haskell Platform can't use OpenGL on OpenBSD.

Thanos Tsouanas thanos at sians.org
Tue Mar 16 19:29:18 EDT 2010


Hello.

I have successfully compiled ghc-6.10.4 on OpenBSD on i386.
I have downloaded the Haskell Platform tarball, but ./configure
fails:

[ ... ]
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking for library containing glEnd... no
configure: error: The OpenGL C library is required

Looking into GL/gl.h, I see that the function glEnd is there:

GLAPI void GLAPIENTRY glEnd( void );

My system's GL/gl.h seems to be v7.4:
 * Mesa 3-D graphics library
 * Version:  7.4

My config.log states the following, regarding OpenGL:

[ ...lots of passed tests... ]
configure:4247: checking GL/gl.h usability
configure:4264: gcc -c -g -O2 -I/usr/X11R6/include
-I/usr/local/include conftest.c >&5
configure:4271: $? = 0
configure:4285: result: yes
configure:4289: checking GL/gl.h presence
configure:4304: gcc -E -I/usr/X11R6/include -I/usr/local/include conftest.c
configure:4311: $? = 0
configure:4325: result: yes
configure:4353: checking for GL/gl.h
configure:4360: result: yes
configure:4373: checking for library containing glEnd
configure:4414: gcc -o conftest -g -O2 -I/usr/X11R6/include
-I/usr/local/include conftest.c -lz  > &5
/tmp//ccanY01U.o(.text+0x12): In function `main':
/home/thanos/third/haskell/platform-6.10.4/haskell-platform-2009.2.0.2/conftest.c:30:
undefined ref
erence to `glEnd'
collect2: ld returned 1 exit status
configure:4421: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "haskell-platform"
| #define PACKAGE_TARNAME "haskell-platform"
| #define PACKAGE_VERSION "2009.2.0.2"
| #define PACKAGE_STRING "haskell-platform 2009.2.0.2"
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_LIBZ 1
| /* end confdefs.h.  */
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char glEnd ();
| int
| main ()
| {
| return glEnd ();
|   ;
|   return 0;
| }


Now, I may not be a C programmer, but is this even supposed
to work?  Testing this program is weird:

conftest.c:5: error: conflicting types for `glEnd'
/usr/X11R6/include/GL/gl.h:957: error: previous declaration of `glEnd'

Which was expected, since glEnd is defined to return void in GL/gl.h,
so I tried to delete that function declaration from this .c file, and I got:

conftest.c: In function `main':
conftest.c:8: error: void value not ignored as it ought to be

Ok, this was expected, so I tried to delete the "return" and I got
this final error:

/tmp//ccq1Rmj0.o(.text+0x19): In function `main':
: undefined reference to `glEnd'
collect2: ld returned 1 exit status


Please let me know if you have any ideas on how to procede with
the installation of Haskell Platform.

Thanks in advance.

-- 
Thanos Tsouanas
http://mpla.math.uoa.gr/~thanos/


More information about the Glasgow-haskell-users mailing list