Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 941145 - dev-libs/libphonenumber-8.13.47: compilation failure: error: call of overloaded ‘StrAppend(std::string*&, absl::lts_20240116::string_view&)’ is ambiguous
Summary: dev-libs/libphonenumber-8.13.47: compilation failure: error: call of overload...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-10-07 22:57 UTC by tusooa
Modified: 2024-10-13 09:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build log.txt,32.80 KB, text/plain)
2024-10-07 22:57 UTC, tusooa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tusooa 2024-10-07 22:57:56 UTC
Created attachment 905093 [details]
build log

relevant errors:

FAILED: CMakeFiles/phonenumber-shared.dir/src/phonenumbers/phonenumberutil.cc.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DI18N_PHONENUMBERS_USE_ALTERNATE_FORMATS -DI18N_PHONENUMBERS_USE_BOOST -DI18N_PHONENUMBERS_USE_ICU_REGEXP -DI18N_PHONENUMBERS_USE_TR1_UNORDERED_MAP -Dphonenumber_shared_EXPORTS -I/var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src  -O2 -pipe -march=native -fPIC   -Wall -MD -MT CMakeFiles/phonenumber-shared.dir/src/phonenumbers/phonenumberutil.cc.o -MF CMakeFiles/phonenumber-shared.dir/src/phonenumbers/phonenumberutil.cc.o.d -o CMakeFiles/phonenumber-shared.dir/src/phonenumbers/phonenumberutil.cc.o -c /var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/phonenumberutil.cc
/var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/phonenumberutil.cc: In member function ‘i18n::phonenumbers::PhoneNumberUtil::ErrorType i18n::phonenumbers::PhoneNumberUtil::BuildNationalNumberForParsing(absl::lts_20240116::string_view, std::string*) const’:
/var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/phonenumberutil.cc:2218:16: error: call of overloaded ‘StrAppend(std::string*&, absl::lts_20240116::string_view&)’ is ambiguous
 2218 |       StrAppend(national_number, phone_context.value());
      |       ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/phonenumberutil.cc:46:
/var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/stringutil.h:186:6: note: candidate: ‘void i18n::phonenumbers::StrAppend(std::string*, const StringHolder&)’
  186 | void StrAppend(string* dest, const StringHolder& s1);
      |      ^~~~~~~~~
In file included from /usr/include/absl/container/internal/layout.h:177,
                 from /usr/include/absl/container/internal/btree.h:67,
                 from /usr/include/absl/container/btree_map.h:57,
                 from /usr/include/google/protobuf/extension_set.h:31,
                 from /var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/phonenumber.pb.h:28,
                 from /var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/phonenumberutil.h:31,
                 from /var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/phonenumberutil.cc:15:
/usr/include/absl/strings/str_cat.h:538:6: note: candidate: ‘void absl::lts_20240116::StrAppend(absl::Nonnull<std::__cxx11::basic_string<char>*>, const AlphaNum&)’
  538 | void StrAppend(absl::Nonnull<std::string*> dest, const AlphaNum& a);
      |      ^~~~~~~~~
/var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/phonenumberutil.cc:2229:14: error: call of overloaded ‘StrAppend(std::string*&, absl::lts_20240116::string_view)’ is ambiguous
 2229 |     StrAppend(
      |     ~~~~~~~~~^
 2230 |         national_number,
      |         ~~~~~~~~~~~~~~~~
 2231 |         number_to_parse.substr(
      |         ~~~~~~~~~~~~~~~~~~~~~~~
 2232 |             index_of_national_number,
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~
 2233 |             index_of_phone_context - index_of_national_number));
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/dev-libs/libphonenumber-8.13.47/work/libphonenumber-8.13.47/cpp/src/phonenumbers/stringutil.h:186:6: note: candidate: ‘void i18n::phonenumbers::StrAppend(std::string*, const StringHolder&)’
  186 | void StrAppend(string* dest, const StringHolder& s1);
      |      ^~~~~~~~~
/usr/include/absl/strings/str_cat.h:538:6: note: candidate: ‘void absl::lts_20240116::StrAppend(absl::Nonnull<std::__cxx11::basic_string<char>*>, const AlphaNum&)’
  538 | void StrAppend(absl::Nonnull<std::string*> dest, const AlphaNum& a);
      |      ^~~~~~~~~


full log is in the attachment
Comment 1 Andreas Sturmlechner gentoo-dev 2024-10-09 06:16:07 UTC
Missing emerge --info.

Please also show
> $ equery l protobuf abseil-cpp
Comment 2 tusooa 2024-10-09 21:14:17 UTC
(In reply to Andreas Sturmlechner from comment #1)
> Missing emerge --info.
> 
> Please also show
> > $ equery l protobuf abseil-cpp


] equery l protobuf abseil-cpp 
 * Searching for protobuf ...
[IP-] [  ] dev-libs/protobuf-27.2:0/27.2.0

 * Searching for abseil-cpp ...
[IP-] [  ] dev-cpp/abseil-cpp-20240116.2-r4:0/20240116


emerge --info is at the very end of the build log.

