Skip to content

Commit

Permalink
try fix arm64 TLS error
Browse files Browse the repository at this point in the history
Add TCM_ENABLE=1 to python
  • Loading branch information
ssheorey committed Aug 14, 2024
1 parent 7eeb6fd commit e4338d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ endmacro()
if (LINUX_AARCH64)
# Fix for ImportError: ... /pybind.cpython-310-aarch64-linux-gnu.so: cannot allocate memory in static TLS block
# https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1889851
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftls-model=global-dynamic")
add_compile_options("-ftls-model=global-dynamic")
endif()

# Include convenience functions
Expand Down
3 changes: 3 additions & 0 deletions python/open3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
import os
import sys
os.environ["KMP_DUPLICATE_LIB_OK"] = "True"
# Enable thread composability manager to coordinate Intel OpenMP and TBB threads. Only works with Intel OpenMP.
# TBB must not be already loaded.
os.environ["TCM_ENABLE"] = "1"
from ctypes import CDLL
from ctypes.util import find_library
from pathlib import Path
Expand Down

0 comments on commit e4338d2

Please sign in to comment.