SDL 1.3 cannot compile on FreeBSD 8

Hi all

SDL 1.3 current snapshot cannot compile on FreeBSD 8.1.

hg clone http://hg.libsdl.org/SDL

./configure --prefix=/usr
–includedir=/usr/include/sdl-1.3
–libdir=/usr/lib/sdl-1.3

gmake

libtool: compile: gcc -g -O3 -I./include -mmmx -msse -fvisibility=hidden
-I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE
-MMD -MT build/SDL_render_gl.lo -c src/render/opengl/SDL_render_gl.c -fPIC
-DPIC -o build/.libs/SDL_render_gl.o
In file included from src/render/opengl/SDL_render_gl.c:27:
./include/SDL_opengl.h:5258: error: redefinition of typedef
’PFNGLCOLORTABLEPROC’
/usr/local/include/GL/gl.h:1739: error: previous declaration of
’PFNGLCOLORTABLEPROC’ was here

Best regards
Unga

/usr/local/include/GL/gl.h:1739: error: previous declaration of
’PFNGLCOLORTABLEPROC’ was here

We really need to just delete SDL_opengl.h from revision control.

Can you send me (off list) your /usr/local/include/GL/gl.h?

–ryan.

Hi all

SDL 1.3 current snapshot cannot compile on FreeBSD 8.1.

hg clone http://hg.libsdl.org/SDL

./configure --prefix=/usr
–includedir=/usr/include/sdl-1.3
–libdir=/usr/lib/sdl-1.3

gmake

libtool: compile:? gcc -g -O3 -I./include -mmmx -msse
-fvisibility=hidden
-I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW
-D_REENTRANT -D_THREAD_SAFE
-MMD -MT build/SDL_render_gl.lo -c
src/render/opengl/SDL_render_gl.c? -fPIC
-DPIC -o build/.libs/SDL_render_gl.o
In file included from
src/render/opengl/SDL_render_gl.c:27:
./include/SDL_opengl.h:5258: error: redefinition of
typedef
’PFNGLCOLORTABLEPROC’
/usr/local/include/GL/gl.h:1739: error: previous
declaration of
’PFNGLCOLORTABLEPROC’ was here

Best regards
Unga

./include/SDL_opengl.h describes:

“This file is included because glext.h is not available on some systems.
If you don’t want this version included, simply define ::NO_SDL_GLEXT.”

I have glext.h, therefore, -DNO_SDL_GLEXT added, now no redefinition error,
compilation goes further and hit following error:
src/video/x11/SDL_x11opengl.c: In function ‘X11_GL_GetSwapInterval’:
src/video/x11/SDL_x11opengl.c:575: error: ‘GLX_SWAP_INTERVAL_EXT’ undeclared (first use in this function)

Following added to the src/video/x11/SDL_x11opengl.c:

#define GLX_SWAP_INTERVAL_EXT 0x20F1

Compilation goes further and hit following error:
src/joystick/bsd/SDL_sysjoystick.c: In function ‘SDL_SYS_JoystickUpdate’:
src/joystick/bsd/SDL_sysjoystick.c:465: error: dereferencing pointer to
incomplete type
src/joystick/bsd/SDL_sysjoystick.c:489: error: dereferencing pointer to
incomplete type
src/joystick/bsd/SDL_sysjoystick.c:499: error: dereferencing pointer to
incomplete type
src/joystick/bsd/SDL_sysjoystick.c:507: error: dereferencing pointer to
incomplete type
src/joystick/bsd/SDL_sysjoystick.c: In function ‘report_alloc’:
src/joystick/bsd/SDL_sysjoystick.c:588: error: dereferencing pointer to
incomplete type
src/joystick/bsd/SDL_sysjoystick.c:588: error: dereferencing pointer to
incomplete type
gmake: *** [build/SDL_sysjoystick.lo] Error 1

Regards
Unga— On Tue, 8/9/11, Unga <@Unga> wrote:

From: Unga <@Unga>
Subject: [SDL] SDL 1.3 cannot compile on FreeBSD 8
To: sdl at lists.libsdl.org
Date: Tuesday, August 9, 2011, 3:53 PM

Haiku gets a set of redefinition warnings similar to yours- a few screens
full of them- but keeps on building.

We really need to just delete SDL_opengl.h from revision control.

Are you suggesting that we just delete SDL_opengl.h from our working
directories?

Are you suggesting that we just delete SDL_opengl.h from our working
directories?

I’m sure that would break things without other changes.

I’m not sure what platform we care about that has gl.h, but not glext.h,
and we keep having small problems like mismatched typedefs, etc.

Also: keeping up with new extensions is a full time job.

–ryan.