------- Comment #5 from ivan dot stankovic at avl dot com 2010-05-10 14:14 ------- Indeed, using RTLD_GLOBAL works around the problem. However, I don't think one should just resort to using this flag with dlopen everywhere. The problem was originally found with Python modules written in C, and while one can change the dlopen flags used for Python imports, I'm not sure that that won't break something else.
As Jakub has pointed out, the guard needs to be unique as well. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44059