Commit 9f957758 authored by peastman's avatar peastman
Browse files

Merge pull request #264 from rmcgibbo/reset-dlopen-flags

Fix weird import segfault with RTLD_GLOBAL
parents 2e83bfc8 98ffd5fe
#
#
#
"""
Package simtk.openmm
......@@ -13,25 +9,7 @@ It also tries to load any plugin modules it can find.
__author__ = "Randall J. Radmer"
import os, sys, glob, os.path
if sys.platform == "win32":
libPrefix=""
libExt="dll"
elif sys.platform == 'darwin':
libPrefix="lib"
libExt="dylib"
else:
libPrefix="lib"
libExt="so"
# The following is an evil incantation that is needed to permit
# the POSIX "dlopen" function to work. I do not understand
# it. If a better solution is known, please forward to the
# PyOpenMM code maintainers.
import ctypes
flags = sys.getdlopenflags()
sys.setdlopenflags(flags | ctypes.RTLD_GLOBAL)
import os, os.path
from simtk.openmm.openmm import *
from simtk.openmm.vec3 import Vec3
from simtk.openmm import version
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment