[phenixbb] Specifying import-time dependencies in _ext libraries?

Russell M. Taylor II russellmtaylorii at gmail.com
Wed Aug 18 05:31:39 PDT 2021

I've developed an mmtbx_probe_ext module that makes use of objects 
defined in iotbx_pdb.  I've added that library to LIBS= in the 
SConscript file, and it is able to link and run properly.

However, when a Python script imports mmtbx_probe_ext, that load 
fails unless the same script has previously imported from iotbx:

The following works:
         from iotbx.map_model_manager import map_model_manager
         import mmtbx_probe_ext as probe

But the following fails:
         import mmtbx_probe_ext as probe
         from iotbx.map_model_manager import map_model_manager

undefined symbol: _ZNK5iotbx3pdb9hierarchy5chain5atomsEi

How do I tell Sconscript (or what do I do in my _bpl file) to tell 
Python that it needs to load the other module first?

Russ Taylor

Russell M. Taylor II, 
Ph.D.   russ at reliasolve.com  taylor at redbudlabs.com 
rtaylor at aqueti.com russ at outloveracism.org

More information about the phenixbb mailing list