User:Ris/drafts/Dependencies

From Gentoo Wiki
Jump to:navigation Jump to:search
Important
These are just personal notes, please ignore this page.

Dependencies

Installing software will often require the installation of dependencies. Software is not written in a vacuum, long gone are the days of raw machine code or assembly language: nowadays basically all software is written using higher level languages. This is just the first facility that modern software exploits to permit the creation of complex systems, because in addition to a programming language, software will harness many preexisting tools, notably library functions.

When installing a package, the tools that are used by that package will need to be installed to provide their functionality - this is a dependency. Use flag choice can change software functionality, so it can also change dependencies - this is a conditional dependancy .

When installing a package on Gentoo, source code is generally configured and compiled before installation - this is the build phase. Sometimes a specific package is required to build another - this is a build time dependency.

On occasion, package A will require package B to build while at the same time package B requires package A - this is a circular dependency. Binary distributions get around this via a process known as bootstrapping, where (to simplify) a "preexisting" compiled version of one package will be used to build the other and both versions can then be provided in binary form. Gentoo, being built from source, must have a way to build one package before the other.

Circular dependencies are generally avoided, however some use flag combinations will present this problem, and a way must be found to build one of the packages first.

ha, very strange and verbose all this - for anyone who will actually read this xD. needs much reworking


Dependencies

Software is not built in a vacuum, but almost always will use other software to write projects. Think of it as a mechanical engineer integrating standard parts into a design, or even Lego blocks. Thus, nearly all packages on Gentoo will require specific other packages to be installed- these are called dependencies. Gentoo comes with a base of preinstalled packages which will cover the dependencies for many of the available packages, however some pieces of software will require more.

Build time dependencies

Many packages on Gentoo are "built" (configured, compiled, linked...) during installation, and this procedure itself may sometimes require specific packages - theses are build time dependencies.

Optional dependencies

USE flags allow software to be configured during installation. Sometimes different USE flags will change the dependency requirements for a package. These are optional dependencies.