Pasting it again here:

] emerge --info '=dev-libs/libphonenumber-8.13.47::gentoo'
Portage 3.0.65 (python 3.12.6-final-0, default/linux/amd64/23.0/desktop/plasma, gcc-13, glibc-2.39-r6, 6.6.47-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.47-gentoo-x86_64-x86_64-AMD_Ryzen_5_7600_6-Core_Processor-with-glibc2.39
KiB Mem:    64971364 total,  41330912 free
KiB Swap:    8388604 total,   8252668 free
Timestamp of repository gentoo: Mon, 07 Oct 2024 22:15:00 +0000
Head commit of repository gentoo: a183059ef321f5754a386cb8685647dcf19b6e8f
Timestamp of repository beatussum-overlay: Wed, 25 Sep 2024 11:19:18 +0000
Head commit of repository beatussum-overlay: 0cb1e3756c78952ed3fb68a66ebb6801532a41b7

Timestamp of repository gentoo-zh: Mon, 07 Oct 2024 15:48:36 +0000
Head commit of repository gentoo-zh: 5418db028b3691415ea6cdbb24eb414e06afc47d

Timestamp of repository guru: Mon, 07 Oct 2024 17:48:14 +0000
Head commit of repository guru: 20a4516dfd6ccccd2b80ad2b18badbd3ff2aca21

Timestamp of repository kde: Mon, 07 Oct 2024 19:35:10 +0000
Head commit of repository kde: f10feb92906aaf5ba995617f0f3124ff6dcc06f9

Timestamp of repository pf4public: Mon, 07 Oct 2024 15:33:20 +0000
Head commit of repository pf4public: ca7cb178c8c86a4bbd0e0e03e62c92ff383f5bf5

Timestamp of repository snapd: Sun, 08 Sep 2024 18:36:57 +0000
Head commit of repository snapd: 5373607d56d27b5f25bb289c55cf102bd076a55e

Timestamp of repository src_prepare-overlay: Sat, 05 Oct 2024 07:48:32 +0000
Head commit of repository src_prepare-overlay: c82ed94d997cf0826d6ba613b5305b670094cfe9

Head commit of repository genpi-tools: ddf9cf8722a14e1a5b8b411abf51d6efb085809a

sh bash 5.2_p37
ld GNU ld (Gentoo 2.42 p3) 2.42.0
ccache version 4.10.1 [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.10_p1::gentoo, 3.12.6_p4::gentoo
dev-lang/rust-bin:         1.80.1::gentoo
dev-util/ccache:           4.10.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            18.1.8-r1::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync11.us.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

beatussum-overlay
    location: /var/db/repos/beatussum-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/beatussum-overlay.git
    masters: gentoo
    volatile: False

gentoo-zh
    location: /var/db/repos/gentoo-zh
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo-zh.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo
    volatile: False

pf4public
    location: /var/db/repos/pf4public
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pf4public.git
    masters: gentoo
    volatile: False

snapd
    location: /var/db/repos/snapd
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/snapd.git
    masters: gentoo
    volatile: False

src_prepare-overlay
    location: /var/db/repos/src_prepare-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/src_prepare-overlay.git
    masters: gentoo
    volatile: False

tusooa-overlay
    location: /var/db/repos/tusooa-overlay
    masters: gentoo
    volatile: True

genpi-tools
    location: /var/db/repos/genpi-tools
    sync-type: git
    sync-uri: https://github.com/GenPi64/genpi-tools.git
    masters: gentoo
    priority: 50
    volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/portage/package.accept_keywords /etc/portage/package.env /etc/portage/package.license /etc/portage/package.mask /etc/portage/package.unmask /etc/portage/package.use /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write y --autounmask y --jobs 3 --load-average 10"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="https://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="zh_CN zh en_CA en"
MAKEOPTS="-j7 -l7"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/zsh"
USE="X a52 aac accessibility acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus declarative dri dts dvd dvdr elogind emacs encode exif flac gdbm gif git gpm gtk gui iconv icu ipv6 jpeg kde kf6compat kwallet lcms libnotify libtirpc lvm mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 readline screencast sdl seccomp semantic-desktop sound spell ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vaapi vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv xvid zlib zsh zsh-completion" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 avx512bw avx512cd avx512dq avx512f avx512vbmi avx512vl f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="zh-CN zh en-CA en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 3 tusooa 2024-10-09 21:14:45 UTC
Also, I have a patch that works for me.

diff --git a/cpp/src/phonenumbers/phonenumberutil.cc b/cpp/src/phonenumbers/phonenumberutil.cc
index d755806..d094f10 100644
--- a/cpp/src/phonenumbers/phonenumberutil.cc
+++ b/cpp/src/phonenumbers/phonenumberutil.cc
@@ -2215,7 +2215,7 @@ PhoneNumberUtil::ErrorType PhoneNumberUtil::BuildNationalNumberForParsing(
       // Additional parameters might follow the phone context. If so, we will
       // remove them here because the parameters after phone context are not
       // important for parsing the phone number.
-      StrAppend(national_number, phone_context.value());
+      StrAppend(national_number, StringHolder(phone_context.value()));
     }
 
     // Now append everything between the "tel:" prefix and the phone-context.
@@ -2228,9 +2228,9 @@ PhoneNumberUtil::ErrorType PhoneNumberUtil::BuildNationalNumberForParsing(
         static_cast<int>(index_of_rfc_prefix + strlen(kRfc3966Prefix)) : 0;
     StrAppend(
         national_number,
-        number_to_parse.substr(
+        StringHolder(number_to_parse.substr(
             index_of_national_number,
-            index_of_phone_context - index_of_national_number));
+            index_of_phone_context - index_of_national_number)));
   } else {
     // Extract a possible number from the string passed in (this strips leading
     // characters that could not be the start of a phone number.)