Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953774 - dev-util/android-tools-34.0.5: build failed using protobuf 30.2
Summary: dev-util/android-tools-34.0.5: build failed using protobuf 30.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-13 08:50 UTC by Leo Douglas
Modified: 2025-05-04 18:18 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,204.28 KB, text/x-log)
2025-04-13 08:50 UTC, Leo Douglas
Details
Fix-incompatibility-with-protobuf-v30_gentoo.patch (0003-extras-libjsonpb-Fix-incompatibility-with-protobuf-v.patch,1.46 KB, patch)
2025-05-04 08:38 UTC, jospezial
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Douglas 2025-04-13 08:50:08 UTC
Created attachment 924621 [details]
build.log

FAILED: vendor/CMakeFiles/libjsonpbparse.dir/extras/libjsonpb/parse/jsonpb.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5_build/vendor -I/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/extras/libjsonpb/parse/include -I/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/libbase/include -I/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/core/include -I/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/fmtlib/include -I/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/logging/liblog/include -I/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/core/libcutils/include  -march=native -O2 -pipe -ftrivial-auto-var-init=zero -std=gnu++20 -Wno-attributes -MD -MT vendor/CMakeFiles/libjsonpbparse.dir/extras/libjsonpb/parse/jsonpb.cpp.o -MF vendor/CMakeFiles/libjsonpbparse.dir/extras/libjsonpb/parse/jsonpb.cpp.o.d -o vendor/CMakeFiles/libjsonpbparse.dir/extras/libjsonpb/parse/jsonpb.cpp.o -c /var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/extras/libjsonpb/parse/jsonpb.cpp
/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/extras/libjsonpb/parse/jsonpb.cpp: In function ‘std::string android::jsonpb::GetTypeUrl(const google::protobuf::Message&)’:
/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/extras/libjsonpb/parse/jsonpb.cpp:36:44: error: no match for ‘operator+’ (operand types are ‘std::__cxx11::basic_string<char>’ and ‘google::protobuf::internal::DescriptorStringView’ {aka ‘std::basic_string_view<char>’})
   36 |   return std::string(kTypeUrlPrefix) + "/" + message.GetDescriptor()->full_name();
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                      |                                         |
      |                                      std::__cxx11::basic_string<char>          google::protobuf::internal::DescriptorStringView {aka std::basic_string_view<char>}
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/string:48,
                 from /var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/extras/libjsonpb/parse/include/jsonpb/jsonpb.h:19,
                 from /var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/extras/libjsonpb/parse/jsonpb.cpp:17:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_iterator.h:627:5: note: candidate: ‘template<class _Iterator> constexpr std::reverse_iterator<_IteratorL> std::operator+(typename reverse_iterator<_IteratorL>::difference_type, const reverse_iterator<_IteratorL>&)’
  627 |     operator+(typename reverse_iterator<_Iterator>::difference_type __n,
      |     ^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_iterator.h:627:5: note:   template argument deduction/substitution failed:
/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/extras/libjsonpb/parse/jsonpb.cpp:36:81: note:   ‘google::protobuf::internal::DescriptorStringView’ {aka ‘std::basic_string_view<char>’} is not derived from ‘const std::reverse_iterator<_IteratorL>’
   36 |   return std::string(kTypeUrlPrefix) + "/" + message.GetDescriptor()->full_name();
      |                                                                                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_iterator.h:1798:5: note: candidate: ‘template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&) requires requires{{std::operator+::__x->base() + std::operator+::__n} -> decltype(auto) [requires std::same_as<<placeholder>, _Iterator>];}’
 1798 |     operator+(typename move_iterator<_Iterator>::difference_type __n,
      |     ^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_iterator.h:1798:5: note:   template argument deduction/substitution failed:
/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/extras/libjsonpb/parse/jsonpb.cpp:36:81: note:   ‘google::protobuf::internal::DescriptorStringView’ {aka ‘std::basic_string_view<char>’} is not derived from ‘const std::move_iterator<_IteratorL>’
   36 |   return std::string(kTypeUrlPrefix) + "/" + message.GetDescriptor()->full_name();
      |                                                                                 ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/string:54:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/basic_string.h:3598:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)’
 3598 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/basic_string.h:3598:5: note:   template argument deduction/substitution failed:
