Main Site Contents Up Previous Next

Shared Library Dependencies

Most XS modules that you package with your script will have dependencies on one or more external shared libraries. In many cases, these libraries are present by default in your operating system and need not be packaged by your application.

However, some modules that you have compiled yourself or installed using a tool such as ppm may have external dependencies that you need to distribute with your application.

Cava Packager itself includes wxWidgets libraries for Wx and OpenSSL libraries for use by LWP.

You can add libraries to an individual project by using the Shared Libraries project tree node.

You may also create or amend a Module Rule so that the necessary shared libraries are always included whenever a particular module is used in any project.

To do either of these things you must know which shared libraries to include.

There are tools available that can help you with this such as 'Dependency Walker' (Windows) 'ldd' (Linux) and 'otool' (Mac OS X).

Cava Packager provides an option that can indicate which shared libraries are used by your project modules.

Menu -> Project -> Show Shared Libraries
Toolbar -> Show Shared Libraries

This option will load each of the xs modules in your project in turn and examine the process to determine which shared libraries are loaded.

This option uses heuristics to exclude system libraries and libraries that would be loaded by any core Perl modules. You would not wish to distribute any of these.

These heuristics, however, are not 100% accurate and therefore at this time the option merely presents a list and you may choose which, if any missing libraries you wish to add.

You almost certainly should never include any libraries that are obviously system libraries

Doing so would not harm any system where the application is installed. The libraries would be installed in private directory. But it may often break your application.

You may see surprising results in the list. For example, components of Google Desktop may attach to every running process and would therefore be listed in the shared library list.

On Windows you may also see the same named dll loaded from more than one location. This will happen if the dll is provided side by side with one XS module, and another XS module relies on the dll being present elsewhere. Which dll image actually gets loaded depends on which XS module is loaded first in your application. You can use the Shared Library node and the Build/Shared Libraries sub node to apply inclusions and exclusions to ensure that you get the version of the dll you require packaged with your application.

The presented list includes a note of any shared libraries that Cava Packager will package do to its scan, user defined shared libraries and module rules, even if these modules are not loaded by the process during checking.





Contents Up Previous Next


Cava Packager Copyright © 2006-2012 Mark Dootson