--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: libamd-comgr-dev: find_package(amd_comgr) cannot include amd_comgr-targets.cmake
- From: Cordell Bloor <cgmb-deb@slerp.xyz>
- Date: Thu, 05 May 2022 21:37:48 -0600
Package: libamd-comgr-dev
Version: 5.1.0-1
Severity: important
X-Debbugs-Cc: cgmb-deb@slerp.xyz
When attempting to build HIP using the instructions provided in
https://gist.github.com/cgmb/edb7b790ab55681fb2ba5385ee02489b, if the
change to /usr/lib/x86_64-linux-gnu/cmake/amd_comgr/amd_comgr-config.cmake
is skipped, then the build will fail with the error:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/amd_comgr/amd_comgr-config.cmake:8 (include):
include could not find requested file:
/usr/lib/lib/cmake/amd_comgr/amd_comgr-targets.cmake
Call Stack (most recent call first):
/root/ROCclr-rocm-5.1.1/cmake/ROCclrLC.cmake:21 (find_package)
/root/ROCclr-rocm-5.1.1/cmake/ROCclr.cmake:129 (include)
src/cmake/FindROCclr.cmake:51 (include)
src/CMakeLists.txt:51 (find_package)
This error is introduced by the patches 0004-Relocate-cmake-export.patch
and 0005-cmake-exports-continued.patch, which change some places where
AMD_COMGR_PACKAGE_PREFIX is used, but leave others unchanged, resulting
in inconsistencies. I recommend dropping those patches and replacing them
with a patch that fixes the behaviour earlier in the file (thereby keeping
it more consistent later):
--- rocm-compilersupport-5.1.0.orig/lib/comgr/CMakeLists.txt
+++ rocm-compilersupport-5.1.0/lib/comgr/CMakeLists.txt
@@ -210,7 +210,7 @@ target_include_directories(amd_comgr
set(AMD_COMGR_CONFIG_NAME amd_comgr-config.cmake)
set(AMD_COMGR_TARGETS_NAME amd_comgr-targets.cmake)
set(AMD_COMGR_VERSION_NAME amd_comgr-config-version.cmake)
-set(AMD_COMGR_PACKAGE_PREFIX lib/cmake/amd_comgr)
+set(AMD_COMGR_PACKAGE_PREFIX ${CMAKE_INSTALL_LIBDIR}/cmake/amd_comgr)
# Generate the build-tree package.
set(AMD_COMGR_PREFIX_CODE)
@@ -256,11 +256,6 @@ install(FILES
set(AMD_COMGR_PREFIX_CODE "
# Derive absolute install prefix from config file path.
get_filename_component(AMD_COMGR_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
-string(REGEX REPLACE "/" ";" count "${AMD_COMGR_PACKAGE_PREFIX}")
-foreach(p ${count})
- set(AMD_COMGR_PREFIX_CODE "${AMD_COMGR_PREFIX_CODE}
-get_filename_component(AMD_COMGR_PREFIX \"\${AMD_COMGR_PREFIX}\" PATH)")
-endforeach()
if (NOT COMGR_BUILD_SHARED_LIBS)
string(APPEND AMD_COMGR_PREFIX_CODE "\ninclude(CMakeFindDependencyMacro)\n")
@@ -268,7 +263,7 @@ if (NOT COMGR_BUILD_SHARED_LIBS)
string(APPEND AMD_COMGR_PREFIX_CODE "find_dependency(LLD REQUIRED)\n")
endif()
-set(AMD_COMGR_TARGETS_PATH "\${AMD_COMGR_PREFIX}/${AMD_COMGR_PACKAGE_PREFIX}/${AMD_COMGR_TARGETS_NAME}")
+set(AMD_COMGR_TARGETS_PATH "\${AMD_COMGR_PREFIX}/${AMD_COMGR_TARGETS_NAME}")
configure_file("cmake/${AMD_COMGR_CONFIG_NAME}.in"
"${CMAKE_CURRENT_BINARY_DIR}/${AMD_COMGR_CONFIG_NAME}.install"
@ONLY)
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.4.0-109-generic (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: unable to detect
Versions of packages libamd-comgr-dev depends on:
ii libamd-comgr2 5.1.0-1
libamd-comgr-dev recommends no packages.
libamd-comgr-dev suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: rocm-compilersupport
Source-Version: 5.1.0-2
Done: Étienne Mollier <emollier@debian.org>
We believe that the bug you reported is fixed in the latest version of
rocm-compilersupport, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1010649@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Étienne Mollier <emollier@debian.org> (supplier of updated rocm-compilersupport package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Mon, 09 May 2022 23:45:28 +0200
Source: rocm-compilersupport
Architecture: source
Version: 5.1.0-2
Distribution: unstable
Urgency: medium
Maintainer: ROCm Team <debian-ai@lists.debian.org>
Changed-By: Étienne Mollier <emollier@debian.org>
Closes: 1010649
Changes:
rocm-compilersupport (5.1.0-2) unstable; urgency=medium
.
* Removed 0005-cmake-exports-continued.patch.
* Removed 0004-Relocate-cmake-export.patch.
* Added 0004-dynamic-package-prefix.patch.
Thanks to Cordell Bloor (Closes: #1010649)
* d/control: add myself to uploaders.
Checksums-Sha1:
bc04ae7e0aebb3f33de7cb43875d42a8b40fcef7 2478 rocm-compilersupport_5.1.0-2.dsc
af37e9e94b3b889d22147400f4134451091a1a2f 5140 rocm-compilersupport_5.1.0-2.debian.tar.xz
Checksums-Sha256:
0a2e8fa1f03878ee80174f89c977c7be6ffa51a11702e69d096fc2828581dddf 2478 rocm-compilersupport_5.1.0-2.dsc
18b2e27a9d789a39cffe884c741d12720fa9dc79f02dc4302c15944c5504fdd1 5140 rocm-compilersupport_5.1.0-2.debian.tar.xz
Files:
42005a2b68869355765ec1d07771e70e 2478 devel optional rocm-compilersupport_5.1.0-2.dsc
ea7af11a0209cb8cc7e9d63b5b2bd525 5140 devel optional rocm-compilersupport_5.1.0-2.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQJIBAEBCgAyFiEEj5GyJ8fW8rGUjII2eTz2fo8NEdoFAmJ5jbcUHGVtb2xsaWVy
QGRlYmlhbi5vcmcACgkQeTz2fo8NEdqbkQ/+M2RvpATxb8nFxcri1GZ0yn/enu3e
lsH0Wcyrm0pubqNqvva96Louv+OHlpsSkIim1/b7oeJ7/1o5C1L0kmHWAy33ieY7
MV1N+5pnGzMbUZmPhjrvrsbmBJjtfNwDR429OPStL+x6y/wA7VxrrcwqSHJasDte
IWXpaVMEvF2P/tJ8L2229aE1Jz88yv9i1WyJ9vSxrJBPu6uQFBVYArsvzOfu8NPo
gZcTDhO1pbdgx+vAU59vDEY7yQ9PXKmvy+7AvG4amrCLiwFq6te9K1d3k3wxzimQ
hH9d/bVYBvJHAPuPoWM4vR0P7YAqmqbaTd6YxehyFG9UnvMFCrt2NkMUZvvudF9i
GSja9+XQjrQSgDNuOlsjnZADdqiDogHxKdVqXjcyya5o439cZkez1A9nZ+DKwoRP
86LSg6ZQTWVPRuBGVAf3FtP1hzyrUPT2wmQG5Ef4URF1jj+qb7a8gzMOtCRVvJVH
Sg1jTq4AAkuXbVZGYoH2QoBN9MJyqJAnoinKIDIdOqDlsdamhGpDgCaM9mnvkBew
zyhWGw18uEmNWzAavWAC23Gh1l/20Gr+jPGJh48TvI7Jm+cAr6H7ZumqIjyQrfMc
fnOPHlZ6E6ZYbXPKA/+xP+tqDnLmjjtGLfu0KrF7sxAaIsVFoapPNzhQfSN9LdIx
TjTn9BZXwK3JLfI=
=FEf2
-----END PGP SIGNATURE-----
--- End Message ---