All Topics  
Dependency hell

 

   Email Print
   Bookmark   Link






 

Dependency hell



 
 
Dependency hell is a colloquial term for the frustration of some software users who have installed software packages
Software package (installation)

A software package refers to computer software packaged in an archive format to be installed by a package management system or a self-sufficient Installation ....
 which have dependencies on specific versions of other software packages.

n, rather than "reinventing the wheel
Reinventing the wheel

Reinventing the wheel is a phrase that means a generally accepted technique or solution is ignored in favor of a locally invented solution. To "reinvent the wheel" is to duplicate a basic method that has long since been accepted and even taken for granted....
", software is designed to take advantage of other software components that are already available, or have already been designed and implemented for use elsewhere. This could be compared to how people building a house might buy off-the-shelf
Commercial off-the-shelf

Commercial, off-the-shelf is a term for Computer software or hardware, generally technology or computer products, that are ready-made and available for sale, lease, or license to the general public....
 components, such as bricks, windows, and doors, rather than producing everything themselves.

Even for a builder, it can be a problem if a building is designed for a certain door type, and only doors with different specifications are available.






Discussion
Ask a question about 'Dependency hell'
Start a new discussion about 'Dependency hell'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Dependency hell is a colloquial term for the frustration of some software users who have installed software packages
Software package (installation)

A software package refers to computer software packaged in an archive format to be installed by a package management system or a self-sufficient Installation ....
 which have dependencies on specific versions of other software packages.

Overview

Often, rather than "reinventing the wheel
Reinventing the wheel

Reinventing the wheel is a phrase that means a generally accepted technique or solution is ignored in favor of a locally invented solution. To "reinvent the wheel" is to duplicate a basic method that has long since been accepted and even taken for granted....
", software is designed to take advantage of other software components that are already available, or have already been designed and implemented for use elsewhere. This could be compared to how people building a house might buy off-the-shelf
Commercial off-the-shelf

Commercial, off-the-shelf is a term for Computer software or hardware, generally technology or computer products, that are ready-made and available for sale, lease, or license to the general public....
 components, such as bricks, windows, and doors, rather than producing everything themselves.

Even for a builder, it can be a problem if a building is designed for a certain door type, and only doors with different specifications are available. However, in the software world, where components evolve rapidly and are highly dependent on one another, this problem is more pronounced.

The issue of dependency hell may be regarded as an anti-pattern
Anti-pattern

In software engineering, an anti-pattern is a design pattern that appears obvious but is ineffective or far from optimal in practice.The term was coined in 1995 by Andrew Koenig ,...
, where the fault lies less with the suppliers of the products than with the framework into which they have to fit.

Platform-specific

On specific computing platforms, "dependency hell" often goes by a local specific name, generally the name of components.

  • DLL hell
    DLL hell

    In computing, DLL hell is a colloquial term for the complications that arise when working with dynamic link library used with Microsoft Windows operating systems, particularly legacy 16-bit editions....
     - A form of dependency hell occurring on Microsoft Windows
    Microsoft Windows

    Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
  • Extension conflict
    Extension conflict

    Extension conflicts were sometimes a problem on Apple Macintosh computers running versions of Mac OS prior to Mac OS X, especially System 7 . Extension s were bundles of code that extended the operating system's capabilities by directly patching System call, thus receiving control instead of the operating system when applications made syst...
     - A form of dependency hell occurring on older versions of Mac OS
    Mac OS

    Mac OS is the trademarked name for a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems....
  • JAR hell - A form of dependency hell occurring in the Java Runtime Environment
  • RPM hell - A form of dependency hell occurring in the Red Hat
    Red Hat

    In computing, Red Hat, Inc. is a company in the free and open source software sector, and a major Linux distribution vendor. Founded in 1995, Red Hat has its corporate headquarters in Raleigh, North Carolina with satellite offices worldwide....
     distribution of Linux
    Linux

    Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
  • DEB hell - A form of dependecy hell occurring in the Debian
    Debian

    Debian GNU/Linux is one of the most popular and influential computer operating systems composed of free software and open source software....
     distribution of Linux
    Linux

    Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...


