Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ jobs:
run: |
scons ${{ matrix.tests }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache
env:
IECORE_RTLD_GLOBAL: 0
OCIO: ${{ env.CORTEX_BUILD_NAME }}/openColorIO/config.ocio

- name: Build Package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main/options.posix
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ USD_LIB_PREFIX = "usd_"
# Environment
# ===========

ENV_VARS_TO_IMPORT = "PATH CI IECORE_RTLD_GLOBAL"
ENV_VARS_TO_IMPORT = "PATH CI"

if platform.system() == "Darwin" :
os.environ["DYLD_FRAMEWORK_PATH"] = libs
Expand Down
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Breaking Changes
- IECoreHoudini : Removed.
- IECoreMaya : Removed.
- IECoreNuke : Removed.
- Removed support for `IECORE_RTLD_GLOBAL` environment variable.

10.5.x.x (relative to 10.5.15.0)
========
Expand Down
1 change: 0 additions & 1 deletion config/ie/options
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,6 @@ envVarsToImport = [
"OCIO",
"IECORE_DEBUG_WAIT",
"CORTEX_PERFORMANCE_TEST",
"IECORE_RTLD_GLOBAL",
]

ENV_VARS_TO_IMPORT = " ".join(envVarsToImport)
Expand Down
20 changes: 2 additions & 18 deletions python/IECore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,7 @@
#
# Some parts of the IECore library are defined purely in Python. These are shown below.

import os, sys, ctypes, pathlib
if os.name == "posix" and os.environ.get( "IECORE_RTLD_GLOBAL", "1" ) == "1" :
# Historically, we had problems with cross-module RTTI on Linux, whereby
# different Python modules and/or libraries could end up with their own
# copies of symbols, which would break things like dynamic casts. We worked
# around this by using RTLD_GLOBAL so that everything was loaded into the
# global symbol table and shared, but this can cause hard-to-diagnose
# knock-on effects from unwanted sharing.
#
# We now manage symbol visibility properly so that RTTI symbols should not
# be duplicated between modules, and we intend to remove RTLD_GLOBAL. To aid
# the transition, this behaviour can be controlled by the
# `IECORE_RTLD_GLOBAL` environment variable, which currently defaults on.
## \todo Get everything tested, default to off, and then remove.
sys.setdlopenflags(
sys.getdlopenflags() | ctypes.RTLD_GLOBAL
)
import os, pathlib

if hasattr( os, "add_dll_directory" ) and "IECORE_DLL_DIRECTORIES" in os.environ :
for directory in os.environ.get( "IECORE_DLL_DIRECTORIES" ).split( os.pathsep ) :
Expand All @@ -64,7 +48,7 @@
del directory

# Remove pollution of IECore namespace
del os, sys, ctypes, pathlib
del os, pathlib

__import__( "imath" )

Expand Down