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 1498 - Build error on Fedora 17
Summary: Build error on Fedora 17
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 blocker
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-15 11:07 UTC by Ellie
Modified: 2012-06-05 03:37 UTC (History)
2 users (show)

See Also:


Attachments
config.log of failed "checking for const parameter to XextAddDisplay" detection on Fedora 17 (203.99 KB, text/plain)
2012-06-02 06:57 UTC, Ellie
Details
config.log of failed "checking for const parameter to XextAddDisplay" detection on Fedora 17 from older SDL rev 698c98b83cbb (204.27 KB, text/plain)
2012-06-02 07:38 UTC, Ellie
Details
/usr/include/X11/extensions/extutil.h header file as present on my Fedora 17 system (5.93 KB, text/plain)
2012-06-02 09:16 UTC, Ellie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ellie 2012-05-15 11:07:00 UTC
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 */
);
Comment 1 Ellie 2012-05-16 02:12:37 UTC
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)
Comment 2 Manuel Bärenz 2012-05-21 07:52:00 UTC
Will this be changed in the near future?
Comment 3 Sam Lantinga 2012-05-30 08:46:05 UTC
This should be fixed in this changeset:
http://hg.libsdl.org/SDL/rev/d86efd889847

Can you verify?
Comment 4 Gabriel Jacobo 2012-06-01 15:53:51 UTC
There was a problem on my Ubuntu system which had the old headers (the test never failed!) http://hg.libsdl.org/SDL/rev/698c98b83cbb
Comment 5 Ellie 2012-06-02 06:56:12 UTC
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.
Comment 6 Ellie 2012-06-02 06:57:39 UTC
Created attachment 866 [details]
config.log of failed "checking for const parameter to XextAddDisplay" detection on Fedora 17
Comment 7 Gabriel Jacobo 2012-06-02 07:00:13 UTC
Would you try again with this revision instead of the latest? http://hg.libsdl.org/SDL/rev/698c98b83cbb
Comment 8 Ellie 2012-06-02 07:37:37 UTC
"checking for const parameter to XextAddDisplay" also broken in rev 698c98b83cbb, despite with other config.log code and error.
Comment 9 Ellie 2012-06-02 07:38:51 UTC
Created attachment 867 [details]
config.log of failed "checking for const parameter to XextAddDisplay" detection on Fedora 17 from older SDL rev 698c98b83cbb
Comment 10 Gabriel Jacobo 2012-06-02 07:44:26 UTC
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.
Comment 11 Ellie 2012-06-02 09:16:30 UTC
Created attachment 868 [details]
/usr/include/X11/extensions/extutil.h header file as present on my Fedora 17 system
Comment 12 Gabriel Jacobo 2012-06-03 13:37:07 UTC
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
Comment 13 Ellie 2012-06-05 02:21:00 UTC
Rev. 7c37af802e63 compiles well here:

checking for const parameter to XextAddDisplay... yes