TuxPPC
TuxPPC
home   |   submit: news, guide,   |   volunteer   |     |  


Sponsored by
Sponsored by PowerMax.com

Buy iMac


News Editions

About iMac

About Linux

Getting Started

Getting Help

User Resources

Advertisement

Distributions

Software Picks






Search

 

Links
  iMacLinux Edition Thursday, 03 July 2003  



Posted by on Saturday December 02nd, 2000 12:46:47 AM
Alot of free software out there doesn't have PowerPC Linux binaries. Most of it on the other hand, has source code, using "automake" that makes compiling a snap (so easy, it's just tar -zxvf packagename.tar.gz; cd packagename; ./configure; make; make install). This howto covers in detail what you need to compile your own software, and common problems people run into.


Required Software

If you choose install development software when installing Linux, you probably are already to start compiling. Otherwise you probably will need to install:

Compilers - Builds Software for You

  • gcc: the c compiler
  • gcc-c++: the c++ compiler

    Misc. Utilities - Additional Programs, Usually Required

  • binutils: Utilities used in creating binaries
  • automake: Generates makefiles for you (most Linux software requires this).
  • autoconf: Allows use of ./configure scripts.

    Headers/devel - *.h files, that contain code to be included

  • kernel-source: Most programs require kernel source to compile. Some distros have kernel-headers, which takes up less disk space, and only contains the headers, and not the full source.
  • libc-devel: libc headers, required by almost everything.
  • others: depending on what you are building, ./configure may require you to install additional -devel packages.

    Installing Required Software

    Yellowdog: yup install packagename

    LinuxPPC: rpm -Uvh http://ftp.linuxppc.org/software/packagename.ppc.rpm

    Debian: apt-get install packagename

    Uncompressing the Source Code

    First you need to uncompress, and "untar" the source. To do this, you must decide if the source is bzip2 compressed (ends with a .tar.bz2, or if it's gzip compressed (ends with either a .tar.Z, .tgz or a .tar.gz).

    If it is a gzip compressed, you can uncompress and "untar" it using: tar -zxvf filename.tar.gz or tar -zxvf filename.tgz

    If it is bzip2 compressed (and you have a newish Linux distro) you can uncompress and "untar" it using: tar -Ixvf filename.tar.bz2

    If you have an old Linux distro (such as LinuxPPC 1999 or Yellowdog Linux 1.0) use: bzip2 -dc filenmae.tar.bz2 | tar -xv

    Configuring the Source Code

    cd into the directory where the source code is.

    Run ./configure. This program will check to see if you have the proper software installed on your system to compile the software, and set the software's Makefiles up so they match your system's configuration.

    It may fail here, telling you need to install some package (usually some -devel package). Don't panic, just install what it asks for.

    You may have to repeat the above ./configure proccess multiple times, as it may ask you to install additional software each time you run it.

    If the program lacks ./configure, you should read the INSTALL file in that directory. It will explain to you how to compile it. If it lacks an INSTALL file, just try skipping down to next step -- making the software.

    Compiling the Software

    Note: Depending on what your compiling, the speed of your machine, and the amount of RAM, compiling may take an extended period of time, and may push your machine hard (meaning it could get slow while compiling, make your Hard Drive work hard (sometimes refered to as "thrashing")).

    To compile most software you should just type in make.

    If you get errors about missing *.h files, most likely you need to install, yet another -devel package. Other errors might be caused by broken source code that won't compile on the PowerPC, or by hardware problems (compiling software pushes your computer harder then anything else it does).

    Installing the Software

    When you are ready to install the software, become root, using the su - command.

    To install the Software, use make install.

    This installs the software, watch carefully to see where it is installing, so you know for future reference. Almost all software compiled from source goes into /usr/local, with binaries in /usr/local/bin and libraries in /usr/local/lib.

    Good Luck. Send comments to Andrew B. Arthur, . Permission is given to do anything you want with this.

Search for devel

The Fine Print: The following comments are owned by whoever posted them.
(Reply)

by on Monday December 24th, 2001 07:03:49 PM
Hey, Sometimes, after finishing an install of sorts, i can definitly find the binaries where they were installed, but can seem to run them, unless im in that directory (and only with a ./) what's the deal with that?

  Legal and Privacy Notices Copyright © 2001