Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924446 - sci-libs/rocSPARSE-5.7.1-r1 - CMake Error at clients/cmake_install.cmake:46 (file): file INSTALL cannot find rocsparse_common.yaml
Summary: sci-libs/rocSPARSE-5.7.1-r1 - CMake Error at clients/cmake_install.cmake:46 (...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-02-13 23:45 UTC by Joseph McElroy
Modified: 2024-03-13 22:25 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (rocSPARSE-build-log.tar.gz,61.76 KB, application/gzip)
2024-02-13 23:45 UTC, Joseph McElroy
Details
bugfix for the install step in the case of USE="benchmark -test" (rocSPARSE-5.7.1-cmake-benchmark-deps.patch,717 bytes, patch)
2024-03-11 22:17 UTC, Anton Repko
Details | Diff
rocSPARSE-5.7.1: patch for USE=test (rocSPARSE-5.7.1-remove-matrices-unpacking.patch,1.52 KB, patch)
2024-03-11 22:26 UTC, Anton Repko
Details | Diff
hipSPARSE-5.7.1: patch for USE=test (hipSPARSE-5.7.1-remove-matrices-unpacking.patch,1.56 KB, patch)
2024-03-11 22:26 UTC, Anton Repko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph McElroy 2024-02-13 23:45:32 UTC
Created attachment 884888 [details]
build log

The compilation succeeds, but the installation fails (x86_64, Kernel 6.6.13, Clang 17.0.6, GCC 13.2.1_p20240113-r1). 

>>> Source compiled.
 * Skipping make test/check due to ebuild restriction.
>>> Test phase [disabled because of RESTRICT=test]: sci-libs/rocSPARSE-5.7.1-r1

>>> Install sci-libs/rocSPARSE-5.7.1-r1 into /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/work/rocSPARSE-rocm-5.7.1"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/work/rocSPARSE-rocm-5.7.1_build"
ninja -v -j15 -l9 install
[0/1] cd /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/work/rocSPARSE-rocm-5.7.1_build && /usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "RelWithDebInfo"
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse/rocsparse.f90
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse/rocsparse_enums.f90
-- Up-to-date: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse
-- Up-to-date: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse/rocsparse-version.h
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse/rocsparse-export.h
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse/rocsparse-auxiliary.h
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse/rocsparse-complex-types.h
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse/rocsparse-functions.h
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse/rocsparse-types.h
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/include/rocsparse/rocsparse/rocsparse.h
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/lib64/librocsparse.so.0.1
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/lib64/librocsparse.so.0
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/lib64/librocsparse.so
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/lib64/cmake/rocsparse/rocsparse-targets.cmake
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/lib64/cmake/rocsparse/rocsparse-targets-relwithdebinfo.cmake
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/lib64/cmake/rocsparse/rocsparse-config.cmake
-- Installing: /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/image/usr/lib64/cmake/rocsparse/rocsparse-config-version.cmake
CMake Error at clients/cmake_install.cmake:46 (file):
  file INSTALL cannot find
  "/var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/work/rocSPARSE-rocm-5.7.1_build/clients/staging/rocsparse_common.yaml":
  No such file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:48 (include)


FAILED: CMakeFiles/install.util
cd /var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/work/rocSPARSE-rocm-5.7.1_build && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
 * ERROR: sci-libs/rocSPARSE-5.7.1-r1::gentoo failed (install phase):
 *   ninja -v -j15 -l9 install failed
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_install
 *   environment, line 3080:  Called cmake_src_install
 *   environment, line 1492:  Called cmake_build 'install'
 *   environment, line 1296:  Called eninja 'install'
 *   environment, line 1783:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"
 *
 * If you need support, post the output of `emerge --info '=sci-libs/rocSPARSE-5.7.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-libs/rocSPARSE-5.7.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/work/rocSPARSE-rocm-5.7.1_build'
 * S: '/var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/work/rocSPARSE-rocm-5.7.1'

>>> Failed to emerge sci-libs/rocSPARSE-5.7.1-r1, Log file:

>>>  '/var/tmp/portage/sci-libs/rocSPARSE-5.7.1-r1/temp/build.log'
Comment 1 Anton Repko 2024-03-11 22:17:53 UTC
Created attachment 887400 [details, diff]
bugfix for the install step in the case of USE="benchmark -test"
Comment 2 Anton Repko 2024-03-11 22:24:40 UTC
I reproduced this bug with USE="benchmark -test" (kernel 5.15.147, clang 17.0.6, gcc 12.3.1_p20240112). It is caused by additional files (compared to ROCm 5.1.3) which are going to be installed together with benchmark. However, these files are not previously copied to a proper directory (clients/staging) - there is a missing CMake dependency on rocsparse-common, which is present for test, but not for benchmark.

I'm attaching a proposed patch, together with patches for USE=test. The benchmark patch (if correct) is probably worth to be reported upstream.

USE=test appears to be broken in both rocSPARSE-5.7.1 and hipSPARSE-5.7.1, so I'm fixing it as well.

In summary, I'm adding only only the PATCH entries to the ebuilds (see below). I verified that the new and old ebuilds produce identical installation for USE="-benchmark -test", so a revbump is perhaps not necessary.

I'm not doing this as pull request since I'm not experienced with CMake, and also I was not sure why the analogs of remove-matrices-unpacking patches were not kept in version 5.7.1, as compared to version 5.1.3. So please review the proposed patches, and modify if necessary.

Signed-off-by: Anton Repko <anton@a-repko.sk>

===================================================================
--- sci-libs/rocSPARSE/rocSPARSE-5.7.1-r2.ebuild.orig
+++ sci-libs/rocSPARSE/rocSPARSE-5.7.1-r2.ebuild
@@ -60,8 +60,8 @@
 
 S="${WORKDIR}/rocSPARSE-rocm-${PV}"
 
-PATCHES=(
-)
+PATCHES=( "${FILESDIR}/${PN}-5.7.1-remove-matrices-unpacking.patch"
+       "${FILESDIR}/${PN}-5.7.1-cmake-benchmark-deps.patch" )
 
 python_check_deps() {
        if use test; then
--- hipSPARSE-5.7.1.ebuild.orig
+++ hipSPARSE-5.7.1.ebuild
@@ -51,6 +51,8 @@
 
 S="${WORKDIR}/hipSPARSE-rocm-${PV}"
 
+PATCHES=( "${FILESDIR}/${PN}-5.7.1-remove-matrices-unpacking.patch" )
+
 src_prepare() {
        sed -e "s/PREFIX hipsparse//" \
                -e "/<INSTALL_INTERFACE/s,include,include/hipsparse," \
Comment 3 Anton Repko 2024-03-11 22:26:02 UTC
Created attachment 887401 [details, diff]
rocSPARSE-5.7.1: patch for USE=test
Comment 4 Anton Repko 2024-03-11 22:26:52 UTC
Created attachment 887402 [details, diff]
hipSPARSE-5.7.1: patch for USE=test