/var/tmp/portage/dev-util/android-tools-34.0.5/work/android-tools-34.0.5/vendor/extras/libjsonpb/parse/jsonpb.cpp:36:81: note:   ‘google::protobuf::internal::DescriptorStringView’ {aka ‘std::basic_string_view<char>’} is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’
   36 |   return std::string(kTypeUrlPrefix) + "/" + message.GetDescriptor()->full_name();
      |                                                                                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/basic_string.h:3616:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)’
 3616 |     operator+(const _CharT* __lhs,
      |     ^~~~~~~~
Comment 2 Leo Douglas 2025-04-14 02:30:56 UTC
(In reply to jospezial from comment #1)
> https://github.com/nmeum/android-tools/pull/171
> 
> protobuf was only restricted for android-tools-35
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=6efb3e4185c86c8850052bd5a8bce0af5033483f

Thanks for pointing out this commit, but the constraints added here don't seem to work.

❯ sudo emerge -a1v android-tools
Password: 

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 5.18 s (backtrack: 3/20).

[ebuild  N     ] acct-group/android-0-r2::gentoo  0 KiB
[ebuild  N     ] dev-util/android-udev-rules-20250314::gentoo  25 KiB
[ebuild  N     ] dev-util/android-tools-34.0.5::gentoo  USE="udev -python" PYTHON_TARGETS="python3_12 -python3_10 -python3_11" 18,939 KiB

Total: 3 packages (3 new), Size of downloads: 18,963 KiB

!!! The following update(s) have been skipped due to unsatisfied dependencies
!!! triggered by backtracking:

dev-util/android-tools:0

Would you like to merge these packages? [Yes/No]
Comment 3 Leo Douglas 2025-04-14 02:32:40 UTC
❯ eix dev-libs/protobuf -I
[I] dev-libs/protobuf
     Available versions:  21.9(0/32)^t 21.12(0/3.21.12.0)^t 22.5-r1(0/22.5.0)^t (~)22.5-r2(0/22.5.0)^t 23.3-r4(0/23.3.0)^t (~)23.4(0/23.4.0)^t (~)24.4(0/24.4.0)^t 25.3(0/25.3.0)^t (~)25.4(0/25.4.0)^t (~)25.5(0/25.5.0)^t (~)25.6(0/25.6.0)^t (~)26.1-r2(0/26.1.0)^t 27.2(0/27.2.0)^t (~)27.4(0/27.4.0)^t (~)27.5(0/27.5.0)^t 28.0(0/28.0.0)^t (~)28.3-r1(0/28.3.0)^t (~)29.2(0/29.2.0)^t (~)29.4(0/29.4.0)^t (~)30.2(0/30.2.0)^t **9999(0/9999)*l^t {conformance debug emacs examples +libprotoc libupb +protobuf +protoc static-libs test zlib ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  30.2(0/30.2.0)^t(10:18:19 AM 04/14/2025)(libprotoc protobuf protoc zlib -conformance -debug -emacs -examples -libupb -test ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
     Homepage:            https://protobuf.dev/
     Description:         Google's Protocol Buffers - Extensible mechanism for serializing structured data
Comment 4 Larry the Git Cow gentoo-dev 2025-04-14 22:37:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84547c195bc406444bb0e4b93aca3e24298b9168

commit 84547c195bc406444bb0e4b93aca3e24298b9168
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2025-04-14 22:36:00 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2025-04-14 22:36:45 +0000

    dev-util/android-tools: Pin to older protobuf
    
    Closes: https://bugs.gentoo.org/953774
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 dev-util/android-tools/android-tools-34.0.5.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 5 Leo Douglas 2025-04-15 01:51:26 UTC
❯ sudo emerge -a1v android-tools

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 5.61 s (backtrack: 4/20).

[ebuild  N     ] acct-group/android-0-r2::gentoo  0 KiB
[ebuild  N     ] dev-util/android-udev-rules-20250314::gentoo  25 KiB
[ebuild  N     ] dev-util/android-tools-33.0.3-r1::gentoo  USE="udev -python" PYTHON_TARGETS="-python3_10 -python3_11" 24,711 KiB

Total: 3 packages (3 new), Size of downloads: 24,736 KiB

!!! The following update(s) have been skipped due to unsatisfied dependencies
!!! triggered by backtracking:

dev-util/android-tools:0

Would you like to merge these packages? [Yes/No]
Comment 6 Larry the Git Cow gentoo-dev 2025-04-15 16:45:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f30ce64e0adc3eeba685309fbc06cb01768c585

commit 3f30ce64e0adc3eeba685309fbc06cb01768c585
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2025-04-15 16:44:22 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2025-04-15 16:45:46 +0000

    dev-util/android-tools: Pin protobuf to supported version
    
    Closes: https://bugs.gentoo.org/953774
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 dev-util/android-tools/android-tools-33.0.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 jospezial 2025-05-04 08:38:36 UTC
Created attachment 927580 [details, diff]
Fix-incompatibility-with-protobuf-v30_gentoo.patch

I was able to build dev-util/android-tools-35.0.2
against dev-libs/protobuf-30.2
with patch taken and path adjusted from

https://github.com/nmeum/android-tools/blob/master/patches/extras/0003-extras-libjsonpb-Fix-incompatibility-with-protobuf-v.patch

Please add it at least for that latest version.
Comment 8 Larry the Git Cow gentoo-dev 2025-05-04 18:18:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d1ae36aca27e8b87868b92f3e2b1ffa61e4a24b

commit 6d1ae36aca27e8b87868b92f3e2b1ffa61e4a24b
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2025-05-04 18:16:13 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2025-05-04 18:18:10 +0000

    dev-util/android-tools: Add patch for latest protobuf
    
    Bug: https://bugs.gentoo.org/953774
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 dev-util/android-tools/android-tools-35.0.2.ebuild |  3 +-
 .../files/android-tools-35.0.2-protobuf.patch      | 36 ++++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletion(-)