Chapter 8. Shared libraries
58
Otherwise, you will need to explicitly list the compiled binaries and libraries.
8
This command puts the dependency information into the
debian/substvars
file, which is
then used by
dpkg gencontrol
. You will need to place a
${shlib:Depends}
variable in
the
Depends
field in the control file for this to work.
If
dpkg shlibdeps
doesn't complain, you're done. If it does complain you might need to
create your own
debian/shlibs.local
file, as explained below (see `Writing the
debian
/shlibs.local
file' on the next page).
If you have multiple binary packages, you will need to call
dpkg shlibdeps
on each one
which contains compiled libraries or binaries. In such a case, you will need to use the
 T
option to the
dpkg
utilities to specify a different
substvars
file.
For more details on dpkg shlibdeps, please see `
dpkg shlibdeps
  calculates shared library
dependencies' on page
113
and
dpkg shlibdeps(1)
.
8.6.3 The
shlibs
File Format
Each
shlibs
file has the same format. Lines beginning with
#
are considered to be comments
and are ignored. Each line is of the form:
library name soname version number dependencies ...
We will explain this by reference to the example of the
zlib1g
package, which (at the time of
writing) installs the shared library
/usr/lib/libz.so.1.1.3
.
library name is the name of the shared library, in this case
libz
. (This must match the name
part of the soname, see below.)
soname version number is the version part of the soname of the library. The soname is the thing
that must exactly match for the library to be recognized by the dynamic linker, and is usually
of the form
name
.so.
major version
, in our example,
libz.so.1
.
9
The version part is the
part which comes after
.so.
, so in our case, it is
1
.
dependencies has the same syntax as a dependency field in a binary package control file. It
should give details of which packages are required to satisfy a binary built against the version
of the library contained in the package. See `Syntax of relationship fields' on page
45
for details.
In our example, if the first version of the
zlib1g
package which contained a minor number of
at least
1.3
was 1:1.1.3 1, then the
shlibs
entry for this library could say:
libz 1 zlib1g (>= 1:1.1.3)
The version specific dependency is to avoid warnings from the dynamic linker about using
older shared libraries with newer binaries.
8
If you are using
debhelper
, the
dh_shlibdeps
program will do this work for you. It will also correctly
handle multi binary packages.
9
This can be determined using the command
objdump  p /usr/lib/libz.so.1.1.3 | grep SONAME






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

gay web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved