Compiling Notaz's SDL.


Linux-SWAT

Forum Addict!
Joined
Feb 13, 2010
Messages
9,174
Hi !


So i grabbed it:


git clone git://notaz.gp2x.de/~notaz/sdl_omap.git


did the ./autogen.sh


Now i would like to know which exact exports and ./configure options are used for the Pandora build.


Also, does it include some other SDL like SDL_sound, or SDL_gfx etc. ?
 
Last edited by a moderator:
Now i would like to know which exact exports and ./configure options are used for the Pandora build.
I use this (compiling with OE toolchain):


./configure --host=arm-angstrom-linux-gnueabi --disable-esd CPPFLAGS='-mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -ffast-math -mfpu=neon'

Also, does it include some other SDL like SDL_sound, or SDL_gfx etc. ?
No.
 
Ah, 'cause i saw many option flagged as "yes" when i did ./configure --help. So you have neutralized them ?
 
For info:


configure: WARNING: unrecognized options: --disable-debug, --enable-endian, --disable-video-xbios, --disable-video-gem, --enable-dlopen
 
So i installed your SDL.


When trying to compile SDL addons (ttf mixer, etc.), and also mame4all, i got this error:


/usr/lib/libSDL.so: undefined reference to `_XGetRequest'


--EDIT:


Found this official patch:


http://bugzilla.libs...bug.cgi?id=1376


Lines numbers were wrong, so i applied manually.


Compiling.


--EDIT2:


BTW, i found that comment in the official Slackware SDL build script:


# we don't want sdl to load the libs with dlopen(), gcc is smarter...


--EDIT3:


Saw those warnings:


./src/video/x11/SDL_x11events.c: In function ‘X11_TranslateKeycode’:


./src/video/x11/SDL_x11events.c:1106:2: warning: ‘XKeycodeToKeysym’ is deprecated (declared at /usr/include/X11/Xlib.h:1695) [-Wdeprecated-declarations]


./src/video/x11/SDL_x11events.c: In function ‘get_modifier_masks’:


./src/video/x11/SDL_x11events.c:1198:4: warning: ‘XKeycodeToKeysym’ is deprecated (declared at /usr/include/X11/Xlib.h:1695) [-Wdeprecated-declarations]


--EDIT final:


mame4all and SDL addons compiled fine. Do you plan to include this patch in your sources ?
 
Last edited by a moderator:
I have a Hunk #2 succeeded at 183 with fuzz 1. Dunno why.


It's maybe the third time i edit a patch in my life ^^.


I checked the results, and compiled it, then addons again, it's ok.


As said in the link, it's supposed to work also fine with older libs, but i didn't tested.



Code:
# HG changeset patch

# User Ryan C. Gordon <icculus@icculus.org>

# Date 1326873803 18000

# Branch SDL-1.2

# Node ID e1264a758d5030fa9ffe9904e6eefd2c38098f5b

# Parent  6f013dd0add1c6809aeab04e306892198a207616

Add dynamic symbol for _XGetRequest, which libX11 1.4.99.1 added.

Fixes Bugzilla #1376.

diff --git a/src/video/x11/SDL_x11dyn.c b/src/video/x11/SDL_x11dyn.c

--- a/src/video/x11/SDL_x11dyn.c

+++ b/src/video/x11/SDL_x11dyn.c

@@ -109,6 +109,21 @@

#undef SDL_X11_SYM



+static void *SDL_XGetRequest_workaround(Display* dpy, CARD8 type, size_t len)

+{

+ xReq *req;

+ WORD64ALIGN

+ if (dpy->bufptr + len > dpy->bufmax)

+  _XFlush(dpy);

+ dpy->last_req = dpy->bufptr;

+ req = (xReq*)dpy->bufptr;

+ req->reqType = type;

+ req->length = len / 4;

+ dpy->bufptr += len;

+ dpy->request++;

+ return req;

+}

+

static int x11_load_refcount = 0;


void SDL_X11_UnloadSymbols(void)

@@ -168,6 +183,15 @@

   X11_GetSym("XGetICValues",&SDL_X11_HAVE_UTF8);

   #endif


+  /*

+   * In case we're built with newer Xlib headers, we need to make sure

+   *  that _XGetRequest() is available, even on older systems.

+   *  Otherwise, various Xlib macros we use will call a NULL pointer.

+   */

+  if (!SDL_X11_HAVE_XGETREQUEST) {

+   p_XGetRequest = SDL_XGetRequest_workaround;

+  }

+

   if (SDL_X11_HAVE_BASEXLIB) {  /* all required symbols loaded. */

    SDL_ClearError();

   } else {

diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h

--- a/src/video/x11/SDL_x11sym.h

+++ b/src/video/x11/SDL_x11sym.h

@@ -170,6 +170,12 @@

#endif


/*

+ * libX11 1.4.99.1 added _XGetRequest, and macros use it behind the scenes.

+ */

+SDL_X11_MODULE(XGETREQUEST)

+SDL_X11_SYM(void *,_XGetRequest,(Display* a,CARD8 b,size_t c),(a,b,c),return)

+

+/*

  * These only show up on some variants of Unix.

  */

#if defined(__osf__)
 
I compiled the new version, now i only have the left part of the screen displayed in Cannonball under Slackware !
 
Hi Notaz,

I seems the omapdss doesn't support mouse in relative mode (maybe because of the support for TS lib?). Do you think it is feasable to add support for it? DosBox for example use it (because DOS cursor has some unknown offset comared to native cursor, it need to have relative movement even if the cursor is already on a border of the screen).
 
Back
Top