GL support was recently added to SDL-sdlpl, at least as far as ebuild versions go, and it appears parts of its source require a flag that was renamed in the Mesa headers. OpenGL.xs: In function `XS_SDL__OpenGL_GL_ALL_CLIENT_ATTRIB_BITS': OpenGL.xs:2513: `GL_ALL_CLIENT_ATTRIB_BITS' undeclared (first use in this function) OpenGL.xs:2513: (Each undeclared identifier is reported only once OpenGL.xs:2513: for each function it appears in.) make: *** [OpenGL.o] Error 1 This archived message regarding SDL-perl seems to indicate that they fixed it: http://www.sdlperl.org/pipermail/sdlperl/2002-April/000122.html (repeated above) That post links to this post regarding Mesa and the offending definition: http://blade.nagaokaut.ac.jp/cgi-bin/rcat.rb/ruby/ruby-talk/11433 They appear to claim support for both as of 1.17.2, yet 1.18 ebuild fails because my SGI headers are missing Mesa's renamed version of that flag.
Confirmed. I can't build SDL-sdlpl on my system either; I'm using vanilla XFree86 libraries with the replacement nVidia GL stuff, and I get an identical error.
Not so much of a fix, as really a cheap kludge, is to define that to equal GL_CLIENT_ALL_BITS. I am not sure if the SDL-perl dev team know about this one already, or not. #ifndef GL_ALL_CLIENT_BITS #ifdef GL_CLIENT_ALL_BITS /* SGI gl.h */ #define GL_ALL_CLIENT_BITS GL_CLIENT_ALL_BITS #else /* neither defined? */ #error This should not happen. Check your GL headers. (or some more appropriate error message) #endif /* GL_CLIENT_ALL_BITS */ #endif /* GL_ALL_CLIENT_BITS */ Somewhere in the offending file, or in the local headers it uses. The change I have been using to compile it was to add the definition below the GL_CLIENT_ALL_BITS define within my gl.h, but this is not really a fix.
dave@sdlperl.org here, I've reapplied the patch (the original fix disappeared shortly after 1.17.2 for some reason, probably some other patch). If you look at http://www.sdlperl.org/downloads/SDL_perl-1.18.3.tar.gz, you should not have a problem. FYI I build on my system with the SGI headers, OpenGL version 1.3, so this really isn't tested on Mesa. I'd also appreciate it if the gentoo maintainer joined the mailing list if you haven't already, and please feel free to post the full bug report to either the website or to just the mailing list. I fix bugs faster that way... Thanks for your input, insight, and just plain spotting something that keeps slipping throught the cracks. David J. Goehrig <dave@sdlperl.org>
Thanks so much, Dave! The ebuild for 1.18.3 is in portage
This is not fixed on my system. I'm going to open up a new bug that shows the errors that my build is having, which are similar to the ones that I put in this bug earlier.
Same problem persists on my system. My headers declare GL_CLIENT_ALL_ATTRIB_BITS, but not GL_ALL_CLIENT_ATTRIB_BITS ... except when I want this to work without having to interrupt the ebuild to modify the sources.
SDL_perl-1.18.4 simply defines GL_ALL_CLIENT_ATTRIB_BITS 0xffffffff This should permanently solve this problem. What worries me about this is that people are claiming to have the SGI headers, but I know that they, and the OpenGL spec, define GL_ALL_CLIENT_ATTRIB_BITS, and rather the GL_CLIENT_ALL_ATTRIB_BITS is a Mesa-ism. Is is possible that those experiencing the problem have both installed, but the SGI ones are not being included in the search path?
My SGI header file defines GL_CLIENT_ALL_ATTRIB_BITS, but not GL_ALL_CLIENT_ATTRIB_BITS. Perhaps you have the standard and Mesa-ism mixed up? Either way, blargh to the Mesa developer who came up with this bright idea.