abseil-cpp: lock in provided vocabulary type#196718
abseil-cpp: lock in provided vocabulary type#196718tobim wants to merge 5 commits intoNixOS:stagingfrom
Conversation
Abseil provides a special header that allows software distributions to override compile option dependent features. If this file is left as-is downstream packages will usually fail to link due to undefined references. See the upstream documentation for a more comprehensive explanation: https://github.com/abseil/abseil-cpp/blob/lts_2021_11_02/absl/base/options.h Up till now we allowed to bulid abseil itself with different C++ Standards to overcome this problem, but that approach didn't fully solve it: * The override is an optional argument, so its easy to overlook. * Processes that see multiple variants of the library (becausse they get pulled into the closure by different dependencies) are subject to undefined behavior.
| }; | ||
|
|
||
| patches = [ | ||
| ./absl-string_view.patch |
There was a problem hiding this comment.
The patch should have a comment explaining its purpose.
SuperSandro2000
left a comment
There was a problem hiding this comment.
if this works, then it is a really great complexity reducer
|
This is a respin of #186490, and my comments there still apply. Abseil supports multiple C++ standards versions, and downstream packages have conflicting requirements on this version. The fact that you needed to patch one is proof. There’s no reason to suspect we won’t need more such patches in the future if we try to deviate from upstream in this way. If the goal is to prevent shared library conflicts at runtime, then we should allow |
This is still an issue with static linking, thankfully it should fail when linking a shared object or executable and not at runtime. Edit: Corrected option values. |
Having them in the same package closure isn’t a problem. I can even load Having them in the same link command would be a problem. Is that a problem we have? Seems to me the appropriate response is “don’t do that, then”—just like it would be if you tried to link both
If you write an incorrect derivation, a build failure sounds like the right result to me. |
I have that problem right now trying to build |
Description of changes
Abseil provides a special header that allows software distributions
to override compile option dependent features. If this file is left
as-is downstream packages will usually fail to link due to undefined
references.
See the upstream documentation for a more comprehensive explanation:
https://github.com/abseil/abseil-cpp/blob/lts_2021_11_02/absl/base/options.h
Up till now we allowed to bulid abseil itself with different C++
Standards to overcome this problem, but that approach didn't fully
solve it:
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notescc @andersk @ilya-fedin @SuperSandro2000