Problems

Dependency hell takes several forms:

many dependencies
An application depends on many libraries, requiring lengthy downloads, large amounts of disk space, and not being very portable (all libraries must be ported for the application to be ported). It can also be difficult to track down all the dependencies, which can be fixed by having a repository (see below). This is partly inevitable; an application built on a given platform
Platform (computing)

In computing, a platform describes some sort of hardware architecture or software framework , that allows Computer software to run. Typical platforms include a computer's Computer architecture, operating system, programming languages and related runtime libraries or graphical user interface....
 (such as Java) requires that platform to be installed, but further applications do not require it. This is a particular problem if an application uses a small part of a big library (which can be solved by refactoring
Refactoring

Code refactoring is the process of changing a computer program's internal structure without modifying its external Functional requirement behavior or existing functionality....
), or a simple application relies on many libraries.


Internet access hell
In some Linux distribution
Linux distribution

A Linux distribution is a member of the family of Unix-like software distributions built on top of the Linux kernel. Such distributions consist of a large collection of software applications such as word processors, spreadsheets, media players and database applications....
s, the system needs to install new packages to configure Internet access, but it also needs Internet access to download the packages. This is circular dependency hell (a form of a catch 22
Catch-22 (logic)

Catch-22 is a term coined by Joseph Heller in his novel Catch-22, describing a set of rules, regulations or procedures, or situation which presents the illusion of choice while preventing any real choice....
).


long chains of dependencies
app depends on liba, which depends on libb, ..., which depends on libz. This is distinct from "many dependencies" if the dependencies must be resolved manually (e.g., on attempting to install app, you are prompted to install liba first. On attempting to install liba, you are then prompted to install libb.), otherwise it is equivalent to "many dependencies". This can be solved by having a package manager that resolves all dependencies automatically. Other than being a hassle (to resolve all the dependencies manually), manual resolution can mask dependency cycles or conflicts.


conflicting dependencies
If app1 depends on libfoo 1.2, and app2 depends on libfoo 1.3, and different versions of libfoo cannot be simultaneously installed, then app1 and app2 cannot simultaneously be used (or installed, if the installer checks dependencies). This is especially troublesome when one of these applications revs to a new library, and the other one does not -- and they both must run together. This can (usually) be solved by allowing simultaneous installation of different library versions.


circular dependencies
If appX, version 1 depends on app2, which depends on app3, which depends on app4, which depends on the original appX, version 0, then, in systems such as RPM or dpkg, the user must install all packages simultaneously - hence on Linux circular dependencies are often the result of a user misunderstanding the packaging system. On other platforms, however, the packaging system won't be able to resolve itself.


Solutions


The most obvious (and very common) solution to this problem is to have a standardised numbering system, wherein software uses a specific number for each version (aka major version), and also a subnumber for each revision (aka minor version), e.g.: 10.1, or 5.7. The major version only changes when programs that used that version will no longer be compatible. The minor version might change with even a simple revision that does not prevent other software from working with it. In cases like this, software packages can then simply request a component that has a particular major version, and any minor version (greater than or equal to a particular minor version). As such, they will continue to work, and dependencies will be resolved successfully, even if the minor version changes.

Some package managers can perform smart upgrades, in which interdependent software components are upgraded at the same time, thereby resolving the major number incompatibility issue too.

Many current Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
 distribution
Software distribution

A software distribution, also referred to as a software distro, is a bundle of a specific software , already compiled and configured. It is generally the closest thing to a turnkey form of a usually GNU General Public License, free software source code for a software....
s have also implemented repository
Digital library

A digital library is a library in which collections are stored in digital formats and accessible by computers. The digital content may be stored locally, or accessed remotely via computer networks....
-based package management systems to try to solve the dependency problem. These systems are a layer on top of the RPM
RPM Package Manager

