Building from source Mac OS 10.5.7

Discussion in 'macOS' started by holden57, Aug 6, 2009.

  1. holden57 macrumors member

    Jul 18, 2009
    I'm trying to learn how to build applications from source on Mac OS 10.5.7, and I'm not really sure how to do it. What do you do with files that look like 'filename.tar.gz' or 'filename.tar.bz2'. How do you install these and build them on your computer?

    Thank You
  2. mslide macrumors 6502a

    Sep 17, 2007
    It's all done on the command line in terminal. First you need to unpack the archive. There are probably ways to unpack it with a GUI but I prefer to just use Terminal. You'll most likely have to use terminal to compile the code anyway. You'll obviously need XCode installed to build anything. In Terminal do the following if it is a .gz file:

    tar -zvxf filename.tar.gz
    If it's a .bz2 file:

    tar -jxvf filename.tar.bz2
    Do a 'man tar' if you want to know what those command line options do. That will usually create a directory called whatever 'filename' is. Go into that directory (cd <filename>). There should be a README file and/or an INSTALL file that tells you how to build it, however, most open source software is built using the GNU autoconf/make/etc tools. The typical way to do it is:

    That will build the code. You may want to install it. You will probably need to be a superuser to do that and thus you should know where it is going to be installed and if it will overwrite anything in the process. Make sure you know what you are doing and what will happen when you do this or you can screw up your computer ...

     sudo make install
    You should still read the README file though. configure may take arguments.
  3. holden57 thread starter macrumors member

    Jul 18, 2009
    Thank you, that sounds pretty strait forward, so as long as I'm in the right directory, it will know 'what' to install?

    Another quick question, how do you uninstall?

Share This Page