-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Upgrade abseil to 20230802.1 #95
Conversation
If it’s a distraction right now, we could skip the abseil upgrade but it’d be good to know why it doesn’t work when the January release does. |
It looks like there are two main issues:
I think we might be able to set
There appears to be a workaround: abseil/abseil-cpp#1510 (comment). |
d28c745
to
3e28c66
Compare
scripts/test-gem-build
Outdated
@@ -23,6 +23,7 @@ if [[ "${BUILD_NATIVE_GEM}" == "ruby" ]] ; then | |||
bundle exec rake clean | |||
bundle exec rake gem | |||
else | |||
export MACOSX_DEPLOYMENT_TARGET=10.14 |
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.
I tried hard to avoid this duplication in the Rakefile
. I originally tried to pass cmake
-DCMAKE_CXX_FLAGS=-mmacosx-version-min=10.14
(https://github.com/tpoechtrager/osxcross#deployment-target), but the compiler flags had redundant values, with the latter one overriding the one I set:
-mmacosx-version-min=10.14 -mmacosx-version-min=10.13 ...
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.
Does this mean the native gems for macOS will no longer run on High Sierra (10.13) and instead require Mojave (10.14)? If so, perhaps we should add that to the README along with the glibc requirements.
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.
Yes. The alternative is to file an upstream fix to abseil to be able control the behavior of ABSL_OPTION_USE_STD_OPTIONAL
independently of MACOSX_DEPLOYMENT_TARGET
, but I suspect it's not worth the effort.
-labsl_hashtablez_sampler | ||
-labsl_exponential_biased | ||
-labsl_bad_optional_access | ||
-labsl_str_format_internal | ||
-labsl_synchronization | ||
-labsl_graphcycles_internal | ||
-labsl_kernel_timeout_internal |
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.
I was hoping we could drop this workaround in #96, but the runners are still using pkgconf
1.9.3. 2.0.0 will fix this: pkgconf/pkgconf#268
@mudge I think this is ready to go. |
357c626
to
9a9070c
Compare
073ee08
to
09b9b90
Compare
9a9070c
to
c66733a
Compare
Updated for the recently released 20230802.1 ( |
@stanhu any chance you could take a look at this? The Windows failures seem different to with patch level 0.
|
Out of interest, is MacPorts providing a version of Abseil that works with versions of macOS older than 10.14? See https://github.com/judaew/macports-ports/blob/master/devel/abseil/Portfile |
|
8f32657
to
1147c0b
Compare
Good spot. Given Abseil only needs C++14 (and RE2 follows suit), I’ve set our MiniPortile recipes to only target that standard and it seems to fix the macOS build without dropping support for older versions. |
Did this branch drop 0b57520? |
1147c0b
to
0c23084
Compare
Yes, I've restored it now (I was trying to see what was and wasn't required with patch level 1). |
The build is now green and (aside from the necessary workaround for abseil/abseil-cpp#1510) I'm happier with the diff especially as we're not dropping support for any existing users. |
If you're happy, I'd be tempted to merge this but not include it in a release until RE2 2023-10-01 is out (assuming it has a monthly release cadence now). |
I've raised #111 to partially automate this sort of thing in future: it's set to run on the first of the month and raise a PR with an updated |
So we can stay on top of updates to both RE2 and Abseil now they are vendored with the gem, run a monthly job to check for any new releases and update `dependencies.yml` accordingly, raising a PR if there are any. Closes #107
Sounds good! #112 didn't run CI. Does the user need to be approved? |
I think it’s due to https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs I’ll try one of the workarounds and try triggering it again to make sure it runs CI too. |
Due to a bug in pkgconf v1.9.3 (pkgconf/pkgconf#268) that has since been fixed in pkgconf v2.0, we need to maintain the correct order for linking abseil-cpp libraries. abseil 20230802 added a few new libraries and re-arranged the link order.
For compatibility with macOS < 10.14, only try to compile Abseil with C++14 rather than C++17 (which would require macOS 14 or later).
Previously the build would fail with this error message: ``` [ 37%] Building CXX object absl/synchronization/CMakeFiles/synchronization.dir/internal/create_thread_identity.cc.obj In file included from /tmp/d20230909-93-l6kcab/tmp/x86_64-w64-mingw32/ports/abseil/20230802.0/abseil-cpp-20230802.0/absl/synchronization/internal/create_thread_identity.cc:21: /tmp/d20230909-93-l6kcab/tmp/x86_64-w64-mingw32/ports/abseil/20230802.0/abseil-cpp-20230802.0/absl/synchronization/internal/waiter.h:44:2: error: #error ABSL_WAITER_MODE is undefined 44 | #error ABSL_WAITER_MODE is undefined | ^~~~~ /tmp/d20230909-93-l6kcab/tmp/x86_64-w64-mingw32/ports/abseil/20230802.0/abseil-cpp-20230802.0/absl/synchronization/internal/waiter.h:51:5: warning: "ABSL_WAITER_MODE" is not defined, evaluates to 0 [-Wundef] 51 | #if ABSL_WAITER_MODE == ABSL_WAITER_MODE_FUTEX | ^~~~~~~~~~~~~~~~ In file included from /tmp/d20230909-93-l6kcab/tmp/x86_64-w64-mingw32/ports/abseil/20230802.0/abseil-cpp-20230802.0/absl/synchronization/internal/create_thread_identity.cc:21: /tmp/d20230909-93-l6kcab/tmp/x86_64-w64-mingw32/ports/abseil/20230802.0/abseil-cpp-20230802.0/absl/synchronization/internal/waiter.h:52:16: error: 'FutexWaiter' does not name a type 52 | using Waiter = FutexWaiter; | ^~~~~~~~~~~ make[2]: *** [absl/synchronization/CMakeFiles/synchronization.dir/build.make:92: absl/synchronization/CMakeFiles/synchronization.dir/internal/create_thread_identity.cc.obj] Error 1 ``` As mentioned in abseil/abseil-cpp#1510 (comment), work around the issue by explicitly defining `-DABSL_FORCE_WAITER_MODE=4` (4 = `ABSL_WAITER_MODE_STDCPP`).
0c23084
to
5f742e5
Compare
Closing in favour of #113 as that PR was raised automatically. |
RE2 2023-09-01 was released a week ago and there is a more recent LTS version of Abseil for us to use. However, when I initially pushed this to our v2.0.x branch, it looks like there are quite a few build failures to investigate.