Skip to content

Commit 26c693f

Browse files
raramakrlamb-j
authored andcommitted
SWDEV-383837 - Update comgr package dependencies
libamd_comgr.so is dependent on standard shared libraries. The corresponding packages are added to comgr package dependency list The base (docker) images usually comes with the standard packages installed. So even without these packages in dependency list, the installation will go through. But its good to have all the required packages in the dependency list. Change-Id: I4955f178ecf8c69f810aac9a81c7d024bc4b3de7
1 parent 6c41f0d commit 26c693f

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

amd/comgr/CMakeLists.txt

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -464,13 +464,14 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
464464
else()
465465
set(CPACK_DEBIAN_AMD-COMGR_PACKAGE_NAME comgr-static-dev)
466466
endif()
467-
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport")
467+
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/ROCm/llvm-project/tree/amd-staging/amd/comgr")
468+
set(DEBIAN_DEPENDENCIES "zlib1g, libc6, libstdc++6, libgcc-s1")
468469
if (LLVM_LINK_LLVM_DYLIB)
469-
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libtinfo-dev, rocm-core, rocm-llvm-core")
470-
set(CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS "libtinfo-dev, rocm-core-asan, rocm-llvm-core")
470+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libtinfo-dev, rocm-core, rocm-llvm-core, ${DEBIAN_DEPENDENCIES}")
471+
set(CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS "libtinfo-dev, rocm-core-asan, rocm-llvm-core, ${DEBIAN_DEPENDENCIES}")
471472
else()
472-
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libtinfo-dev, rocm-core")
473-
set(CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS "libtinfo-dev, rocm-core-asan")
473+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libtinfo-dev, rocm-core, ${DEBIAN_DEPENDENCIES}")
474+
set(CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS "libtinfo-dev, rocm-core-asan, ${DEBIAN_DEPENDENCIES}")
474475
endif()
475476
if (DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE})
476477
set(CPACK_DEBIAN_PACKAGE_RELEASE $ENV{CPACK_DEBIAN_PACKAGE_RELEASE})
@@ -485,12 +486,27 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
485486
else()
486487
set(CPACK_RPM_AMD-COMGR_PACKAGE_NAME comgr-static-devel)
487488
endif()
489+
490+
execute_process(COMMAND rpm --eval %{?dist}
491+
RESULT_VARIABLE PROC_RESULT
492+
OUTPUT_VARIABLE EVAL_RESULT
493+
OUTPUT_STRIP_TRAILING_WHITESPACE)
494+
message("RESULT_VARIABLE ${PROC_RESULT} OUTPUT_VARIABLE: ${EVAL_RESULT}")
495+
496+
if(PROC_RESULT EQUAL "0" AND "${EVAL_RESULT}" STREQUAL ".el7")
497+
# In Centos using parentheses is causing cpack errors.
498+
# Set the dependencies specifically for centos
499+
set(RPM_DEPENDENCIES "zlib, glibc, libstdc++, libgcc")
500+
else()
501+
set(RPM_DEPENDENCIES "(zlib or libz1), (libzstd or libzstd1), glibc, (libstdc++ or libstdc++6), (libgcc or libgcc_s1)")
502+
endif()
503+
488504
if (LLVM_LINK_LLVM_DYLIB)
489-
set(CPACK_RPM_PACKAGE_REQUIRES "ncurses, rocm-core, rocm-llvm-core")
490-
set(CPACK_RPM_ASAN_PACKAGE_REQUIRES "ncurses, rocm-core-asan, rocm-llvm-core")
505+
set(CPACK_RPM_PACKAGE_REQUIRES "rocm-core, rocm-llvm-core, ${RPM_DEPENDENCIES}")
506+
set(CPACK_RPM_ASAN_PACKAGE_REQUIRES "rocm-core-asan, rocm-llvm-core, ${RPM_DEPENDENCIES}")
491507
else()
492-
set(CPACK_RPM_PACKAGE_REQUIRES "ncurses, rocm-core")
493-
set(CPACK_RPM_ASAN_PACKAGE_REQUIRES "ncurses, rocm-core-asan")
508+
set(CPACK_RPM_PACKAGE_REQUIRES "rocm-core, ${RPM_DEPENDENCIES}")
509+
set(CPACK_RPM_ASAN_PACKAGE_REQUIRES "rocm-core-asan, ${RPM_DEPENDENCIES}")
494510
endif()
495511
if(DEFINED ENV{CPACK_RPM_PACKAGE_RELEASE})
496512
set(CPACK_RPM_PACKAGE_RELEASE $ENV{CPACK_RPM_PACKAGE_RELEASE})

0 commit comments

Comments
 (0)