> On Sunday, July  6, 2025, at 12:50 AM +0200, Frank Heckenbach wrote:
> > Could libabsl be built with ABSL_USES_STD_STRING_VIEW,
> > ABSL_OPTION_USE_STD_OPTIONAL, ABSL_OPTION_USE_STD_VARIANT and
> > similar settings?
> 
> Yes, but it's not going to happen in trixie. :|
> 
> For background, ABSL_USES_STD_STRING_VIEW and friends have been in
> Abseil for a while to support projects that are still using C++14 (or
> earlier). Happily, Abseil upstream has officially dropped support for
> C++14, and the latest release of Abseil no longer even has these
> #defines. Unfortunately, trixie was frozen before that release, so
> trixie will ship with absl::string_view != std::string_view. forky will
> be the first release to have have absl::string_view == std::string_view
> everywhere.
> 
> I know this is probably not the answer you wanted to hear, and I'm sorry
> that RE2's switch to absl::string_view is creating work for you. I think
> the simplest solution right now would be to switch to building Abseil
> and RE2 as part of your project rather than using the ones packaged in
> trixie; that would let you get the seamless C++17 experience rather than
> the static_cast-prone old one. (You should rebuild both Abseil and RE2 -
> a from-source Abseil will generally have a different ABI than Abseil in
> trixie, so trying to link the trixie RE2 against a from-source Abseil is
> likely to result in complex and subtle bugs.)

Thanks for your detailed explanation and the perspective for future
releases.

At the moment, I'm actually facing a bigger problem which makes it
almost impossible to build my software with Abseil:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108845

The actual culprit here is pkgconf, no doubt, but seeing as my bug
report hasn't even gotten a response so far, I'm not sure it will be
fixed in trixie.

I have to say, though, that Abseil does use very many .pc files:

% ls -la /usr/lib/x86_64-linux-gnu/pkgconfig/*.pc | wc -l
590
% ls -la /usr/lib/x86_64-linux-gnu/pkgconfig/absl*.pc | wc -l
227

So almost half of all .pc files in my system come from a single
library! I do wonder if this fine-grained splitting is really
necessary -- shouldn't -Wl,--as-needed already take care of only
linking what's needed?

I guess in the end I'll have to rebuild RE2 and/or Abseil as you
say. For now, to get my software to compile at all so I can actually
start testing things, I just merged all the .pc files. This seems to
work for me, though of course, it would break with Abseil updates.

Since the current situation is untenable regarding compile times,
you could please do anything about it for trixie (or coordinate with
the pkgconf maintainers)?

Regards,
Frank

#!/bin/bash

set -e
export LC_ALL=C
umask 22

# Merge all absl Libs into absl_all.pc; make each single one depend only on 
that.
cd "/usr/lib/$(gcc -print-multiarch)/pkgconfig"
mkdir absl-orig
mv absl_* absl-orig
libs="$(sed -n '/^Libs:/{s///;s/[[:space:]]\+/\n/g;p;}' absl-orig/* |
        sed '/pop-state/s/^/zzz &/' |
        sort -u |
        sed 's/^zzz //' |
        tr '\n' ' ')"
sed "/^Name/s/:.*/: 
absl_all/;/^Description/s/base/merged/;/^Requires/d;/^Libs:/s|:.*|:$libs|" 
absl-orig/absl_base.pc > absl_all.pc
for f in absl-orig/*; do
  sed '/^Libs:/d;/^Cflags:/d;/^Requires:/s/:.*/: absl_all/' "$f" > "${f#*/}"
done

Reply via email to