From: Manoj Srivastava
- Firstly, the package should install the shared libraries under - their normal names. For example, the libgdbmg1 - package should install libgdbm.so.1.7.3 as + Packages involving shared libraries should be split up into + several binary packages. This section mostly deals with how + this separation is to be accomplished; rules for files within + the shared library packages are in instead. +
+ +
+ The run-time shared library needs to be placed in a package called
+
+ The soname is the shared object name: it's the thing
+ that has to match exactly between building an executable
+ and running it for the dynamic linker to be able run the
+ program. For example, if the soname of the library is
+
+ If you have several shared libraries built from the same + source tree you may lump them all together into a single + shared library package, provided that you change all of + their sonames at once (so that you don't get filename + clashes if you try to install different versions of the + combined shared libraries package). +
+ +
+ The package should install the shared libraries under
+ their normal names. For example, the
- Secondly, the package should include the symbolic link that + Shared libraries should not be installed executable, since + the dynamic linker does not require this and trying to + execute a shared library usually results in a core dump. +
+ +
+ The run-time library package should include the symbolic link that
- Thirdly, the associated development package should contain a
- symlink for the shared library without a version number. For
- example, the libgdbmg1-dev package should include a
- symlink from /usr/lib/libgdbm.so to
-
Any package installing shared libraries in one of the default @@ -3789,7 +3829,11 @@ Replaces: mail-transport-agent
must use
+ The package must call
+ If your package has some run-time support programs which use + the shared library you must not put them in the shared + library package. If you do that then you won't be able to + install several versions of the shared library without + getting filename clashes. +
+ +
+ Instead, either create another package for the runtime binaries
+ (this package might typically be named
+
+ The static library (
+ In some cases, it is acceptable for a library to be
+ available in static form only; these cases include:
+
+
+
+ The development files associated to a shared library need to be
+ placed in a package called
+
+ In case several development versions of a library exist, you may
+ need to use
+ The development package should contain a symlink for the associated
+ shared library without a version number. For example, the
+
+ Typically the development version should also have an exact + version dependency on the runtime library, to make sure that + compilation and linking happens correctly. The + ${Source-Version} substitution variable can be + useful for this purpose. +
+ +
+ Packages which use the shared library should have a
+ dependency on the name of the shared library package,
+
If a package contains a binary or library which links to a @@ -3922,10 +4065,9 @@ Replaces: mail-transport-agent shlibs file format and how to create them if your package contains a shared library.
-There are several places where shlibs files are @@ -4015,9 +4157,9 @@ Replaces: mail-transport-agent
-
Each
@@ -4169,9 +4311,9 @@ install -m644 debian/shlibs.package debian/package/DEBIAN/
@@ -4234,7 +4376,10 @@ libbar 1 bar1 (>= 1.0-1) on bar1 to help ensure that others do not have the same problem building your package.)
+
- In general, libraries must have a shared version in the
- library package (
- In some cases, it is acceptable for a library to be
- available in static form only; these cases include:
- libraries for languages whose shared library support
- is immature or unstable
- libraries whose interfaces are in flux or under
- development (commonly the case when the library's
- major version number is zero, or where the ABI breaks
- across patchlevels)
-
- libraries which are explicitly intended to be
- available only in static form by their upstream
- author(s)
-
- If a library is available only in static form, then it must follow
- the conventions for a development package.
-
You must specify the gcc option -D_REENTRANT @@ -5672,8 +5788,7 @@ endif
- Note that all installed shared libraries should be
- stripped with
+ All installed shared libraries should be stripped with
- Packages involving shared libraries should be split up - into several binary packages.
- -
- For a straightforward library which has a development
- environment and a runtime kit including just shared
- libraries you need to create two packages:
-
- The soname is the shared object name: it's the thing
- that has to match exactly between building an executable
- and running it for the dynamic linker to be able run the
- program. For example, if the soname of the library is
-
- If you prefer only to support one development version at a
- time you may name the development package
-
- Packages which use the shared library should have a
- dependency on the name of the shared library package,
-
- If your package has some run-time support programs which use - the shared library you must not put them in the shared - library package. If you do that then you won't be able to - install several versions of the shared library without - getting filename clashes. Instead, either create a third - package for the runtime binaries (this package might - typically be named libraryname-runtime; - note the absence of the soversion in the package - name), or if the development package is small you may - include them in there. -
-- If you have several shared libraries built from the same - source tree you may lump them all together into a single - shared library package, provided that you change all of - their sonames at once (so that you don't get filename - clashes if you try to install different versions of the - combined shared libraries package). -
- -- Shared libraries should not be installed executable, since - the dynamic linker does not require this and trying to - execute a shared library usually results in a core dump. + This section has moved to .