Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] boost/* wrong -std targeting c++20 with gcc/clang #25702

Open
lukester1975 opened this issue Oct 23, 2024 · 5 comments
Open

[package] boost/* wrong -std targeting c++20 with gcc/clang #25702

lukester1975 opened this issue Oct 23, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@lukester1975
Copy link

Description

def _cppstd_flag(self, compiler_cppstd=None):
...
 cppstd_flags.setdefault("17", "17" if clang_version >= "5" else "1z" if clang_version >= "3.5" else None)
 cppstd_flags.setdefault("20", "2a" if clang_version >= "6" else "20" if clang_version >= "12" else None)
 cppstd_flags.setdefault("23", "2b" if clang_version >= "13"  else "23" if clang_version >= "17" else None)

Those last two are somewhat pessimistic... Same problem with gcc for c++20:

cppstd_flags.setdefault("20", "2a" if gcc_version >= "8" else "20" if gcc_version >= "12" else None)

I can create a trivial PR (from https://github.com/lukester1975/conan-center-index/tree/fix-boost-clang-std) but given the comment "Replace it by Conan tool when available: conan-io/conan#12603" (and conan-io/conan#12603) maybe something else is preferred?

Thanks

Package and Environment Details

n/a

Conan profile

n/a

Steps to reproduce

n/a

Logs

n/a

@lukester1975 lukester1975 added the bug Something isn't working label Oct 23, 2024
@lukester1975 lukester1975 changed the title [boost] wrong -std targeting c++20 with gcc/clang [package] boost/* wrong -std targeting c++20 with gcc/clang Oct 31, 2024
@AbrilRBS AbrilRBS assigned AbrilRBS and uilianries and unassigned AbrilRBS Nov 5, 2024
@AbrilRBS
Copy link
Member

AbrilRBS commented Nov 5, 2024

@lukester1975 thanks a lot for the report - We're going to implement this fix (using Conan provided flags instead of the recipe mapping it itself) in a PR for boost alongside some other changes, which will take a bit, thanks a lot for your report :)

@uilianries
Copy link
Member

Boost recipe is one of most challenging recipes in CCI, we still do not have generators for B2, so any command should be parsed manually, including cppstd.

With Conan 2.x mandatory and default support now, we can simplify many parts of that recipe, including this current bug. Please, be aware we are only looking for Conan 2.x support now, as reporting some ago: #25461

@lukester1975
Copy link
Author

FWIW this causes cobalt not to build (sorry, I should've said that originally). I.e. it's not just a cosmetic thing - so I imagine a fix should go in sooner rather than later!

@uilianries
Copy link
Member

FWIW this causes cobalt not to build (sorry, I should've said that originally). I.e. it's not just a cosmetic thing - so I imagine a fix should go in sooner rather than later!

Totally fine, I prefer separated issues/PRs personally, easier to mitigate and work on. Plus, changing a single line in Boost recipe is always fragile.

@lukester1975
Copy link
Author

Sorry, I'm not sure what's being suggested now - should I just close this or do you want a PR to fix the 3 lines?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants