-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
abseil: pin ABI at compile-time #7443
Conversation
I detected other pull requests that are modifying abseil/all recipe: This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
All green in build 1 (
|
@uilianries this is the change we discussed in #7249 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This change prevents any new build of abseil with gcc11. Why it it needed since abseil has a mechanism to detect the C++ headers to use at build and consume time? If compiler.cppstd at build and consume time are consistent and the same compiler is used, it will detect the same headers, so no ABI issue as soon as consumers either use Actually the problem of function-framework-cpp comes from itself, it's here: https://github.com/GoogleCloudPlatform/functions-framework-cpp/blob/1f0e1a987472d669cb5b4323f22d2f9c07298331/CMakeLists.txt#L42-L43, it should use |
it's almost impossible to predict if those headers are available. abseil has a mechanism to detect these headers, trust it. Since we are trying very hard to inject at build time the default C++ standard of the compiler or the one given in profile, it should be fine.
It is possible I misunderstand how this works, if so, I would be happy to learn how to handle this better.
I remember reading that GCC 11 would make C++17 its default... yup, that is the case
Because the headers detected at build time may be different from the headers detected at consume time, see: #7249
That sounds reasonable, but that is not what happened in #7400. I think the value of
The problem arises when Abseil is compiled with C++11 or C++14. Abseil's ABI is fixed at that point, it uses (for example)
Any consumer using C++17 will try to use
Most likely that would be better, it is unclear that it would solve the problem. Compiling |
Yes you're right, it's a mess.
So depending on compiler version, CMake injects any standard greater than C++11 while compiling abseil, then any standard greater than C++17 while consuming it in functions framework cpp. It cannot be solved in CCI without building packages with specific compiler.cppstd in profile. |
revert conan-io#7443 it's almost impossible to predict if those headers are available. abseil has a mechanism to detect these headers, trust it. Since we are trying very hard to inject at build time the default C++ standard of the compiler or the one given in profile, it should be fine.
Actually there would be a solution:
Therefore, even if abseil was compiled with C++11 standard, a recipe using C++17 at consume time would not be tricked by going into the wrong branch (the opposite would not work, abseil compiled with C++17 could not work in a project forcing C++11, but in conan it shouldn't happen). |
… versions + modernize * add shared option * system libs for FreeBSD and iOS/tvOS/watchOS * move checks to validate() * stop maintenance of unofficial version 20200205 * fix abseil_dll component for windows shared build * stop maintenance of unofficial version 20200205 * finer grained export of patches * drop 20200205 in config.yml as well * modernize * absl-string may link to libm * drop maintenance of several patch versions keep last patch of each "major" version * drop shared with msvc for the moment * ensure C++ standard consistency revert #7443 it's almost impossible to predict if those headers are available. abseil has a mechanism to detect these headers, trust it. Since we are trying very hard to inject at build time the default C++ standard of the compiler or the one given in profile, it should be fine.
…ew patch versions + modernize * add shared option * system libs for FreeBSD and iOS/tvOS/watchOS * move checks to validate() * stop maintenance of unofficial version 20200205 * fix abseil_dll component for windows shared build * stop maintenance of unofficial version 20200205 * finer grained export of patches * drop 20200205 in config.yml as well * modernize * absl-string may link to libm * drop maintenance of several patch versions keep last patch of each "major" version * drop shared with msvc for the moment * ensure C++ standard consistency revert conan-io#7443 it's almost impossible to predict if those headers are available. abseil has a mechanism to detect these headers, trust it. Since we are trying very hard to inject at build time the default C++ standard of the compiler or the one given in profile, it should be fine.
abseil/all
As discussed in #7400 (comment) Abseil cannot be compiled with C++11 and used from C++17, not without first "pinning" its ABI via some patches to
absl/base/options.h
. This PR changes the recipe to make these changes when the code is built.Fixes #7249.
conan-center hook activated.