You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like Homebrew to ship Abseil built with the lowest supported C++ standard, because the Abseil 20230125.3 release as packaged by Homebrew seems to have broken my builds.
What happened (include all command output)?
Right now, Homebrew's Abseil is built via CMake against C++17:
As of abseil/abseil-cpp@308bbf3, released in https://github.com/abseil/abseil-cpp/releases/tag/20230125.3, Abseil installed through CMake no longer looks at the current compiler settings in the builds of dependent projects, but consults its own installed absl/base/options.h to see what features it was built with. This is so that the Abseil headers in the dependent's build try to link against the Abseil features that are actually in the built library, and not the features that would be in it if it were built for the C++ standard currently in use.
This means that Abseil is now forward-compatible: Abseil built for C++<17 can be used in an application built for C++>=17. So af74e52 is no longer needed and much of https://discourse.brew.sh/t/abseil-and-c-revision/8641 is no longer true. But it also means that cases where you could get away with including the Abseil headers when Abseil was built with a newer C++ standard and your application is built with an older C++ standard are now caught at compile time, when the Abseil headers reach for stuff not in your application's C++ standard because they saw it during the Abseil build.
So right now, Homebrew shipping Abseil 20230125.3 built with C++17 means any user code that has a dependency or transitive dependency on Abseil needs to itself be built with C++17 or newer. Protobuf has a dependency on Abseil, so any user code with a dependency on Protobuf has to be built with C++17 or newer.
I am lazy and want to support older compilers, and I don't want to upgrade my Protobuf-using project to build on C++17.
What did you expect to happen?
Abseil should be built against the lowest C++ version that Abseil itself supports. As of Abseil 20230125.3, the Abseil headers are clever enough to remember that the Abseil library artifacts were built with an old C++ standard, and will link correctly against them even if included on a newer C++ standard.
This will fixHomebrew#133007 and undoes Homebrew#62803 since Abseil 20230125.3 shouldn't need
it.
I'd add a test for user code with C++17 and Abseil with C++14, but then I
wouldn't be able to get rid of the fails with GCC 5 annotation.
You already have an open pull request at #133008, so I'm closing this in favour of that.
For future reference: the output of brew config and brew doctor is required for all issues opened at this repository, regardless of the perceived relevance of this information.
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output" saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
I would like Homebrew to ship Abseil built with the lowest supported C++ standard, because the Abseil 20230125.3 release as packaged by Homebrew seems to have broken my builds.
What happened (include all command output)?
Right now, Homebrew's Abseil is built via CMake against C++17:
homebrew-core/Formula/abseil.rb
Lines 24 to 29 in 69f3a9e
As of abseil/abseil-cpp@308bbf3, released in https://github.com/abseil/abseil-cpp/releases/tag/20230125.3, Abseil installed through CMake no longer looks at the current compiler settings in the builds of dependent projects, but consults its own installed
absl/base/options.h
to see what features it was built with. This is so that the Abseil headers in the dependent's build try to link against the Abseil features that are actually in the built library, and not the features that would be in it if it were built for the C++ standard currently in use.This means that Abseil is now forward-compatible: Abseil built for C++<17 can be used in an application built for C++>=17. So af74e52 is no longer needed and much of https://discourse.brew.sh/t/abseil-and-c-revision/8641 is no longer true. But it also means that cases where you could get away with including the Abseil headers when Abseil was built with a newer C++ standard and your application is built with an older C++ standard are now caught at compile time, when the Abseil headers reach for stuff not in your application's C++ standard because they saw it during the Abseil build.
So right now, Homebrew shipping Abseil 20230125.3 built with C++17 means any user code that has a dependency or transitive dependency on Abseil needs to itself be built with C++17 or newer. Protobuf has a dependency on Abseil, so any user code with a dependency on Protobuf has to be built with C++17 or newer.
I am lazy and want to support older compilers, and I don't want to upgrade my Protobuf-using project to build on C++17.
What did you expect to happen?
Abseil should be built against the lowest C++ version that Abseil itself supports. As of Abseil 20230125.3, the Abseil headers are clever enough to remember that the Abseil library artifacts were built with an old C++ standard, and will link correctly against them even if included on a newer C++ standard.
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: