Runtime role of static plugins

A default build of avogadrolibs sets BUILD_STATIC_PLUGINS=ON in avogadro/qtplugins/CMakeLists.txt, causing the static plugin .a libraries to be installed in /usr/lib/x86_64-linux-gnu/avogadro2/staticplugins/.

These take up some disk space (250 MB), and are in any case also compiled into libAvogadroQtPlugins.so. Debian Bug#1022755 points out that it should be possible to save space in Debian installations by not including these static plugin libraries in the libavogadro2-1 binary package.

It’s easy enough in the Debian packaging to provide /usr/lib/x86_64-linux-gnu/avogadro2/staticplugins/ in the libavogadro-dev development package instead of the libavogadro2-1 package.

Before doing that, I want to verify that the staticplugins directory is not used at runtime. Or at least, that the .a plugins libraries compiled into libAvogadroQtPlugins.so do not also need to be provided in the runtime directory (i.e. runtime functionality is provided via libAvogadroQtPlugins.so, not via the .a files in the staticplugins directory).

Is that the case? Is it safe to not provide staticplugins in the debian libavogadro2-1 runtime package?

It should be safe to leave them out. IIRC FreeBSD leaves them out. I can confirm that if I remove the *.a files from my Mac build, everything works great.

If you’d like, we can try BUILD_STATIC_PLUGINS=OFF and see if everything breaks, but certainly leaving them out is fine.

Sounds good. I can provide them in the libavogadro-dev, so they’ll be available for linking if anyone really needs them, without bloating up the normal end-user installation.