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

Patch cord.h to remove CRAN warning #228

Merged
merged 1 commit into from
Apr 18, 2023
Merged

Patch cord.h to remove CRAN warning #228

merged 1 commit into from
Apr 18, 2023

Conversation

paleolimbot
Copy link
Collaborator

Closes #223.

This warning is occurring because Abseil does C++ trickery to inline character data into its "cord" data structure. S2 uses the "strings" module from Abseil for its logging and its text format parsing/generation. We explicitly turn off logging and don't use S2's text format and thus the piece of code in question is never called.

This "fix" just comments out the line and throws an exception if for some unforseen reason that method actually actually does get called. In that case the error should propagate up to the top level catch provided by Rcpp.

The real fix is to update Abseil; however, updating Abseil means we can no longer support C++11 (we're using the last version of Abseil that does support C++11; subsequent versions require C++14). That would mean that s2 (and its reverse dependency sf) may have trouble building on Centos 7 (e.g., many compute clusters). Centos 7 isn't EOL until June 2024, so it may be worth considering making s2 an optional dependency of sf instead of a hard one (cc @edzer ). There is a workaround (use something called devtoolset 8 which allows using the Centos 8 toolchain to compile stuff for Centos 7).

@codecov-commenter
Copy link

Codecov Report

Merging #228 (6405c00) into main (ab29592) will not change coverage.
The diff coverage is n/a.

❗ Current head 6405c00 differs from pull request most recent head cf99b2b. Consider uploading reports for the commit cf99b2b to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main     #228   +/-   ##
=======================================
  Coverage   94.02%   94.02%           
=======================================
  Files          46       46           
  Lines        3517     3517           
=======================================
  Hits         3307     3307           
  Misses        210      210           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@edzer
Copy link
Member

edzer commented Apr 18, 2023

LGTM!

I'd be also OK moving to requiring C++14; people on CentOS7 will always install from source so could relatively easy install an older version of s2; we just shouldn't pin sf on the latest s2 release. But for now this is a great fix!

@paleolimbot paleolimbot merged commit 90ae67a into main Apr 18, 2023
@paleolimbot paleolimbot deleted the fix-absl-cord branch April 19, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gcc13 issue
3 participants