Programming with GNU Software
Chapter 4 begins with an overview of the compilation process, including the preprocessor, translator/optimizer, assembler and linker, plus many other tools (such as the libraries) that take part in the software development process. There are many compiler options, optimization levels and intermediate file formats you can use. Like the rest of the book, this chapter does not attempt to be a comprehensive reference. Instead, it does a good job of discussing the most frequently used commands and options, and adds tips that even power users will appreciate. The chapter ends with an introduction to cross-compilers, and the requirements for building your own libraries in a cross-development environment. A table is included that outlines the large number of host and target systems supported by the Cygnus libraries, and the output formats such as a.out, COFF and ELF, that can be generated.
Chapter 5 continues with more details about using the C and C++ libraries, and what is needed to support the system interface to Unix- or Posix-like systems. So if you are interested in porting Linux to the latest 64-bit PDA or the new WebTV your aunt just bought on sale, this is the place to learn what it takes. Keep in mind that these two chapters are not about the C or C++ languages or how to write programs. Many other books are more useful as learning aids (see the Resources sidebar). Chapter 5 ends with a brief discussion of the library licensing issues.
The GNU debugging tool, gdb, is an interactive shell with its own commands, history (previously executed commands) and editor (Emacs-like, of course). The basic idea is that you can control and examine the internal working of an executing process, and interact with its source code and variables. The coverage of gdb is extensive here, and I have not seen gdb covered with a good tutorial in any other reference. This coverage alone could be worth the price of the book.
The make utility is used to build programs from multiple sources and compiles only files in need of updating, based on the date stamps and dependencies for each file. It is fairly easy to write simple dependencies so that if an include file is changed, for example, only the files that use it are recompiled; automating these steps saves time when building a new executable program. The make utility has been around a long time and has become very sophisticated, and the GNU make is one of the most comprehensive. The coverage in Chapter 7 is brief, but is an excellent tutorial introduction that covers both basic and advanced features. For more in-depth coverage, see the O'Reilly book on make.
The RCS revision control system is a tool to manage the versions of a program as it evolves over time. GNU make is aware of RCS, and can automatically use the current revisions. Again, the coverage is brief but presents sufficient basics for you to start using them; further details are available in other works from O'Reilly and FSF.
There are two tools for timing and profiling your programs: time and gprof. The time command is built into the bash shell and is similar to the timex command in other shells. It simply gives the elapsed execution time of a program as a whole, broken down by user and system, with a few additional system details. The gprof tool is a report generator that can provide detailed information on where your program is spending its time. The gprof utility can give either a one-dimensional profile or a two-dimensional accounting that follows the call graph of your program. The call graph starts with the main() function and has an execution breakdown for every function called that includes both the time spent and the number of times the function is called. It even handles recursive programs. Learning to use gprof is the best way to improve the performance of your programs. Coverage of this important tool has not been easily available elsewhere and is another reason why this book is a valuable resource.
What is particularly good about this book is the combination of an excellent tutorial style that makes it easy for you to get started, and depth that cuts to the important topics in each subject. Even if you are already experienced with C/C++ programming using Unix tools, you will find many useful tips. With only about 250 pages, this is brief coverage, and the one thing I might wish for is a more complete reference. For that we will have to turn elsewhere, such as the info pages and the references listed below. I'm sure this book will be a valuable reference for me for some time. The authors, Mike Loukides and Andy Orem, are senior technical editors with O'Reilly and have done an excellent job that rises well above the average for software documentation.

Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- A Topic for Discussion - Open Source Feature-Richness?
- Dynamic DNS—an Object Lesson in Problem Solving
- Tech Tip: Really Simple HTTP Server with Python
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




2 hours 10 min ago
4 hours 26 min ago
4 hours 54 min ago
5 hours 52 min ago
7 hours 21 min ago
8 hours 30 min ago
9 hours 16 min ago
15 hours 52 min ago
21 hours 30 min ago
1 day 3 hours ago