702-100 practice question 8 of 15

Which statement about the difference between compiling an application from source code and installing a pre-compiled binary is true?

Full set: 60 questions
Answer options
A: Compiling source code is faster than installing a pre-compiled package.
B: An application compiled from source code is more secure than a pre-compiled program
C: Building an application from source code allows setting options which can not be changed when executing the application Correct answer
D: Pre-compiled binaries offer more configuration possibilities than those built from source.
E: Applications that require the user to accept a license are only available as pre-compiled packages.
Correct Answer:
C. Building an application from source code allows setting options which can not be changed when executing the application
Explanation

The primary advantage of building an application from its source code is the ability to customize it at compile-time. During the configuration step (commonly ./configure), developers can enable or disable specific features, link against particular library versions, or apply optimizations for their specific hardware. These choices are "baked into" the final executable binary. Once compiled, these fundamental options cannot be changed at runtime. In contrast, pre-compiled binaries are created with a general-purpose configuration intended to work on a wide range of systems, thus limiting this level of deep customization.

Why Incorrect

A. Compiling from source is a multi-step process (configure, make, install) that is almost always significantly slower than installing a ready-to-use pre-compiled binary package.
B. The method of installation does not guarantee security. A pre-compiled binary from a trusted, signed repository can be more secure than compiling unaudited source code from an unknown source.
D. Building from source offers the maximum number of configuration possibilities (compile-time options), whereas pre-compiled binaries have a fixed set of features chosen by the packager.
E. Licenses apply to both source code (e.g., GPL, MIT) and pre-compiled binaries (e.g., EULAs). The presence of a license is not exclusive to one distribution method.

References

1. GNU Autoconf Manual: In the documentation for autoconf, which generates configure scripts, it states, "The configure script allows the user to customize the build process, most commonly by selecting which features to build..." This customization happens before compilation and the choices are fixed in the resulting binary. (Reference: GNU Autoconf Manual, Section 2.1, "The User's View of configure").

2. Apache HTTP Server Documentation: The official installation documentation for the Apache web server details the numerous flags available for the ./configure script, such as --enable-ssl or --with-mpm=worker. The documentation notes, "Options for the configure script... affect which modules are built and included." These are compile-time decisions. (Reference: Apache HTTP Server Version 2.4 Documentation, "Compiling and Installing," httpd.apache.org/docs/2.4/install.html).

3. Red Hat Enterprise Linux 8 Documentation: In the section on building packages, it is explained that a spec file controls the build process, including which build-time dependencies and configuration flags (%configure) are used. This contrasts with installing a pre-built RPM, which offers only runtime configuration. (Reference: Red Hat Enterprise Linux 8 Documentation, "Building RPM packages," Chapter 10, Section 10.2 "The SPEC file").

Scroll to Top