User:NeoAmsterdam/Snippets/Source Code: Difference between revisions
NeoAmsterdam (talk | contribs) m (Appearance fix) |
NeoAmsterdam (talk | contribs) m (Upon further consideration, forget the `float`) |
||
Line 1: | Line 1: | ||
<div style=" |
<div style="background: #aaa; border: thin solid #555; color: #000;"><b>This procedure builds software from [[User:NeoAmsterdam/Snippets/Source Code|source code]].</b><small><br />Developers’ tools must be installed. Your results may vary.</small></div><noinclude>Source code is a collection of instructions. Computers do not understand these instructions until it is translated into the computer’s own language. Building source code is translating instructions that people can understand into instructions that computers can understand and act upon. |
||
Most programs a user may want can be obtained by downloading an [[activities|activity]] or by installing it with [[User:NeoAmsterdam/Snippets/Yum|yum]]. However, there are times when a user wants a program that is not available as an activity and is not available through yum. When this happens, one has to build the program from its source code. |
Most programs a user may want can be obtained by downloading an [[activities|activity]] or by installing it with [[User:NeoAmsterdam/Snippets/Yum|yum]]. However, there are times when a user wants a program that is not available as an activity and is not available through yum. When this happens, one has to build the program from its source code. |
Latest revision as of 10:52, 17 February 2011
Developers’ tools must be installed. Your results may vary.
Source code is a collection of instructions. Computers do not understand these instructions until it is translated into the computer’s own language. Building source code is translating instructions that people can understand into instructions that computers can understand and act upon.
Most programs a user may want can be obtained by downloading an activity or by installing it with yum. However, there are times when a user wants a program that is not available as an activity and is not available through yum. When this happens, one has to build the program from its source code.
This document will briefly explain how prepare your XO so that it can build programs from source code. Please note that this covers only the most popular form of building from source code (./configure; make; make install).
Finally, children should get permission from a parent, guardian, teacher, and/or Linux guru before building source code. Adult supervision is not required, but guidance is highly recommended.
Prerequisites
If misused, yum can render your XO unusable. Please read the documentation before using yum.
Compiler
Before you can translate source code into a program, you need to have the translation program (or “compiler”) installed. The most prevalent compiler is the GNU Compiler Collection, better known as “GCC”. GCC can be installed with yum:
- Open the Terminal Activity
- Type su
You can now use yum. - Type yum install gcc
- yum will ask you to confirm installing GCC. To continue, type y; to stop, type n
- yum will install GCC. When it has finished, type exit
Toolchain
Although you can build programs with GCC, other tools are often needed. Three of the most common ones used are autoconf, automake, and patch. These can also be installed with yum:
- Open the Terminal Activity
- Type su
You can now use yum. - Type yum install autoconf automake patch
- yum will ask you to confirm installing autoconf, automake, and patch. To continue, type y; to stop, type n
- yum will install autoconf, automake, and patch. When it has finished, type exit