Learning to compile

Discussion in 'Mac Programming' started by silvermike, Oct 3, 2007.

  1. silvermike macrumors newbie

    Joined:
    Mar 12, 2005
    #1
    I downloaded a program that needed to be compiled to be used, and I'm trying to teach myself the process. The first problem I had when I ran a ./configure was missing SDL 1.2. I downloaded it, but when I try to run it, I'm instructed to run ./configure, then make, then make install. I got through the first two steps, and the third told me permission denied (i'm the only user). I repaired permissions, and then tried again, and the same problem cropped up, only on the second step. Help!

    This is all in Terminal on OSX 10.4.10.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    When you do
    Code:
    make install
    try
    Code:
    sudo make install
    instead. It will ask you for your password, and should work fine.
     
  3. silvermike thread starter macrumors newbie

    Joined:
    Mar 12, 2005
    #3
    Okay, that worked, now SDL seems to have installed successfully - I'm still stuck with this error, though:

    *** The sdl-config script installed by SDL could not be found
    *** If SDL was installed in PREFIX, make sure PREFIX/bin is in
    *** your path, or set the SDL_CONFIG environment variable to the
    *** full path to sdl-config.
    configure: error: *** SDL version 1.2.0 not found!

    That's what I just installed

    Thanks for your help!

    presumably the SDL_CONFIG environment variable is in the configure script, but I don't know how to open and alter it.
     
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  5. silvermike thread starter macrumors newbie

    Joined:
    Mar 12, 2005
    #5
    Thanks for your continued help.

    I have gotten the computer to find the damn file, but I'm still getting permission problems - and running with sudo in front of a .configure command isn't asking for my password or bypassing any permissions. Is their a different command for it?
     
  6. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #6
    You don't need sudo with configure. Use it with the "make install" command.
     
  7. silvermike thread starter macrumors newbie

    Joined:
    Mar 12, 2005
    #7
    Right - but I haven't gotten there yet; when I try to configure it, it finds the appropriate SDL file, but then gets a permission denied error.
     
  8. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #8
    What is the error? There are different types of permission errors.
     
  9. silvermike thread starter macrumors newbie

    Joined:
    Mar 12, 2005
    #9
    checking for SDL - version >= 1.2.0... ./configure: line 1: /Users/Mike/LORDS/SDL-1.2.12/bin/sdl-config: Permission denied
    ./configure: line 1: /Users/Mike/LORDS/SDL-1.2.12/bin/sdl-config: Permission denied
     

Share This Page