Skip to content

Commit b3d358b

Browse files
authored
Merge pull request #1476 from johnhaddon/removeRTLDGLobal
Remove `IECORE_RTLD_GLOBAL` environment variable
2 parents c0b7f77 + 25720e8 commit b3d358b

File tree

5 files changed

+4
-21
lines changed

5 files changed

+4
-21
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ jobs:
169169
run: |
170170
scons ${{ matrix.tests }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache
171171
env:
172-
IECORE_RTLD_GLOBAL: 0
173172
OCIO: ${{ env.CORTEX_BUILD_NAME }}/openColorIO/config.ocio
174173

175174
- name: Build Package

.github/workflows/main/options.posix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ USD_LIB_PREFIX = "usd_"
5959
# Environment
6060
# ===========
6161

62-
ENV_VARS_TO_IMPORT = "PATH CI IECORE_RTLD_GLOBAL"
62+
ENV_VARS_TO_IMPORT = "PATH CI"
6363

6464
if platform.system() == "Darwin" :
6565
os.environ["DYLD_FRAMEWORK_PATH"] = libs

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Breaking Changes
1515
- IECoreHoudini : Removed.
1616
- IECoreMaya : Removed.
1717
- IECoreNuke : Removed.
18+
- Removed support for `IECORE_RTLD_GLOBAL` environment variable.
1819

1920
10.5.x.x (relative to 10.5.15.0)
2021
========

config/ie/options

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,6 @@ envVarsToImport = [
626626
"OCIO",
627627
"IECORE_DEBUG_WAIT",
628628
"CORTEX_PERFORMANCE_TEST",
629-
"IECORE_RTLD_GLOBAL",
630629
]
631630

632631
ENV_VARS_TO_IMPORT = " ".join(envVarsToImport)

python/IECore/__init__.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,7 @@
3838
#
3939
# Some parts of the IECore library are defined purely in Python. These are shown below.
4040

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

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

6650
# Remove pollution of IECore namespace
67-
del os, sys, ctypes, pathlib
51+
del os, pathlib
6852

6953
__import__( "imath" )
7054

0 commit comments

Comments
 (0)