Bug 2365312 - cmake cannot find the cholmod sub-package
Summary: cmake cannot find the cholmod sub-package
Keywords:
Status: CLOSED DUPLICATE of bug 2355055
Alias: None
Product: Fedora
Classification: Fedora
Component: suitesparse
Version: 42
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jiri Kastner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-09 11:50 UTC by Brad Bell
Modified: 2025-05-14 13:45 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-14 13:45:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Brad Bell 2025-05-09 11:50:30 UTC
System Info:
cholmod>uname -a
Linux vbox 6.14.5-300.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May  2 14:16:46 UTC 2025 x86_64 GNU/Linux

Problem Description:
If the suitesparse package is insatalled, one should be able to find it in a CMakeLists.txt script using the command:
FIND_PACKAGE(CHOLMOD)

Reproducible: Always

Steps to Reproduce:
Create a temporary directory, store the bash script below in that directory and then run it.

#! /usr/bin/env bash
set -e -u
if ! dnf list --installed | grep suitesparse > /dev/null
then
   echo 'Must first execute the following command before running this script:'
   echo 'sudo dnf install suitesparse'
   exit 1
fi
cat << EOF > CMakeLists.txt
CMAKE_MINIMUM_REQUIRED( VERSION 3.10 )
PROJECT(test_find_cholmod)
FIND_PACKAGE(CHOLMOD)
EOF
if [ -e build_test ]
then
   rm -r build_test
fi
if cmake -S . -B build_test 1> cmake.out 2> cmake.err
then
   tail -1 cmake.out
   echo 'run_test.sh: OK'
else
   cat cmake.err
   echo 'run_test.sh: Error'
fi


Actual Results:
cholmod>./run_test.sh
CMake Error at /usr/lib64/cmake/SuiteSparse_config/SuiteSparse_configTargets.cmake:104 (message):
  The imported target "SuiteSparse::SuiteSparseConfig_static" references the
  file

     "/usr/lib64/libsuitesparseconfig.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib64/cmake/SuiteSparse_config/SuiteSparse_configTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib64/cmake/SuiteSparse_config/SuiteSparse_configConfig.cmake:91 (include)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/lib64/cmake/CHOLMOD/CHOLMODConfig.cmake:135 (find_dependency)
  CMakeLists.txt:3 (FIND_PACKAGE)


run_test.sh: Error


Expected Results:
cholmod>./run_test.sh
-- Build files have been written to: ...
run_test.sh: OK

Comment 1 Brad Bell 2025-05-09 12:37:11 UTC
This bug was previously reported for Fedora 40 and never got fixed; see
https://bugzilla.redhat.com/show_bug.cgi?id=2355055

In addition, the upstream package has refused to support CHOLMOD.pc on windows ; see
https://github.com/DrTimothyAldenDavis/SuiteSparse/discussions/923
so using pkg-config instead only works on some systems

Comment 2 Orion Poplawski 2025-05-14 13:45:53 UTC

*** This bug has been marked as a duplicate of bug 2355055 ***


Note You need to log in before you can comment on or make changes to this bug.