Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the "illegal thread local variable reference to regular symbol" error on MacOS #266

Merged
merged 1 commit into from
Jul 3, 2023
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
4 changes: 2 additions & 2 deletions graphlearn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ add_custom_command (TARGET python
COMMAND cp -f ${GL_SETUP_DIR}/version.py ${GL_PYTHON_DIR}/python/version.py
COMMAND echo "__version__ = ${VERSION}" >> ${GL_PYTHON_DIR}/python/version.py
COMMAND echo "__git_version__ = '${GIT_BRANCH}-${GIT_VERSION}'" >> ${GL_PYTHON_DIR}/python/version.py
COMMAND OPEN_KNN=${KNN_FLAG} CXX_DIALECT=${GL_CXX_DIALECT} ${GL_PYTHON_BIN} ${GL_SETUP_DIR}/setup.py build_ext --inplace
COMMAND OPEN_KNN=${KNN_FLAG} CXX_DIALECT=${GL_CXX_DIALECT} ${GL_PYTHON_BIN} ${GL_SETUP_DIR}/setup.py bdist_wheel
COMMAND OPEN_KNN=${KNN_FLAG} CXX_DIALECT=${GL_CXX_DIALECT} Protobuf_LIBRARIES=${Protobuf_LIBRARIES} ${GL_PYTHON_BIN} ${GL_SETUP_DIR}/setup.py build_ext --inplace
COMMAND OPEN_KNN=${KNN_FLAG} CXX_DIALECT=${GL_CXX_DIALECT} Protobuf_LIBRARIES=${Protobuf_LIBRARIES} ${GL_PYTHON_BIN} ${GL_SETUP_DIR}/setup.py bdist_wheel
COMMAND ${CMAKE_COMMAND} -E make_directory "${GL_BUILT_BIN_DIR}/ge_data/data"
COMMAND ${CMAKE_COMMAND} -E make_directory "${GL_BUILT_BIN_DIR}/ge_data/ckpt"
WORKING_DIRECTORY ${GL_ROOT}
Expand Down
7 changes: 7 additions & 0 deletions graphlearn/setup/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
CUT_PATH = sys.path[0]
OPEN_KNN = os.getenv('OPEN_KNN', 'CLOSE')
CXX_DIALECT = os.getenv('CXX_DIALECT', 'c++11')
Protobuf_LIBRARIES = os.getenv('Protobuf_LIBRARIES', '')

extensions = []
include_dirs = []
Expand Down Expand Up @@ -62,6 +63,12 @@
# if OPEN_KNN == 'OPEN':
# libraries.append('knn_shared')

# explicitly link against protobuf to avoid the error
# "illegal thread local variable reference to regular symbol"
if sys.platform == 'darwin':
if Protobuf_LIBRARIES:
extra_link_args.append(Protobuf_LIBRARIES)

sources = [ROOT_PATH + '/python/c/py_export.cc',
ROOT_PATH + '/python/c/py_client.cc']
if OPEN_KNN == 'OPEN':
Expand Down
2 changes: 1 addition & 1 deletion graphlearn/src/include/graph_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace io {
struct SideInfo;
struct EdgeValue;
struct NodeValue;
struct AttributeValue;
class AttributeValue;
} // namespace io

class UpdateRequest : public OpRequest {
Expand Down