RPM Package Manager is a package management system. The name RPM refers to two things: a software package file format, and software packaged in this format....
, dpkg
Dpkg

dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about deb software package s....
, or other packaging systems that are designed to automatically resolve dependencies by searching in predefined software repositories. Typically these software repositories are FTP
File Transfer Protocol

File Transfer Protocol is a network protocol used to transfer data from one computer to another through a network such as the Internet.FTP is a file transfer protocol for exchanging and manipulating files over a Transmission Control Protocol computer network....
 sites or websites, directories on the local computer or shared across a network
Computer network

A computer network is a group of interconnected computers. Networks may be classified according to a wide variety of characteristics. This article provides a general overview of some types and categories and also presents the basic components of a network....
 or, much less commonly, directories on removable media such as CDs or DVDs. This eliminates dependency hell for software packaged in those repositories, which are typically maintained by the Linux distribution provider and mirrored worldwide. Although these repositories are often huge it is not possible to have every piece of software in them, so dependency hell can still occur. In all cases, dependency hell is still faced by the repository maintainers. Examples of these systems include Apt
Advanced Packaging Tool

The Advanced Packaging Tool, or APT, is a Free software front-end that works with Software Library to handle the installation and removal of software on the Debian GNU/Linux computer operating system and its variants....
, Yum, Urpmi
Urpmi

urpmi is a Mandriva Linux package management tool for installing, removing, updating and querying software packages of local or remote media. It wraps around the package manager RPM Package Manager with the aim that the user should not have to suffer the often-encountered dependency hell....
, Portage
Portage (software)

Portage is a package management system used by Gentoo Linux. Gentoo is sometimes referred to as a meta-distribution due to the flexibility of Portage which allows it to manage other operating systems as well....
 and others.

Because different pieces of software have different dependencies, it is possible to get into a vicious circle
Vicious Circle

Vicious Circle is an album released in 1995 by L.A. Guns. Most of the songs feature Phil Lewis on lead vocals, but the track "Nothing Better To Do" features Kelly Nickels on lead vocals, and "Tarantula" is instrumental....
 of dependency requirement
Requirement

In engineering, a requirement is a singular documented need of what a particular product or service should be or do. It is most commonly used in a formal sense in systems engineering or software engineering....
s, or (possibly worse) an ever-expanding tree
Tree structure

A tree structure is a way of representing the hierarchy nature of a structure in a graphical form.It is named a "tree structure" because the graph looks a bit like a tree, even though the tree is generally shown upside down compared with a real tree; that is to say with the root at the top and the leaves at the bottom....
 of requirements, as each new package demands several more be installed. Systems such as Debian's APT
Advanced Packaging Tool

The Advanced Packaging Tool, or APT, is a Free software front-end that works with Software Library to handle the installation and removal of software on the Debian GNU/Linux computer operating system and its variants....
 can resolve this by presenting the user with a range of solutions, and allowing the user to accept or reject the solutions, as desired. The Haskell Compiler GHC is an example of a circular dependency. To compile it, you need GHC. It can be solved by downloading a binary version of GHC, and compiling the new version of GHC with this binary version. This is not uncommon; many large base-level projects such as gcc require self-compilation, but this is not a problem as all operating systems ship with binaries of these.

Software appliances


Another approach to avoiding dependency issues is to deploy applications as a software appliance
Software appliance

A software appliance is a Application software combined with just enough operating system for it to run optimally on industry standard hardware or in a Platform virtualization ....
. A software appliance encapsulates dependencies in a pre-integrated self-contained unit such that users no longer have to worry about resolving software dependencies. Instead the burden is shifted to developers of the software appliance.

Portable application
Portable application

A portable application is a computer software program that runs from a removable storage device such as a CD-ROM drive, USB flash drive, flash memory, or floppy disk....


