Installing Xcode, Apple s Developer Tools

 < Day Day Up > 

Chapter 14. Command-Line Software Installation and Troubleshooting

IN THIS CHAPTER

  • Installing Xcode, Apple's Developer Tools

  • Installing Software at the Command Line

  • Installing Some Additional Interesting Software

  • Troubleshooting Software Installs, and Compiling and Debugging Manually

  • Using Common Sense and Configuration Options

  • Fiddling with File Locations and Fighting with Installers

  • Tracing Software Problems to the Source: Using the gdb Debugger

This chapter introduces software installation at the command line. You're almost undoubtedly familiar with installing software in the graphical user interface: double-click the installer, answer a few questions, and away it goes. You might be surprised to find that installing at the command line isn't much more difficult: type a few relatively standard command-line incantations and away it goes. We'll focus specifically on command-line installs for command-line software because that is the variety that will be the least familiar. You should be aware, however, that some GUI software might require you to install it by using a command-line program such as tar. And, peculiarly, some command-line software is only distributed for Mac OS X as a packaged GUI installer.

Although it might sound like an entirely foreign concept because of the long-standing position of Unix at the forefront of the Open Source software movement, the majority of traditional Unix programs are distributed as source code rather than as executable applications. That is, when you download the installer for a Unix application, you get a recipe, not a finished cooked product. You (and the automated systems on your machine) are expected to cook (compile) it yourself to turn it from the recipe (source) into the product (application). If you're like most classic Macintosh users, you've probably never even looked at the code it takes to create a program, let alone tried to convince a machine to turn it into a fully functional application. As Mac OS X becomes more popular and more prevalent in the market, we're seeing much more software distributed in precompiled form to satisfy those who really don't want to know this stuff. There are, however, still many useful applications that haven't been built into nice, neat, clickable Mac OS X installers (actually, there are many, many more that haven't been built than have), and until they are, building your own really isn't that difficult.

The components needed to compile and install many pieces of Unix software right out of the box (or more accurately, right out of the ftp directory) are already located on your system. You need some support files that tell software how to interact with the hardware, the source for whatever application you want to build, and a compiler to build it with. In the good tradition of Unixes everywhere, Apple has provided the first and last of these for you; all that remains is for you to pick the software you want and issue a few fairly standard commands.

NOTE

Just so that you don't take this the wrong way not all Unix software compiles as easily as what we demonstrate here. Apple has arranged some things in a sufficiently nonstandard fashion that some software seemed almost impossible to compile in Mac OS X version 10.0.4. Although things definitely got better in 10.2, and 10.3 and 10.4 have further improved, it's still not as easy as using a Unix that's been around for 15 years. We expect that things will continue to improve over time and that more software will compile cleanly. For the adventurous, the second half of this chapter details some of the steps that can be taken if the standard procedures at the beginning of this chapter don't work properly for the software you want. Even if you're comfortable rolling up your sleeves and jumping into the code, we can't guarantee that everything you try can be compiled.


     < Day Day Up > 


    Mac OS X Tiger Unleashed
    Mac OS X Tiger Unleashed
    ISBN: 0672327465
    EAN: 2147483647
    Year: 2005
    Pages: 251

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net