public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/, dev-libs/protobuf/files/
Date: Fri, 14 Jun 2024 08:18:50 +0000 (UTC)	[thread overview]
Message-ID: <1718353098.410197e34e6a385937b0d00898916d6dd11d0e73.sam@gentoo> (raw)

commit:     410197e34e6a385937b0d00898916d6dd11d0e73
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 08:18:18 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 08:18:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=410197e3

dev-libs/protobuf: backport template instantiation fix

Closes: https://bugs.gentoo.org/917046
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...buf-23.3-messages_lite-template-instances.patch | 66 ++++++++++++++++++++++
 ...obuf-23.3-r3.ebuild => protobuf-23.3-r4.ebuild} |  1 +
 2 files changed, 67 insertions(+)

diff --git a/dev-libs/protobuf/files/protobuf-23.3-messages_lite-template-instances.patch b/dev-libs/protobuf/files/protobuf-23.3-messages_lite-template-instances.patch
new file mode 100644
index 000000000000..3869ad95993c
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-23.3-messages_lite-template-instances.patch
@@ -0,0 +1,66 @@
+https://bugs.gentoo.org/917046
+https://github.com/protocolbuffers/protobuf/commit/e6f8b9d1026996f6463d4f014d7760256b757227
+
+From e6f8b9d1026996f6463d4f014d7760256b757227 Mon Sep 17 00:00:00 2001
+From: Protobuf Team Bot <protobuf-github-bot@google.com>
+Date: Wed, 8 Nov 2023 09:20:10 -0800
+Subject: [PATCH] message_lite.h: Use PROTOBUF_EXPORT_TEMPLATE_DECLARE with
+ extern template
+
+Export extern templates in message_lite.h to avoid missing symbols when
+linking protobuf-lite.so.
+
+PiperOrigin-RevId: 580556084
+--- a/src/google/protobuf/message_lite.h
++++ b/src/google/protobuf/message_lite.h
+@@ -616,22 +616,22 @@ namespace internal {
+ template <bool alias>
+ bool MergeFromImpl(absl::string_view input, MessageLite* msg,
+                    MessageLite::ParseFlags parse_flags);
+-extern template bool MergeFromImpl<false>(absl::string_view input,
+-                                          MessageLite* msg,
+-                                          MessageLite::ParseFlags parse_flags);
+-extern template bool MergeFromImpl<true>(absl::string_view input,
+-                                         MessageLite* msg,
+-                                         MessageLite::ParseFlags parse_flags);
++extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<false>(
++    absl::string_view input, MessageLite* msg,
++    MessageLite::ParseFlags parse_flags);
++extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<true>(
++    absl::string_view input, MessageLite* msg,
++    MessageLite::ParseFlags parse_flags);
+ 
+ template <bool alias>
+ bool MergeFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg,
+                    MessageLite::ParseFlags parse_flags);
+-extern template bool MergeFromImpl<false>(io::ZeroCopyInputStream* input,
+-                                          MessageLite* msg,
+-                                          MessageLite::ParseFlags parse_flags);
+-extern template bool MergeFromImpl<true>(io::ZeroCopyInputStream* input,
+-                                         MessageLite* msg,
+-                                         MessageLite::ParseFlags parse_flags);
++extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<false>(
++    io::ZeroCopyInputStream* input, MessageLite* msg,
++    MessageLite::ParseFlags parse_flags);
++extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<true>(
++    io::ZeroCopyInputStream* input, MessageLite* msg,
++    MessageLite::ParseFlags parse_flags);
+ 
+ struct BoundedZCIS {
+   io::ZeroCopyInputStream* zcis;
+@@ -641,10 +641,10 @@ struct BoundedZCIS {
+ template <bool alias>
+ bool MergeFromImpl(BoundedZCIS input, MessageLite* msg,
+                    MessageLite::ParseFlags parse_flags);
+-extern template bool MergeFromImpl<false>(BoundedZCIS input, MessageLite* msg,
+-                                          MessageLite::ParseFlags parse_flags);
+-extern template bool MergeFromImpl<true>(BoundedZCIS input, MessageLite* msg,
+-                                         MessageLite::ParseFlags parse_flags);
++extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<false>(
++    BoundedZCIS input, MessageLite* msg, MessageLite::ParseFlags parse_flags);
++extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<true>(
++    BoundedZCIS input, MessageLite* msg, MessageLite::ParseFlags parse_flags);
+ 
+ template <typename T>
+ struct SourceWrapper;
+

diff --git a/dev-libs/protobuf/protobuf-23.3-r3.ebuild b/dev-libs/protobuf/protobuf-23.3-r4.ebuild
similarity index 97%
rename from dev-libs/protobuf/protobuf-23.3-r3.ebuild
rename to dev-libs/protobuf/protobuf-23.3-r4.ebuild
index 6ef5f8f482f1..f44655dc1c74 100644
--- a/dev-libs/protobuf/protobuf-23.3-r3.ebuild
+++ b/dev-libs/protobuf/protobuf-23.3-r4.ebuild
@@ -40,6 +40,7 @@ RDEPEND="
 PATCHES=(
 	"${FILESDIR}/${PN}-23.3-disable-32-bit-tests.patch"
 	"${FILESDIR}/${PN}-23.3-static_assert-failure.patch"
+	"${FILESDIR}/${PN}-23.3-messages_lite-template-instances.patch"
 )
 
 DOCS=( CONTRIBUTORS.txt README.md )


             reply	other threads:[~2024-06-14  8:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14  8:18 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-05  2:12 [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/, dev-libs/protobuf/files/ Sam James
2024-05-27 16:04 Joonas Niilola
2024-02-03 19:35 Jason Zaman
2023-06-27 20:14 Andreas Sturmlechner
2021-11-18 22:22 Mike Gilbert
2021-06-06 17:04 Mike Gilbert
2021-06-06 17:04 Mike Gilbert
2020-11-22 19:32 Mike Gilbert
2020-07-04 13:53 Mike Gilbert
2019-12-29 19:34 Mike Gilbert
2019-12-29 19:34 Mike Gilbert
2019-04-19 16:39 Mike Gilbert
2019-04-19 16:39 Mike Gilbert
2018-07-07  2:03 Mike Gilbert
2018-04-26 15:14 Mike Gilbert
2018-02-21 20:34 Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1718353098.410197e34e6a385937b0d00898916d6dd11d0e73.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox