Gentoo Logo

Why Build From Source

1.  Why build from source?

  • Building from source ensures that the source exists and compiles properly, which is the basis of regular open-source development.
  • Bugs may be found and fixed between upstrem releases. By compiling from source, we are able to isolate patches to address such problems, without having to wait for upstream.
  • When security flaws are found, we want to be able to issue fix as soon as possible. It is not always feasible to wait for the upstream project to make a new release. With binary-only packages, the only fix we can offer is disabling the software entirely by masking it.
  • For immature library packages, where documentation is often scanty, the user can easily run javadoc on the sources, as a stop-gap measure, without needing to dig out the source code from upstream.
  • Although bytecode runs on every vm that supports the version of the bytecode in question it does not mean that the bytecode produced by different compilers is equal. Bytecode can be optimized too. By building from source, we make it easy to switch the compiler used to compile your installed java programs.
  • In the future building, native compiling from Java source code using gcj could become a serious option. If we try to add all packages to the tree in a way where they are getting built from their source code, we could make it possible in the future to create native binaries from Java packages. With binary packages this wouldn't be possible if upstream doesn't provide natively compiled packages.
  • USE flags will normally impact on which features are to be compiled in, and which dependencies are brought in.
  • End-users may want to manually patch or tweak the sources between src_unpack and src_compile.
  • It is common that we need to apply Gentoo-specific tweaks and intermediary patches when upstream takes a long time to issue a new release, which is almost always only possible when we compile from sources.


Print

Page updated December 8, 2006

Summary: This document provides information on why one should and why we do build FOSS Java applications from source instead of shipping pre-compiled binaries.

Joshua Nichols
Author

William L. Thomson Jr.
Editor

Donate to support our development efforts.

Copyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us.