Compiling Valgrind on OS X 10.8 Mountain Lion

Discussion in 'iOS Programming' started by mcourteaux, Jul 10, 2012.

  1. mcourteaux, Jul 10, 2012
    Last edited by a moderator: Jul 10, 2012

    mcourteaux macrumors newbie

    Joined:
    Jul 10, 2012
    Location:
    Belgium
    #1
    Hi, this is my first post, hopefully I chose the right forum.

    I'm a fan of Valgrind and want to use it for my iOS development, because I'm having some memory trouble. Valgrind is by the official developers supported until OSX 10.7 Lion, currently. But I'm working on the Mountain Lion version. Currently, I'm using XCode 4.4 Developer Preview 5.

    I found some information on how to use it for iOS development. The first step is to compile it. And that is what not working.

    What is happening is that the "configure" script is checking the version of OS X. It detects that I'm on OS X 10.8 and says it. What I tried doing was to edit the configure script to make it accept my version of OS X. This was successful, the script "configured" everything, but unfortunately, the compilation failed. Terminal output added as an image.

    Does anyone know how to fix this, or has anyone succeeded compiling Valgrind on OS X 10.8?

    Hopefully, great answers! Thanks for reading my question and for effort!

    Martijn

    Code:
    make
    [​IMG]

    Code:
    ./configure
    [​IMG]
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    I don't know anything about valgrind or the details of your question but I have a few comments.

    A quick google of TASK_WIRED_LEDGER_PORT shows that it's in an Apple header file under the comment "Evolving and likely to change" So it's possible that these constants and functions simply no longer exist on 10.8. It's also possible that they moved to another header or are #ifdefed out for some reason. If they're gone then you may not be able to fix this problem.

    It's also possible that you don't have all your macros set up correctly and the reason for the undeclared symbol error is just an #include problem.

    Anyway you need to try to figure out the compile errors to understand why these few symbols aren't available.
     
  3. mcourteaux, Jul 11, 2012
    Last edited: Jul 11, 2012

    mcourteaux thread starter macrumors newbie

    Joined:
    Jul 10, 2012
    Location:
    Belgium
    #3
    Thanks, I re-#define-d the macros manually in the correct file. Compilation got a lot further, but now, it gets stuck at here:

    [​IMG]
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    Well, you're down to one linker error. Not bad.

    google tells me that vm_deallocate is part of the mach kernel. I assume that it's present in 10.8. I don't know for sure what library it's in. I guess you need to make sure that you're linking against the library that has that function.
     
  5. NegativeLatency macrumors newbie

    Joined:
    Jul 29, 2012
    #5
    Are you still working on getting Valgrind to compile? any progress?
     

Share This Page