|
Dynamic Libraries Finder
Version 1.0
|
Summary
The Dynamic Libraries Finder tool, or DLF in short, was created out of a
need for a tool to automatically determine what dynamic libraries are
required for a software product to run.
As a software company, we often create new products. In order to develop
these products, with time, we have created a large set of libraries. Yet,
each product has different needs and some do require only a very small set
of these libraries. For this reason, we do not need to create a package
of 50 libraries, if the product being sold really only require 5 of those.
DLF is used for that purpose. It reads the list of dynamic libraries
necessary by your product, and gives you that list in your standard output.
It is recursive so if your product P needs library L and library L needs
library Q, then DLF will tell you that P, L and Q are required. With a
simple script, you can now copy all the files in a repository used to
generate a package for that product! This way, your repository will be
greatly optimized in size with the least efforts.
DLF is available for Microsoft Windows, Linux and Mac OS/X. It works on
all three platforms and on all three platforms it supports all three
types of binaries: PEI, ELF and MACH-O. In other words, you can install
DLF on Linux and run it to determine the libraries necessary under MS-Windows
or Mac OS/X. Similarly, you can use the MS-Windows version to determine
what Linux libraries are required.
Simply extract the files in a folder. You may want to create a folder
named DLF under C:\Program Files and extract the files there.
The doc folder includes the copyrights and some documentation for the
different libraries. It also includes this HTML documentation. Depending
on your use, you may want to add the bin folder to
your PATH variable.
This image shows you how to edit your PATH variable on a Microsoft
Windows 2000 system. Newer systems have slightly different windows,
but the names of the buttons are the same. Note that the PATH variable
is a system variable and thus you should not create a PATH variable
in the User Variable set of variables.
The Linux distribution includes the files in a tarball that can
directly be extracted in / (the root folder). You probably want
to check the files that are in the tarball first:
build-server# tar tzvf dlf_1.0-m2osw1_linux-i386.tar.gz
If you cannot or simply prefer to use the tool in your home environment,
extract the tarball in your home directory and try running
usr/bin/dlf-local. This is a shell script that tries to
setup the proper LD_LIBRARY_PATH for you. Feel free to
edit this script to make it work under your system.
You will otherwise need to add the path to the libraries in your
LD_LIBRARY_PATH environment variable. If you need this to
work permanently, edit your .profile, .bash_rc
or .bash_profile startup file and use something like
the following:
export LD_LIBRARY_PATH=/home/alexis/dlf-1.0/usr/lib/mo/1.2.0/lib
Note: in case you need more than one path in your LD_LIBRARY_PATH,
separate them by a colon (:) character.
Similarly, you can setup your PATH variable to
automatically find the binary under usr/bin. You can
also copy the dlf binary or dlf-local script under your
personal ~/bin folder if you have one. Then tweak
the necessary variable to make it all functional.
The Mac OS/X distribution is the same as the Linux distribution.
You are expected to extract the tarball in your root folder (/).
Please, read the information about the
Linux installation for more
information.
Note that under Mac OS/X, it is not always necessary to change
your LD_LIBRARY_PATH since the dynamic library loader
checks the current folder too. Thus, if you choose to install dlf
in your ~/bin or some other folder, you can simply
copy the dlf binary and then all the libraries from:
dlf-1.0/usr/lib/mo/1.2.0/lib/*.dylib
in that folder.
DLF is a command line tool that accepts a few command line
options and can load a configuration file describing
how to find the necessary dynamic libraries.
The supported command line options are described below. You
can use --help to get a list of these options from DLF itself.
| Option |
Comments |
-h --help |
Print out the help screen with a brief explaination of what
each command does.
|
| -f <conf> |
Define the name of the configuration file. This file includes
variables set to paths, filenames, etc. The file format is
described below.
|
-r --no-recursivity |
Cancel the recursivity and only list the dynamic libraries
defined in the specified binary. This is useful to verify
what was linked against a specific binary, and also to
find out what library requires what libraries.
|
| --recursivity |
This is the opposite of --no-recursivity. It establishes
the recursivity and lets DLF try to find all the libraries
required to run the specified binary. Note that this is the
default behavior.
|
-v --verbose |
Add some verbosity. The tool informs you about what it is
doing. This is practical in debug mode but you cannot use this
command line option in your final scripts since you would
otherwise get this verbose information in the way.
|
| <filename> |
Specify one or more filenames to check with DLF.
Note that the filenames can also be specified in the
configuration file (see the FILES entry.)
|
The DLF configuration file is composed of one or more variables.
These variables define the different parameters that the DLF
tool need to use to discover the dynamically loaded
libraries used by a library and an executable.
The syntax is very basic: <variable name> = <value>.
Note that the variable name cannot include spaces. Some variable
names use an underscore. Spaces added before and/or after the equal
sign are ignored.
The value of a variable must be written on a single line. At this
time there is no feature available to allow you to break up lines.
It is a good idea to use an editor that will not break up lines
and can show you lines wrapping around. Under Microsoft Windows,
this would be NotePad. On all systems, you can use gvim for that
purpose.
FILES |
This variable defines the list
of files that need to be searched in your product. For instance,
for the DLF project, we just list usr/bin/dlf
since this is the only executable file that we want to include
in this product.
For our Turn Watcher product, however, we define Turn Watcher
itself, a small tool we use to finish up the Turn Watcher setup,
one pango tool used to setup the pango modules, one
gtk+ tool used to setup the gtk+ modules, and the pango and
gtk+ modules themselves.
FILES=usr/bin/dlf
|
| |
IGNORE |
This variable defines the list of files to ignore. If the system
you are using gives you a full path, then the full path must be
included here. Each name is separated by a space. You must avoid
having spaces in your path for this feature to function properly.
For instance, under Microsoft Windows you will always ignore the
KERNEL32.dll file since it is provided by Microsoft
and thus does not require a copy in your product package.
Similarly, the Mac OS/X system provides a file named
libSystem.B.dylib that you do not want to include
in your product packages.
IGNORE=libsystem.b.dylib kernel32.dll libm.so.6
|
| |
IGNORE_CASE |
This variable defines whether the
filenames are case sensitive (FALSE) or not (TRUE). When running
DLF under Microsoft or Macintosh, it is a good idea to set this
flag to TRUE since files are not case sensitive. When this flag
is set to TRUE, the filenames are recorded in lowercase. This
way you can have the files under Linux all in lowercase (as it
is done with mingw32 and wine,) and still find out all the files
for a system such as MS-Windows (i.e. the file KERNEL32.dll may
appear in capital in some DLL file; under Linux, you could have
such a file named kernel32.dll and DLF will find it that way.)
For example:
IGNORE_CASE=1
Notes:
TRUE can be represented by any non-zero number such as 1.
FALSE can be represented by zero (0).
TRUE and FALSE can be written with any
case (true, True and TRUE
all work the same.)
|
| |
RECURSIVE |
This variable can be set to TRUE or FALSE. By default it is TRUE.
This is the same feature as the --recursivity and --no-recursivity
command line options. By default, the DLF tool goes through all
the binaries and libraries and determine all of the necessary
libraries at once. If necessary, you may only search the specified
binaries and not search the libraries that they reference.
RECURSIVE=FALSE
|
| |
SEARCH_PATH |
This variable defines a list of paths to search for the dynamic
libraries. Each path is separated by one space. Therefore,
one path cannot include a space (i.e. C:\Program Files\... will
not function.) It is often required to include the dot (.) in
the list of paths to search.
For example, to search for the DLF libraries, we include the
current directory (.) and the path to the
Made to Order Software sandbox
directory:
SEARCH_PATH=. /usr/lib/mo/1.2.0/lib
|
The following describes the technical information of the Dynamic
Libraries Finder. If you still have questions, do not hesitate
to contact us.
We will gladly answer your questions via email and on the phone.
Dynamic Libraries Finder is available for the following
platforms:
| Platform |
Version |
| Microsoft Windows1 |
2000 and better. DLF is a 32bit tool only. |
| Linux1 |
Any modern (up to 5 years old) Linux distribution.
Specifically tested on Ubuntu and FedoraCore.
32bit and 64bit versions available.
|
| Mac OS/X1 |
10.4 and better.
Should work on older versions though.
|
1 Do not forget that we have a
30 days money-back guarantee
policy.
All the versions of Dynamic Libraries Finder (i.e. whatever the platform)
can read binary and dynamic libraries files to determine the list of necessary
dynamic libraries. The following table describes briefly the different
binary formats that we currently support:
| Format |
Corresponding Platform |
| PEI1 |
Microsoft Windows
|
| ELF1 |
Linux and other Unices
|
| MACH-O1 |
Mac OS/X
|
1 For all the formats, we support the 32bit and 64bit versions.
And of course, you have our guarantee that if you encounter any problems
with a format we will either fix it or you get your money back!
Again, all of these formats are support by all the DLF versions. Thus, you can sort
out Microsoft Windows binaries on your Macintosh; you can sort out your Linux files
under Microsoft Windows; etc.
The PEI-i386 format is a mix between the MS-DOS and COFF formats.
DLF ignore the MS-DOS program and only determines the necessary dynamic
libraries as defined in the COFF area. This is the area defining the
Microsoft Windows program. The format is the same for .exe and .dll files
and thus both are supported with just this extension.
We support 32bit and 64bit PEI formats.
This is the modern format used by most Unix systems (Linux, FreeBSD, HP-UX,
IRIX, SunOS, etc.) At this time, for sure, we support the ELF file format available
under Linux 32bit and 64bit.
If you have a file you want us to check out before
you purchase, send it our way and we will test it with DLF for you.
Apple Inc., when they created the Mac OS/X system, decided to switch
from the FreeBSD format (COFF and ELF) to their own format. Their format
is optimized so all the important information in the file can be saved at
the very beginning. This is useful to load the file faster. This special
format is called MACH-O. We support 32bit and 64bit MACH-O.
Our Dynamic Libraries Finder license lets all of your programmers use
a copy of the DLF executable in order to develop your build system.
However, you need to have one license per build system processor.
If you have a build system that can run DLF concurrently on 3 computers
each of which have 4 processors and you run at most one process per
processor, you will need one license per processor, 12 in this example.
You can read our complete license in
dlf-license.txt
|
This documentation is part of the DLF project
Copyright © 2008 — Made to Order Software Corporation
All rights reserved
|
|