Bug 2130870

Summary: CMake cannot find openbabel 3
Product: [Fedora] Fedora Reporter: Susi Lehtola <susi.lehtola>
Component: openbabelAssignee: Antonio T. sagitter <trpost>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: alex.ploumistos, dominik, scitech-bugs, susi.lehtola, trpost
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openbabel-3.1.1-15.fc38 openbabel-3.1.1-15.fc36 openbabel-3.1.1-15.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-09 16:33:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Susi Lehtola 2022-09-29 08:51:42 UTC
The included CMake configuration in openbabel-devel is broken.

Calling find_package(OpenBabel3) in CMake results in

$ cmake ..
CMake Error at /usr/lib64/cmake/openbabel3/OpenBabel3Config.cmake:16 (include):
  include could not find requested file:

    /cmake/openbabel3/OpenBabel3_EXPORTS.cmake
Call Stack (most recent call first):
  CMakeLists.txt:31 (find_package)


The problem is on the line

set(OpenBabel3_EXPORTS_FILE "${LIB_INSTALL_DIR}/cmake/openbabel3/OpenBabel3_EXPORTS.cmake")

which does not resolve to /usr/lib64/cmake/openbabel3/OpenBabel3_EXPORTS.cmake.

Comment 1 Antonio T. sagitter 2022-09-29 15:46:35 UTC
> set(OpenBabel3_EXPORTS_FILE "${LIB_INSTALL_DIR}/cmake/openbabel3/OpenBabel3_EXPORTS.cmake")

This line is correct but the user needs to use %cmake macro

Comment 2 Susi Lehtola 2022-09-29 16:27:15 UTC
(In reply to Antonio T. sagitter from comment #1)
> > set(OpenBabel3_EXPORTS_FILE "${LIB_INSTALL_DIR}/cmake/openbabel3/OpenBabel3_EXPORTS.cmake")
> 
> This line is correct but the user needs to use %cmake macro

One uses %cmake in rpm packaging, not command line... the CMake file should also work when %cmake macro is not used

Comment 3 Antonio T. sagitter 2022-09-29 20:00:53 UTC
Last commit should fix this issue:
https://src.fedoraproject.org/rpms/openbabel/c/f58d73c656a50c6787797426a8b97c8b250063ad?branch=rawhide

Comment 4 Fedora Update System 2022-09-29 20:20:55 UTC
FEDORA-2022-dfbc099d5d has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-dfbc099d5d

Comment 5 Fedora Update System 2022-09-29 20:22:35 UTC
FEDORA-2022-dfbc099d5d has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2022-10-01 10:42:10 UTC
FEDORA-2022-608aa85d22 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-608aa85d22

Comment 7 Fedora Update System 2022-10-01 10:42:15 UTC
FEDORA-2022-30f18333d1 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-30f18333d1

Comment 8 Fedora Update System 2022-10-02 01:22:47 UTC
FEDORA-2022-608aa85d22 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-608aa85d22`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-608aa85d22

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-10-02 02:18:23 UTC
FEDORA-2022-30f18333d1 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-30f18333d1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-30f18333d1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2022-10-09 16:33:31 UTC
FEDORA-2022-30f18333d1 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2022-11-10 22:08:52 UTC
FEDORA-2022-608aa85d22 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.