1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Problem compiling SDL2.0.3 with CDevtools

Discussion in 'C /C ++' started by trabitboy, Dec 2, 2014.

  1. trabitboy

    trabitboy Still Fresh

    Joined:
    Oct 24, 2008
    Messages:
    38
    Hello!

    After porting a rather big sdl project to sdl2 and the raspberry, 

    fully through ssh / nano / gdb / etc, I thought " WHAT THE HELL , let's get the pandora out and get some use out of it "  B)

    but using the CDevtools and trying to build SDL2 at the root of my sd after

    ./autogen.sh

    ./configure

    make

    I get no member named on 'GLES2_DriverContext', ( attached screen , can't ssh here to the pando to cut paste )

    which make me wonder if the gles stuff is in the pnd?

    actually, greping through /usr in the pnd, I could find no definition of this object .

    Any idea?

    Anybody interested in SDL2.0.3 around here ?

    Thanks for your time !

    edit: the struct that has pb is in SDL2 src , which is weird.

    since I could build the exact same archive on raspberry, probably something is in the platform specific .h ?

    Taking any advice here , including RTFM .

    pando.png
     
    Last edited by a moderator: Dec 2, 2014
    Tags:
  2. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,581
    Location:
    France, near Lyon
    I have a working build of sdl2, compiled using codeblocks and had no such issues. That's odd.
     
    trabitboy likes this.
  3. trabitboy

    trabitboy Still Fresh

    Joined:
    Oct 24, 2008
    Messages:
    38
    Thanks for the pointer !

    I will try with the codeblocks PND  .

    Did you try from trunk or SDL 2.0.3 release ?

    I could see another topic on the forum with 2.0.1 .
     
  4. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,581
    Location:
    France, near Lyon
    I updated lately and had no issue. Last compilation was 2.0.3, and I had no issue. You should look for my patch for the Pandora also, to have it compatible with latest GLES driver (context creation forcing FrameBuffer mode) and patch for Pandora Keyboard mapping...
     
  5. trabitboy

    trabitboy Still Fresh

    Joined:
    Oct 24, 2008
    Messages:
    38
    Thanks for the tip,

    I'll try soon, got a bit sidetracked by the raspberry/pc version.

    Would you have a link to the patch?

    I hate to feel like a noob, but I don't know where to look for it ;)

    ( apart from googling "ptiseb" "sdl2" "patch" )
     
  6. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,581
    Location:
    France, near Lyon
    I'm not home now, I'll create a fresh one and put it here this weekend.
     
  7. trabitboy

    trabitboy Still Fresh

    Joined:
    Oct 24, 2008
    Messages:
    38
    Hello !

    Got spare parts for my pandora, 

    downloading the codeblocks pnd, and getting ready for a porting weekend :)

    The sdl2 patch would be nice indeed!
     
  8. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    607
    Location:
    Strasbourg, France
    I just have build SDL2.0.3 using cdevtools. There were three offending lines I have modified:


    src/libm/math_private.h:29:// typedef unsigned int u_int32_t;

    src/render/opengles2/SDL_gles2funcs.h:70:// SDL_PROC(GLint, glGetAttribLocation, (GLuint, const GLchar *))

    src/test/SDL_test_fuzzer.c:41:#define __USE_ISOC99 // added line

    I don't have any SDL2 programs at hand to check if it actually works.
     
    Last edited by a moderator: Dec 5, 2014
  9. trabitboy

    trabitboy Still Fresh

    Joined:
    Oct 24, 2008
    Messages:
    38
    I will try again with your tips and the cdevtools 2 then !
     
  10. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,581
    Location:
    France, near Lyon
    here is a patch for SDL2. It's a crude diff, you may need to clean it up a bit before applying.

    Includes are Keymap patch for pandora, GLES context creation using "FB" mode (compatible with newer video driver) and a still WIP (and not working) joystick patch...

    SDL_pandora.tar.gz
     

    Attached Files:

  11. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    607
    Location:
    Strasbourg, France
    I strongly suggest you use ptitSeb's patch, regardless of what PND you pick. But generally speaking, if you want to use newer libraries you'd better use codeblocks. Cdevtools is really more firmware-based, good to build kernel and modules.
     
  12. trabitboy

    trabitboy Still Fresh

    Joined:
    Oct 24, 2008
    Messages:
    38
    well the wifi on my pandora has got quite unstable ,

    so I could only cdevtools 2 on ( smaller ) !

    I'm trying with that now ;)

    will figure out how to copy the pnd from windows to the pandy sd card latere

    didn't see pti seb post, taking a look at the patch, thx !

    edit: right now I'm reduced to sneakernet, this wifi pb is damn annoying !

    I remember having this pb once , and super zaxxon reinstall fixed it ( how windows like !?!? )
     
    Last edited by a moderator: Dec 6, 2014
  13. trabitboy

    trabitboy Still Fresh

    Joined:
    Oct 24, 2008
    Messages:
    38
    hello again,

    ptiseb, applying the patch on a newly extracted sdl2.0.3.targ.gz fails ?

    some patches go through , some are rejected according to the logs.

    ( tried with cdevtools 2 pnd )
     
  14. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,581
    Location:
    France, near Lyon
    Yeah, it's an old patch. I have added much more hacks now, but not super clean, not sure it's worth refreshing it. Can you post the log from patch here?

    With dimag0g patch, it should compile in CdevTools2 with no issues.
     
  15. trabitboy

    trabitboy Still Fresh

    Joined:
    Oct 24, 2008
    Messages:
    38
    Hello,

    I've been sidetracked trying to complete a feature instead of the port ;)

    I'll get back to it this week and post the output log.

    I have too mildly noob questions:

    - I like to work other ssh ( bigger screen ) . How to get the context of the cb / cdev tools shell from ssh ? is there a script to run in the pnd ?

    - I also have an sdl1.2 target; if SDL2 is not widely used on pandora, I remember reading years ago about an accelerated version of sdl 1.2 on pandora, is it still current?

    ( sorry the information is pretty hard to get, it's not terribly centralized )
     
  16. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    7,581
    Location:
    France, near Lyon
    Yes, SDL1.2 can be hardware accelerated. Use the environnement variable "SDL_VIDEO_DRIVER=omapdss" to use it. I i's forced fullscreen, and feature hardware up/down scaling.

    About SSH, I think I have posted the script I use somewhere, but I don't remember where, I'll repost it here tonight.
     
    Last edited: Sep 5, 2016
  17. dimag0g

    dimag0g Very Active Member

    Joined:
    Jan 12, 2011
    Messages:
    607
    Location:
    Strasbourg, France
    if you need cdevtools over ssh, you have two options:

    - install pnd_utils and start pqr cdevtools directly in your ssh session

    - run cdevtools on your pandora and manually cd to /mnt/utmp/cdevtools in ssh, then run bash --rcfile=setup/.cdevrc
     
    Last edited by a moderator: Dec 8, 2014
  18. trabitboy

    trabitboy Still Fresh

    Joined:
    Oct 24, 2008
    Messages:
    38
    trying today!

    well thanks for that last bit :}
     
  19. nickcarter

    nickcarter Newbie

    Joined:
    Sep 5, 2016
    Messages:
    1
    Howdy trabitboy!
    this problem i haven't met yet!
    really this is a difficult error!
     

Share This Page

Loading...