Bug 2223194

Summary: c4core-devel.x86-64 c4coreTargets-release.cmake (and other files) points to wrong library
Product: [Fedora] Fedora Reporter: Valdis Kletnieks <valdis.kletnieks>
Component: c4coreAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: code
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: c4core-0.1.11-13.fc39 c4core-0.1.10-11.el8 c4core-0.1.11-11.fc38 c4core-0.1.9^20220802gitda43293-9.el9 c4core-0.1.10-11.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-16 18:42:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Valdis Kletnieks 2023-07-16 12:53:17 UTC
I installed c4core-0.1.11-12.fc39.x86_64 and c4core-devel-0.1.11-12.fc39.x86_64.

I discovered that the -devel RPM contains:

c4coreTargets-release.cmake:  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libc4core.so.0.1.11"

Which of course doesn't work because the x86-84 version is in /lib64/libc4core.so.

Looks like somebody just copied the -devel.i686 version over and didn't fix the all the /lib/  references in /usr/lib64/cmake/c4core/

I locally changed it thus:
 [/usr/lib64/cmake/c4core] sed -i.bak -e 's?/lib/?/lib64/?g' *

and things started working.

Note: It looks like rapidyaml-devel has the exact same problem in /usr/lib64/cmake/ryml.

Reproducible: Always

Comment 1 Ben Beasley 2023-07-16 13:06:14 UTC
Thanks for reporting this.

The problem comes from the very complicated set of bespoke CMake scripts, https://github.com/biojppm/cmake, shared by all these projects; those scripts are packaged in Fedora as c4project. As you surmised, everything is incorrectly installed in /usr/lib, and then the spec file forcibly moves things to /usr/lib64 on multilib architectures.

The problem has been reported upstream as https://github.com/biojppm/rapidyaml/issues/256 and https://github.com/biojppm/cmake/pull/7, but there hasn’t been a fix even though upstream is generally responsive and helpful.

I’m not a CMake expert, but I’ll try again to see if I can figure out how to patch this properly in the CMake scripts. Otherwise, I’ll just patch the generated .cmake files with something like the sed command you suggested.

Comment 2 Ben Beasley 2023-07-16 14:10:05 UTC
I tried to patch this and failed in a quick initial attempt (https://github.com/biojppm/cmake/pull/7#issuecomment-1637086373). I reminded upstream of the issue and will proceed with a sed-patch of the generated .cmake files in c4core, c4fs, c4log, and rapidyaml.

Comment 3 Fedora Update System 2023-07-16 18:42:11 UTC
FEDORA-2023-345631714a has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-345631714a

Comment 4 Fedora Update System 2023-07-16 18:42:55 UTC
FEDORA-2023-345631714a has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2023-07-16 19:24:53 UTC
FEDORA-2023-f93d10b375 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f93d10b375

Comment 6 Fedora Update System 2023-07-16 21:01:30 UTC
FEDORA-2023-a69f33a1ff has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a69f33a1ff

Comment 7 Fedora Update System 2023-07-16 22:35:40 UTC
FEDORA-EPEL-2023-3c1a8b13de has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-3c1a8b13de

Comment 8 Fedora Update System 2023-07-16 23:38:42 UTC
FEDORA-EPEL-2023-59ede754f8 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-59ede754f8

Comment 9 Ben Beasley 2023-07-16 23:41:21 UTC
I think I’ve patched this correctly in all releases, but please let me know if you find I overlooked something. Thanks again for the report.

Comment 10 Fedora Update System 2023-07-17 00:19:39 UTC
FEDORA-EPEL-2023-59ede754f8 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-59ede754f8

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

Comment 11 Fedora Update System 2023-07-17 00:38:08 UTC
FEDORA-2023-a69f33a1ff 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-2023-a69f33a1ff`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a69f33a1ff

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

Comment 12 Fedora Update System 2023-07-17 00:40:56 UTC
FEDORA-2023-f93d10b375 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-f93d10b375`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-f93d10b375

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

Comment 13 Fedora Update System 2023-07-17 01:08:28 UTC
FEDORA-EPEL-2023-3c1a8b13de has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-3c1a8b13de

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

Comment 14 Fedora Update System 2023-07-25 00:31:55 UTC
FEDORA-EPEL-2023-59ede754f8 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2023-07-25 17:13:32 UTC
FEDORA-2023-f93d10b375 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2023-07-25 17:32:24 UTC
FEDORA-EPEL-2023-3c1a8b13de has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2023-07-25 17:32:51 UTC
FEDORA-2023-a69f33a1ff has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.