Bug 2381058

Summary: libyang: FTBFS with change proposal CMake: Use ninja generator by default
Product: [Fedora] Fedora Reporter: Cristian Le <fedora>
Component: libyangAssignee: Tomas Korbar <tkorbar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jruzicka.pkg, mruprich, tkorbar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-07-30 13:25:05 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:
Bug Depends On:    
Bug Blocks: 2376112    

Description Cristian Le 2025-07-16 15:18:27 UTC
Dear package maintainer,

This is an automated bug created due to a FTBFS when rebuilding this package for the change proposal CMake: Use ninja generator by default.

The rebuild is being tracked in https://copr.fedorainfracloud.org/coprs/lecris/cmake-ninja/package/libyang.

See https://fedoraproject.org/wiki/Changes/CMake_ninja_default for more information on how to make the package compatible.

More specifically, make sure you are using standard %cmake_* macros. If you find that there are hard dependencies on
the generator even after such transition, please ping me for closer investigation.

You can check the build locally following the instructions in the change proposal, or submit your build to the tracking
copr project.

Let me know if you encounter any issues, or need any other help.

Comment 1 Michal Ruprich 2025-07-30 13:25:05 UTC
I did not find an equivalent of 'make doc' for this project so I am opting-out from the ninja build:

https://src.fedoraproject.org/rpms/libyang/c/1f5e3bfa7ffcc385ac943132f18c4e9932917788

If this changes in the future, I will gladly opt-in again.

Comment 2 Cristian Le 2025-07-30 13:35:04 UTC
That should be `%cmake_build -t doc`. It is project dependent what the names of the targets are [1], but that command should do the trick. There don't seem to be install commands there, so you would have to decipher where the docs are generated, but probably you did that in the original as well.

Let me know if you still have problems with that.

[1]: https://github.com/CESNET/libyang/blob/da7272e19d9e27d1bfdd68108fa9dce25fbdf5e8/CMakeModules/GenDoc.cmake#L14-L16

Comment 3 Michal Ruprich 2025-07-30 14:39:58 UTC
That's actually better, I did not know that I could use that. Switching to cmake_build for docs:

https://src.fedoraproject.org/rpms/libyang/c/2ef31fabb7b69d836d2733481e7b5238f1c6fd42

Thanks!