Error building SDL2 [unix] |
Error building SDL2 [unix] |
gabomdq
|
2013/8/24 neoaggelos
I'm seeing this too, I think it's not a change on SDL that triggered this error on your system but rather that you probably installed the GL ES2 headers. From a quick googling, it also seems to be a common problem when including both GL and GL ES2 headers in a x86 system (not an issue on 64 bits). Can you try changing in SDLvideo.c, line 42, from #if SDL_VIDEO_OPENGL_ES2 to #if SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL If this works for you I'll commit the fix. BTW, the reason why this doesn't show in the Buildbot is because it doesn't have the ES headers installed (Ryan was working on it though). See here: http://buildbot.libsdl.org/builders/sdl-linux-x86/builds/1315/steps/configure/logs/stdio -- Gabriel. |
|||||||||||||
|
Re: Error building SDL2 [unix] |
neoaggelos
|
Yeah, I have the GLES2 headers, and that's why I said that the double definitions happen. And even if I add '&& !SDL_VIDEO_OPENGL', this should be added for the GLES1 headers, too. BUT, in the past ( 5-6 hours ago :p ), I successfully built SDL (with GL ES headers, of course). Anyway, the proposed solution is just a work-around, and could cause problems eventually ???? If an expert can assure that not adding the GL ES 2 headers in favor of the OpenGL ones is ok, well, that's the way to go Cheers, Aggelos Kolaitis |
|||||||||||||||
|
Error building SDL2 [unix] |
gabomdq
|
2013/8/24 neoaggelos
No, there's no conflict with the GLES1 headers, at least as far as I know.
If you google the issue you'll see the solution applied everywhere is to avoid including both headers at the same time. SDL_video.c uses the gl headers to probe for extensions, and it uses a tiny part of it actually (a few types such as GLint, GLubyte), so much so that this probably can be refactored to not include those headers at all or better yet moved into the corresponding video backend. In the meantime, and while we wait for the experts to arrive, the fix I gave you should probably solve the problem. -- Gabriel. |
|||||||||||||||
|
Error building SDL2 [unix] |
gabomdq
|
I saw the error with gcc 4.7.3 Ubuntu 64, but only when using "-m32"
2013/8/27 Kerim Borchaev
-- Gabriel. |
|||||||||||||||
|
Error building SDL2 [unix] |
Kerim Borchaev
Guest
|
Hello!
It seems to happen with older compilers(and it AFAIK in C99 standard) - I have this error when compiling with a gcc 4.51 toolchain laying around, but 4.7 doesn't care about double definitions - $ cat >test.c typedef int XXX; typedef int XXX; int main(void){return 0;} $ gcc test.c $ gcc --version gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 Kerim On Sat, Aug 24, 2013 at 9:33 PM, neoaggelos wrote:
|
|||||||||||||
|