Skip to content

Commit

Permalink
Fix segfault on RHEL6.
Browse files Browse the repository at this point in the history
Each Python module was separately linked to each core library, which is
unnecessary. They only each need to link to the boost python libraries.
Most systems handled this multiple linking without a problem but RHEL6
would segfault when accessing the NeXus C api.
Refs #7798
  • Loading branch information
martyngigg committed Aug 7, 2014
1 parent 3b72565 commit 362641f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/PythonInterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ include_directories ( SYSTEM ${PYTHON_NUMPY_INCLUDE_DIR} )
set ( HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/inc/MantidPythonInterface )
include_directories ( inc )
add_definitions ( -DBOOST_DEBUG_PYTHON -DBOOST_PYTHON_NO_LIB -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION )
set ( PYTHON_DEPS ${MANTIDLIBS} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} )
set ( PYTHON_DEPS ${Boost_LIBRARIES} )

####################################################################################
# A macro for generating the exports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ add_library ( PythonKernelModule ${SRC_FILES} ${INC_FILES} ${PYTHON_INSTALL_FILE
set_python_properties( PythonKernelModule _kernel )
set_target_output_directory ( PythonKernelModule ${OUTPUT_DIR} .pyd )
# Add the required dependencies
# Kernel must be first so that stdc++ is loaded first on Linux
# Kernel must be first. See comments in Framework/Kernel/CMakeLists.txt
target_link_libraries ( PythonKernelModule Kernel ${PYTHON_DEPS} )

###########################################################################
Expand Down

0 comments on commit 362641f

Please sign in to comment.