Bug 2277316 - Included CMake config file is broken
Summary: Included CMake config file is broken
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: harfbuzz
Version: 40
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2279802 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-26 09:15 UTC by Michael Cullen
Modified: 2024-05-14 21:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-1187 0 None None None 2024-05-09 11:24:32 UTC

Description Michael Cullen 2024-04-26 09:15:03 UTC
The included CMake configuration file (in /usr/lib64/cmake/harfbuzz/harfbuzz-config.cmake) is broken - it appears to contain unsubstituted autoconf variables.



Reproducible: Always

Steps to Reproduce:
1. build something attempting to pull in harfbuzz via CMake - find_package(harfbuzz REQUIRED)
Actual Results:  
CMake Error at /usr/lib64/cmake/harfbuzz/harfbuzz-config.cmake:1:
  Parse error.  Expected a command name, got unquoted argument with text
  "@PACKAGE_INIT@".
Call Stack (most recent call first):
  makefiles/TPSDKs.cmake:68 (find_package)
  CMakeLists.txt:197 (include)


CMake Error at makefiles/TPSDKs.cmake:68 (find_package):
  find_package Error reading CMake code from
  "/usr/lib64/cmake/harfbuzz/harfbuzz-config.cmake".
Call Stack (most recent call first):
  CMakeLists.txt:197 (include)


-- Configuring incomplete, errors occurred!

Expected Results:  
Not produce errors

Looking at the RPMs, this is broken in F40 - both 8.3.0 and 8.4.0 - but looks fine in F39's 8.2.1-2

I suspect the upstream change https://github.com/harfbuzz/harfbuzz/commit/da9b838910e62825717a8b2de8ce9c92e396136e broke it by rewriting the file

Comment 1 Michael Cullen 2024-04-26 09:23:29 UTC
A bit more reading suggests to me the CMake config file may only be generated correctly when using Meson or CMake as a build system for harfbuzz - the autoconf build (that upstream seems to want to move away from, but is used by Fedora) seems not to set the right variables for the upstream rewritten harfbuzz-config.cmake.in file

Comment 2 Parag Nemade 2024-05-09 05:51:55 UTC
*** Bug 2279802 has been marked as a duplicate of this bug. ***

Comment 3 Parag Nemade 2024-05-09 11:00:50 UTC
Here is my preliminary analysis ->
I agree here what Michael Cullen has found. I tested these 2 builds
harfbuzz-8.2.1-2
harfbuzz-8.4.0
by building them on F38, F39 and F40 releases.

CMake config file is broken since harbufzz-8.3.0 release on any Fedora release system.

Also, as per comment on one of the upstream issue ->
The cmake build is “community maintained” as none of HarfBuzz current maintainers knows cmake or uses it, if you know how to fix this issue please submit a PR.

Comment 4 Enrique 2024-05-14 21:33:51 UTC
Maybe something that can give some clue is that the build system for harfbuzz seems to be now meson. Probably autotools still works, but with potentially broken builds. I looked into the Debian package, which has a working cmake configuration and indeed they use meson to create the harfbuzz-config.cmake file.


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