An application (or version of an existing conventional application) that is completely self-contained and requires nothing to be already installed

Examples

James Donald, in his 2003 paper titled Improved Portability of Shared Libraries argued that dependency hell is worse under Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
 than Microsoft Windows. Several Linux distribution
Linux distribution

A Linux distribution is a member of the family of Unix-like software distributions built on top of the Linux kernel. Such distributions consist of a large collection of software applications such as word processors, spreadsheets, media players and database applications....
s have had problems with software not packaged for the distribution when updating libraries, since the application programming interface
Application programming interface

An application programming interface is a set of subroutine, data structures, class and/or Protocol provided by library and/or operating system Service s in order to support the building of applications....
s of some Open Source libraries are prone to change between releases.

A modern example of dependency hell on Microsoft Windows, Linux, and Mac OS X is the Gecko Runtime Engine or GRE used by Mozilla
Mozilla

Mozilla was the official, public, original name of Mozilla Application Suite by the Mozilla Foundation, currently known as SeaMonkey internet suite....
 projects. Each product released from the Mozilla foundation includes its own version of the complete Gecko Runtime Engine, due to the volatile nature of the programming interfaces used. Thus, if a user installs Thunderbird
Mozilla Thunderbird

Mozilla Thunderbird is a Free software, open source, cross-platform e-mail client and news client developed by the Mozilla Foundation. The project strategy is modeled after Mozilla Firefox, a project aimed at creating a web browser....
, Firefox
Mozilla Firefox

Mozilla Firefox is a web browser descended from the Mozilla Application Suite and managed by Mozilla Corporation. Official versions are distributed under the terms of the proprietary EULA....
, and Sunbird, there will be three copies of GRE on the machine. These may or may not be compatible, depending on when the GRE source tree was forked
Fork (software development)

In software engineering, a project fork happens when developers take a copy of source code from one Computer software and start independent development on it, creating a distinct piece of software....
. Some external projects like Epiphany
Epiphany (web browser)

Epiphany is a Web browser for the GNOME graphical computing desktop. It is also available for Mac OS X and is a descendant of Galeon....
 depend on specific versions of the Mozilla Suite to use GRE, and break if a different version is installed; while others such as Nvu
Nvu

Nvu is a discontinued WYSIWYG HTML editor, based on the Mozilla Composer component of Mozilla Application Suite and Gecko 1.7. It is a common WYSIWYG editor for Linux and is intended to be an open source equivalent to proprietary software like Microsoft Expression Web and Adobe Dreamweaver ....
 bring their own copy of GRE. Observe that the duplication of the GRE is actually a work-around to the core problem of dependency hell.

By statically linking
Static library

In computer science, a static library or statically-linked library is a set of routines, external functions and variables which are resolved in a caller at compile-time and copied into a target application by a compiler, linker, or binder, producing an object file and a stand-alone executable file....
 Gecko, the Mozilla developers avoid potential dependency hell, at the cost of increased disk and memory usage. Given the fact that hard disk space comes quite cheap these days, static linking in itself is not so bad. Tools such as bash or make that are statically linked will never complain about a missing shared object when the c library (glibc) is upgraded. Both approaches have advantages and disadvantages.

See also


  • Coupling
    Coupling (computer science)

    In computer science, coupling or dependency is the degree to which each program module relies on each one of the other modules.Coupling is usually contrasted with cohesion ....
     - Forms of dependency among software artifacts
  • Configuration management
    Configuration management

    Configuration management is a field of management that focuses on establishing and maintaining consistency of a product's performance and its functional and physical attributes with its requirements, design, and operational information throughout its life....
     - Techniques and tools for managing software versions
  • Explicit dependency, implicit dependency and recursive implicit dependency
  • Software appliance
    Software appliance

    A software appliance is a Application software combined with just enough operating system for it to run optimally on industry standard hardware or in a Platform virtualization ....


External links

  • .