custom build tool in xcode

Discussion in 'Mac Programming' started by vertex78, Sep 20, 2009.

  1. vertex78 macrumors newbie

    Joined:
    Sep 20, 2009
    #1
    I am trying to get xcode setup to use scons as the build tool. So in the build tool line under the target I filled in the path to scons, but I keep getting the error: can't exec 'path to scons'

    So just to see if it was a permissions problem I reinstalled scons to my home directory, unfortunately I still get the exact same problem. The file exists, i can call it from the command line with no problems.

    Can anyone shed any light on what I may be doing wrong here?
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    Post the exact error message. Don't paraphrase it.

    If you're really getting the exact error message "can't exec 'path to scons' ", then it's because you've entered the literal text "path to scons" instead of a pathname like "/Users/vertex78/bin/scons".

    Also post the output of this command:

    Code:
    which scons
    
     
  3. vertex78 thread starter macrumors newbie

    Joined:
    Sep 20, 2009
    #3
    well which scons tells me /usr/bin/scons

    And the error message path has the above path in it.
     
  4. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #4
    Post the output from these two commands:

    Code:
    ls -ld /usr/bin/scons
    
    file /usr/bin/scons
    
     
  5. vertex78 thread starter macrumors newbie

    Joined:
    Sep 20, 2009
    #5
    ls -ld /usr/bin/scons gives:
    Code:
    -rwxr-xr-x  1 root  wheel  5889 Dec 21  2008 /usr/bin/scons
    file /usr/bin/scons gives:
    Code:
    /usr/bin/scons: a python script text executable
     
  6. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    If you type /usr/bin/scons at a command prompt in the terminal what is the response?
     
  7. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #7
    Is there a python interpreter available when Xcode tries to run /usr/bin/scons?

    Post the output from this command:

    Code:
    head -n 3 /usr/bin/scons
    
    The first line (with the #!) should show how the script's interpreter is being started.
     
  8. vertex78 thread starter macrumors newbie

    Joined:
    Sep 20, 2009
    #8
    output from head -n 3 /usr/bin/scons

    Code:
    #! /usr/bin/env python
    #
    # SCons - a Software Constructor
     
  9. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #9
    So far it all looks OK. I tried the interpreter line and it's executable. Can you post a screenshot of the exact line in XCode?
     

Share This Page