[Smtk-developers] Static build of smtk
Ben Boeckel
ben.boeckel at kitware.com
Tue May 9 18:02:22 EDT 2017
On Tue, May 09, 2017 at 17:41:28 -0400, David Thompson wrote:
> While in theory this might be possible, I suspect the rabbit hole is
> deep enough to puncture the mantle. I doubt that SMTK is set up to
> build python modules dynamically when told to do a static build (in
> which case you would have to create a "frozen" python interpreter like
> PV does on some HPC systems). Even if SMTK created dynamic Python
> modules and static libraries, I think there would be other issues
> based on vague memories of some MR comments a while back (maybe some
> improper dependencies, maybe more).
"Frozen" python only embeds `.py` modules. Compiled modules are imported
via the builtin table (and builtin modules which are under frozen
modules or packages need a patch to the interpreter to not give up after
not finding it in the frozen table).
To support using a static SMTK from a shared build, either exactly one
shared library can link SMTK or SMTK cannot have any global state
(statics, etc.) otherwise each shared library which links to the static
libraries gets their own copy of that static.
--Ben
More information about the Smtk-developers
mailing list