Skip to content

Commit c7e53b0

Browse files
Rhett-Yinglijialin03
authored andcommitted
[dev] add -D_POSIX_C_SOURCE=200809L for metis build (dmlc#7565)
1 parent 5e86364 commit c7e53b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,12 @@ else(EXTERNAL_METIS_PATH)
373373
target_include_directories(dgl PRIVATE "third_party/METIS/include")
374374
# Compile METIS
375375
if(NOT MSVC)
376+
# When building on ubi7, it fails with the following error:
377+
# /usr/include/signal.h:156:29: error: unknown type name 'siginfo_t'.
378+
# So I(Rui) added the following 2 lines to fix the issue.
379+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=200809L")
380+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_POSIX_C_SOURCE=200809L")
381+
376382
set(GKLIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/GKlib")
377383
include(${GKLIB_PATH}/GKlibSystem.cmake)
378384
include_directories(${GKLIB_PATH})

0 commit comments

Comments
 (0)