spo600:building_gcc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
spo600:building_gcc [2024/10/17 17:44] – chris | spo600:building_gcc [2025/01/31 15:14] (current) – [Step 3: Perform the Build] chris | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | **This page is under construction - do not rely on it yet** | ||
- | |||
====== Building GCC ====== | ====== Building GCC ====== | ||
Line 9: | Line 7: | ||
===== Step 0: Decide Where to Build ===== | ===== Step 0: Decide Where to Build ===== | ||
- | You can use the [[SPO600 | + | You can use the [[SPO600 Servers]] or your own systems. |
+ | <!-- | ||
+ | **CRITICAL: | ||
===== Step 1: Obtain the Source Code ===== | ===== Step 1: Obtain the Source Code ===== | ||
The GCC source is available from four places: | The GCC source is available from four places: | ||
- | 1. As a [[https:// | + | - As a [[https:// |
- | 2. As a [[https:// | + | |
- | 3. As official [[https:// | + | |
- | 4. Via a read-only [[https:// | + | |
Of these sources, I recommend using #1 or possibly #4 for development work. Clone the repository to your local machine as usual using standard '' | Of these sources, I recommend using #1 or possibly #4 for development work. Clone the repository to your local machine as usual using standard '' | ||
Line 27: | Line 27: | ||
Instead, you should create a separate build directory. From this build directory, you should invoke the configure script which is in the root directory of the source repository. | Instead, you should create a separate build directory. From this build directory, you should invoke the configure script which is in the root directory of the source repository. | ||
+ | You can pass parameters to the configure script. The most important is to configure the " | ||
+ | |||
+ | For example, if the source is in '' | ||
< | < | ||
- | </ | + | mkdir ~/ |
+ | cd ~/ | ||
+ | ~/ | ||
+ | |||
+ | If there are any required build dependencies (libraries, headers, or build tools) which are not present on the system, you will be notified by the configure script. Install the required build dependencies and then re-execute the configure script. | ||
+ | |||
+ | ===== Step 3: Perform the Build ===== | ||
+ | |||
+ | If you are unfamiliar with the '' | ||
+ | |||
+ | Once you have configured the build, you can use '' | ||
+ | |||
+ | Before building, consider that the build may take anywhere from 20 minutes to several hours depending on the build options, speed of the build computer, and what else is being done on the computer (e.g., multiple builds by several users). It is strongly recommended that you use the [[Screen Tutorial|screen]] utility (or similiar tool) to permit disconnection and reconnection if needed. | ||
+ | |||
+ | It is also recommended that you record the time taken for the build to complete using the shell built-in '' | ||
+ | |||
+ | Putting these recommendations together, you could build on a 16-core system with a command such as this: | ||
+ | |||
+ | < | ||
+ | |||
+ | The '' | ||
+ | |||
+ | ===== Step 4: Install the Build ===== | ||
+ | |||
+ | **Critical!** Never install a test or development build as the __root__ user (using '' | ||
+ | |||
+ | To install the software into the directory that you configured in step 2, run '' | ||
+ | |||
+ | ===== Step 5: Test the Build ===== | ||
+ | |||
+ | You can test the build using '' | ||
+ | |||
+ | < | ||
+ | |||
+ | ===== Cleaning Up ===== | ||
+ | |||
+ | To clean up a build directory, you can simply ... delete it! The source code is in the separate source directory and will remain unchanged. | ||
+ | |||
+ | Likewise, to clean up an installation directory that contains only a single build, you can simply delete that directory. | ||
+ | |||
+ | ===== Things to Watch For ===== | ||
+ | |||
+ | * Be aware of who else is using the build computer and what they' | ||
+ | * Be aware of available disk space ('' | ||
+ | * Keep an eye on currently-available memory (Use the command '' |
spo600/building_gcc.1729187058.txt.gz · Last modified: 2024/10/17 17:44 by chris