Bug 1898979

Summary: I want the cmake files
Product: [Fedora] Fedora Reporter: Cristian Morales Vega <christian.morales.vega>
Component: boostAssignee: Jonathan Wakely <jwakely>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anton.jelkin, Benjamin-Huth, code, dakingun, denis.arnaud_fedora, jwakely, laurent.rineau__fedora, rr.underwood94, trodgers
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-22 13:30:28 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:
Bug Depends On:    
Bug Blocks: 2098699    

Description Cristian Morales Vega 2020-11-18 12:35:03 UTC
https://src.fedoraproject.org/rpms/boost/blob/master/f/boost.spec#_901 says "Remove cmake files until we know somebody wants them."

Well, I do want them. My "find_package(Boost REQUIRED COMPONENTS headers)" doesn't work without it.

Comment 1 Jonathan Wakely 2020-11-18 13:17:43 UTC
Could you be more precise about what you're doing that doesn't work?

There are other packages in Fedora which use cmake to find Boost libs and they work.

Comment 2 Cristian Morales Vega 2020-11-18 13:25:00 UTC
> Could you be more precise about what you're doing that doesn't work?

Literally "find_package(Boost REQUIRED COMPONENTS headers)".

> There are other packages in Fedora which use cmake to find Boost libs and they work.

"find_package(Boost REQUIRED)" does work, yes.

Comment 3 Jonathan Wakely 2020-11-18 15:18:32 UTC
And find_package(Boost REQUIRED COMPONENTS filesystem) works too.

I think there's just no "headers" component in cmake's built-in FindBoost.cmake, which seems fine.

My understanding is that the boost-cmake alternative isn't backwards compatible and might break other people's code:
https://github.com/boostorg/boost_install/issues/12#issuecomment-508683006

It's also a pain to package the boost-cmake files:
https://lists.boost.org/Archives/boost/2020/04/248812.php
But that could be solved if needed.

Comment 4 Cristian Morales Vega 2020-11-18 15:32:59 UTC
If installing it breaks it for some people and not installing it breaks it for other people (i.e. me)... let's have them in a boost-cmake package which may or may not be a weak dependency of boost-devel? Then people can decide by themselves if they want them.

Comment 5 Benjamin 2021-01-12 08:58:48 UTC
*** Bug 1914233 has been marked as a duplicate of this bug. ***

Comment 6 Benjamin 2021-01-12 09:07:06 UTC
I would also appriciate to have the cmake files, since things such `find_package(Boost CONFIG)` do not work without them. Since Boost 1.70 they should be available (https://cmake.org/cmake/help/v3.17/module/FindBoost.html#boost-cmake), and some libraries I use expect them.

Comment 7 Ben Cotton 2021-02-09 15:25:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 8 Robert 2021-09-24 18:49:37 UTC
This bug bit me recently having just switching to Fedora from Gentoo.  I did a few quick experiments to see what other distributions and open source projects do:

Archlinux (latest): installs BoostConfig.cmake
Ubuntu 20.04: installs BoostConfig.cmake
Debian (latest): installs BoostConfig.cmake
Alpine (latest): installs BoostConfig.cmake
Gentoo (latest): installs BoostConfig.cmake
CentOS (latest): provides boost 1.66 which is too old to have BoostConfig.cmake
OpenSUSE Leap: provides boost 1.66 which is too old to have BoostConfig.cmake
OpenSUSE Tumbleweed: installs BoostConfig.cmake
LinuxMint: installs BoostConfig.cmake
FreeBSD: installs BoostConfig.cmake

While "the other people are doing it" isn't always the best principled argument, perhaps this informs the discussion.

Comment 9 Ben Cotton 2022-05-12 15:35:44 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 10 Antons Jeļkins 2022-06-09 12:10:50 UTC
I also want these CMake files.

In addition to Robert's list, Yocto Linux also installs BoostConfig.cmake. Another thing which does not work on Fedora is the `exception` component and `Boost::exception` target. Also, the mentioned boost-install bug seems to be fixed now.

Comment 11 Jonathan Wakely 2022-06-10 08:36:07 UTC
(In reply to Antons Jeļkins from comment #10)
> Another thing which does not work on Fedora is the `exception` component and
> `Boost::exception` target.

I don't know what this means, sorry. Please report a separate bug for separate issues.

> Also, the mentioned boost-install bug seems to be
> fixed now.

Yes https://github.com/boostorg/boost_install/issues/12 has been resolved.

I need to check if the blocking issue at https://lists.boost.org/Archives/boost/2020/04/248814.php is fixed yet, or if we need to post-process the cmake files before installation.

Comment 12 Jonathan Wakely 2022-06-10 08:37:13 UTC
(In reply to Jonathan Wakely from comment #11)
> (In reply to Antons Jeļkins from comment #10)
> > Another thing which does not work on Fedora is the `exception` component and
> > `Boost::exception` target.
> 
> I don't know what this means, sorry. Please report a separate bug for
> separate issues.

Oh, I guess you mean find_package(Boost REQUIRED COMPONENTS headers), in which case that isn't a separate issue.

We'll take another look at installing the cmake files for F37.

Comment 13 Antons Jeļkins 2022-06-10 09:16:38 UTC
Yes, I meant this does not work on Fedora:

  find_package(Boost REQUIRED COMPONENTS exception)

This (and `headers`) works on all other distributions I have tried. It also works on Fedora if I remove [1], add "%{_libdir}/cmake" to e.g. [2], and rebuild and reinstall the package.

[1] https://src.fedoraproject.org/rpms/boost//blob/rawhide/f/boost.spec#_903
[2] https://src.fedoraproject.org/rpms/boost//blob/rawhide/f/boost.spec#_1166

Comment 14 Laurent Rineau 2022-06-10 14:21:46 UTC
(In reply to Jonathan Wakely from comment #11)
> I need to check if the blocking issue at
> https://lists.boost.org/Archives/boost/2020/04/248814.php is fixed yet, or
> if we need to post-process the cmake files before installation.

That has been fixed.

I have create a pull-request. See the details in the top message at: https://src.fedoraproject.org/rpms/boost/pull-request/14

Comment 15 Laurent Rineau 2022-06-22 13:30:28 UTC
Fixed by https://bodhi.fedoraproject.org/updates/FEDORA-2022-89acaae618.