SimTk/openmm — pull request #264 by rmcgibbo (2013-12-31 01:47:58+00:00)
Title: Fix weird import segfault with RTLD_GLOBAL

I think this fixes the bug in #250.

I have tested it with Python-2.7.3 and Python-2.6.8. There is some indication on the web, e.g. [here](http://www.zeroc.com/forums/help-center/4146-segmentation-fault-ice-python.html), that RTLD_GLOBAL might now be required on python 2.5+ (and openmm requires 2.6+).

But I really have no idea how the dlopen flags work or under what conditions they're necessary. I asked on SO (http://stackoverflow.com/questions/20849755/python-shared-libraries-rtld-global-segfault), but I'm not expecting much.

Does anyone know of a supported platform / situation in which RTLD_GLOBAL is actually required?

p.s. I tested this patch by running testInstallation.py. I think that should be sufficient to exercise the plugin loading code, which this PR concerns, but I'm not 100% sure.