| Summary: | Build error on Fedora 17 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ellie <etc0de> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | gabomdq, manuel |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
config.log of failed "checking for const parameter to XextAddDisplay" detection on Fedora 17
config.log of failed "checking for const parameter to XextAddDisplay" detection on Fedora 17 from older SDL rev 698c98b83cbb /usr/include/X11/extensions/extutil.h header file as present on my Fedora 17 system |
||
I just tested a fix which is indeed trivial: SDL_x11sym.h line 106 originally looks like this: SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo* a,Display* b,char* c,XExtensionHooks* d,int e,XPointer f),(a,b,c,d,e,f),return) To build on Fedora 17, it needs to look like this: SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo* a,Display* b,const char* c,XExtensionHooks* d,int e,XPointer f),(a,b,c,d,e,f),return) Will this be changed in the near future? This should be fixed in this changeset: http://hg.libsdl.org/SDL/rev/d86efd889847 Can you verify? There was a problem on my Ubuntu system which had the old headers (the test never failed!) http://hg.libsdl.org/SDL/rev/698c98b83cbb Apparently not fixed on Fedora 17 with a checkout I did 5 minutes ago. Basically, it seems from the given error line 109 in SDL_x11sym.h that SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY isn't defined, and therefore the #else path is taken and the problem persists. From the config log, the test "checking for const parameter to XextAddDisplay" returned "no" (which is wrong). Will attach config.log, hopefully that will shed light on the problem. Created attachment 866 [details]
config.log of failed "checking for const parameter to XextAddDisplay" detection on Fedora 17
Would you try again with this revision instead of the latest? http://hg.libsdl.org/SDL/rev/698c98b83cbb "checking for const parameter to XextAddDisplay" also broken in rev 698c98b83cbb, despite with other config.log code and error. Created attachment 867 [details]
config.log of failed "checking for const parameter to XextAddDisplay" detection on Fedora 17 from older SDL rev 698c98b83cbb
Can you post the contents of /usr/include/X11/extensions/extutil.h in your system, I don't have a Fedora system so it'll be easier for me to make the test work fine with that file. Created attachment 868 [details]
/usr/include/X11/extensions/extutil.h header file as present on my Fedora 17 system
Can you test? http://hg.libsdl.org/SDL/rev/7c37af802e63 I've tested with my Ubuntu 12.04 headers, the test fails with: configure:18626: checking for const parameter to XextAddDisplay configure:18647: gcc -c -g -O2 -I./include -I./include conftest.c >&5 conftest.c:124:39: error: conflicting types for 'XextAddDisplay' /usr/include/X11/extensions/extutil.h:123:25: note: previous declaration of 'XextAddDisplay' was here With your header file it succeeds: configure:18626: checking for const parameter to XextAddDisplay configure:18647: gcc -c -g -O2 -I./include -I./include conftest.c >&5 configure:18647: $? = 0 configure:18655: result: yes Rev. 7c37af802e63 compiles well here: checking for const parameter to XextAddDisplay... yes |
It seems in Fedora 17, some Xext things changed which causes trouble for SDL: /bin/sh ./libtool --mode=compile gcc -g -O3 -DUSING_GENERATED_CONFIG_H -I./include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -MMD -MT build/SDL_x11dyn.lo -c src/video/x11/SDL_x11dyn.c -o build/SDL_x11dyn.lo libtool: compile: gcc -g -O3 -DUSING_GENERATED_CONFIG_H -I./include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -MMD -MT build/SDL_x11dyn.lo -c src/video/x11/SDL_x11dyn.c -o build/SDL_x11dyn.o In file included from src/video/x11/SDL_x11dyn.c:110:0: src/video/x11/SDL_x11sym.h:106:151: error: conflicting types for ‘XextAddDisplay’ In file included from src/video/x11/SDL_x11dyn.h:38:0, from src/video/x11/SDL_x11dyn.c:27: /usr/include/X11/extensions/extutil.h:123:25: note: previous declaration of ‘XextAddDisplay’ was here make[2]: *** [build/SDL_x11dyn.lo] Error 1 No problem on Fedora 16. Line 123+ from /usr/include/X11/extensions/extutil.h: extern XExtDisplayInfo *XextAddDisplay( XExtensionInfo* /* extinfo */, Display* /* dpy */, _Xconst char* /* ext_name */, XExtensionHooks* /* hooks */, int /* nevents */, XPointer /* data */ );