Failing at compiling source on Mavericks

  • JjStAr992_Gaming
    30th Jul 2014 Member 0 Permalink

    Ok.

     

    Either my place is all over the head or there's actually something wrong.

     

    I'm trying to compile TPT for OS X Mavericks and it is horribly failing. I'm following the wiki's instructions and it just won't work.

     

    Here's what's going on.

     

    It's bombing out at ./configure && make (from what I know, probably the ./configure part.)

     

    The error I'm getting is:

    ./src/video/x11/SDL_x11sym.h:168:17: error: conflicting types for '_XData32'
    SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len)...

    ./src/video/x11/SDL_x11dyn.c:95:5: note: expanded from macro 'SDL_X11_SYM'
    rc fn params { ret p##fn args ; }

    /usr/X11R6/include/X11/Xlibint.h:568:12: note: previous declaration is here
    extern int _XData32(

    I removed the CGDirectPaletteRef palette; line. Still not working.

     

    Tried using SDL 2.0.3 instead of 1.2.15. That time, I got to compiling Powder Toy, but got this:

    src/PowderToySDL.cpp:6:10: fatal error: 'SDL.h' file not found<<br/>#include "SDL.h"

    I'd just like to know one thing: What the hell is going on?

     

    If you need more info, just let me know and I'll try supply it (this is a school-supplied Mac I'm working on :P)

     

    Thank you for any assistance,

     

    JjStAr992_Gaming

    Edited 3 times by JjStAr992_Gaming. Last: 31st Jul 2014
  • Darthan
    30th Jul 2014 Member 0 Permalink

    supplied by school? thats your problem I think, but if not im not sure; I am not great at these things because they dont teach these things at high school

  • edza101
    30th Jul 2014 Member 1 Permalink
    @JjStAr992_Gaming (View Post)

    Looks like you are missing the SDL library. Just go to here and pick up the library, and install. You should get no errors then. Make sure to use 2.0.3 as it is the supported version. I might be wrong but I'm pretty sure.

    @Darthan (View Post)

    Cool story, because school these days is obviously the best way to learn now isnt it. Not only is assuming school is a good way to learn stupid but also assuming you cant learn anything out of school is stupid.

    (or you can just click here to download directly I think)
    Edited once by edza101. Last: 30th Jul 2014
  • minecraft-physics
    30th Jul 2014 Member 0 Permalink
    @JjStAr992_Gaming (View Post)
    Well, sorry to tell you this, but I helped to write that wiki page, and it doesn't work....
    At least it doesn't fail as badly as the old wiki used to say, but still, nobody knows how to compile using the piece-of-shit that is OSX 10.9
    Edited once by minecraft-physics. Last: 30th Jul 2014
  • wolfy1339
    30th Jul 2014 Member 0 Permalink

    @JjStAr992_Gaming (View Post)

     It's not BBCode on the forums, it's HTML just replace the [ with < and ] with >

    There is a TPT download for the latest version, but it is hidden because it introduced compatibilty problems with inferior versions of OS X.

  • jacob1
    30th Jul 2014 Developer 1 Permalink
    i'm not sure why the guide recommends compiling SDL, I would think there should be a precompiled SDL that works somewhere. Also SDL 2 won't work at all, TPT uses SDL 1.2. Possible link: https://www.libsdl.org/release/SDL-1.2.15.dmg

    So once you have SDL hopefully it works :P
  • JjStAr992_Gaming
    31st Jul 2014 Member 0 Permalink

    jacob1:

    i'm not sure why the guide recommends compiling SDL, I would think there should be a precompiled SDL that works somewhere. Also SDL 2 won't work at all, TPT uses SDL 1.2. Possible link: https://www.libsdl.org/release/SDL-1.2.15.dmg

    So once you have SDL hopefully it works :P

     

    Yaaay, it works! But, another problem! D: This one occurs when I attempt to build TPT. Got an error about lua.h missing. Fixed that with brew install lua.

     

    So... what's this supposed to mean? Typo or scons fail?

     

    src/socket/inet.c:93:58: error: no member named 'h_addr' in 'struct hostent' lua_pushstring(L, inet_ntoa(*((struct in_addr *) hp->h_addr)));

     

    What now?

    Edited 5 times by JjStAr992_Gaming. Last: 31st Jul 2014
  • jacob1
    31st Jul 2014 Developer 0 Permalink
    @JjStAr992_Gaming (View Post)
    It looks like you need to define _DARWIN_C_SOURCE (possibly). Either add env.Append(CPPDEFINES="_DARWIN_C_SOURCE") near the bottom of the sconscript, or define it some other way.

    Also, switching to the develop branch (has the real latest source) might work too, apparently whatever causes it has been fixed there?
  • JjStAr992_Gaming
    2nd Aug 2014 Member 0 Permalink

    When will this saga ever end?

     

    ld: framework not found Lua

     

    I have Lua installed, so what's going on here?

  • jacob1
    2nd Aug 2014 Developer 0 Permalink
    @JjStAr992_Gaming (View Post)
    at which point do you get that error, is that before compiling when it checks to see if the Lua framework exists? I'm actually about to try setting up a mac vm so I can see how easy / hard it is to compile on mac :P.

    Also, where is the Lua framework located? Maybe you need to use some option to tell it somehow ...