We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1782 - SDL_opengl.h header disabled on FreeBSD
Summary: SDL_opengl.h header disabled on FreeBSD
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: x86_64 FreeBSD
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-01 08:12 UTC by q66
Modified: 2013-04-02 02:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description q66 2013-04-01 08:12:56 UTC
The SDL_opengl.h header contains this:

#ifdef __FreeBSD__  /* !!! FIXME: temp compiler warning fix... */
#define NO_SDL_GLEXT 1
#endif

However, I can't seem to find what kind of compiler warning it was and it makes it unusable to use on FreeBSD. If I comment out these lines on my machine, everything works fine - I use FreeBSD 9-STABLE (x86_64, gcc and clang both, the same in a x86 chroot). All I could find is that this was causing an error on FreeBSD 8, but I can't test that on my machine (maybe if I set up some FreeBSD 8 chroot).

DK
Comment 1 q66 2013-04-01 10:55:34 UTC
I set up a 8.2 chroot and investigated the problem. Apparently this issue was fixed in Mesa 7.6 (and in Git, June 4 2009, but it didn't get into 7.5). By the time those lines were added, FreeBSD contained the libGL port version 7.4.4, which suffered from the issue, but on April 2012 the version was updated to 7.6, which is available for FreeBSD 8 and FreeBSD 9 alike, which means those three lines should be safe to remove (it'll work fine for everyone with sufficiently up to date ports).

DK
Comment 2 q66 2013-04-01 11:17:35 UTC
For reference, a diff between "old" FreeBSD gl.h and the one that is currently in ports - http://pastebin.com/AdEQp8Uk

I tried looking for a way to check the mesa version from SDL_opengl.h and making the respective typedefs conditional, but there doesn't seem to be a way.

The new libGL that works without the NO_SDL_GLEXT is available as binary packages in 7-stable, 8-stable, 9-stable, basically anything built past April 2012, and of course in ports as the default option for those who build on their own.
Comment 3 Sam Lantinga 2013-04-02 02:16:32 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL/rev/6460bf6d33cf