public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Than Ngo <than@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/chromium] epel9-next: fixed chromium FTBFS on RHEL7, error: undefined symbol: unsigned long cc::PaintOpWriter::SerializedSize<unsigned long>
Date: Fri, 07 Aug 2026 16:05:23 GMT	[thread overview]
Message-ID: <178611872351.1.10574243488067573913.rpms-chromium-d895b6172822@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/chromium
Branch : epel9-next
Commit : d895b6172822e8b31e83c3a8cc578db954f70dbd
Author : Than Ngo <than@redhat.com>
Date   : 2023-08-16T22:52:58+02:00
Stats  : +67/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/chromium/c/d895b6172822e8b31e83c3a8cc578db954f70dbd?branch=epel9-next

Log:
fixed chromium FTBFS on RHEL7, error: undefined symbol: unsigned long cc::PaintOpWriter::SerializedSize<unsigned long>

---
diff --git a/chromium-116-constexpr.patch b/chromium-116-constexpr.patch
new file mode 100644
index 0000000..08b5930
--- /dev/null
+++ b/chromium-116-constexpr.patch
@@ -0,0 +1,65 @@
+diff -up chromium-116.0.5845.96/cc/paint/paint_op_writer.h.me chromium-116.0.5845.96/cc/paint/paint_op_writer.h
+--- chromium-116.0.5845.96/cc/paint/paint_op_writer.h.me	2023-08-16 19:09:48.998173285 +0200
++++ chromium-116.0.5845.96/cc/paint/paint_op_writer.h	2023-08-16 21:13:44.442431527 +0200
+@@ -104,7 +104,16 @@ class CC_PAINT_EXPORT PaintOpWriter {
+ 
+  private:
+   template <typename T>
+-  static constexpr size_t SerializedSizeSimple();
++  static constexpr size_t SerializedSizeSimple() {
++    static_assert(!std::is_pointer_v<T>);
++    return base::bits::AlignUp(sizeof(T), kDefaultAlignment);
++  }
++  // size_t is always serialized as uint64_t to make the serialized result
++  // portable between 32bit and 64bit processes.
++  template <>
++  constexpr size_t SerializedSizeSimple<size_t>() {
++    return base::bits::AlignUp(sizeof(uint64_t), kDefaultAlignment);
++  }
+ 
+  public:
+   // SerializedSize() returns the maximum serialized size of the given type or
+@@ -115,7 +124,10 @@ class CC_PAINT_EXPORT PaintOpWriter {
+   // deserialization, and make it possible to allow dynamic sizing for some
+   // data types (see the specialized/overloaded functions).
+   template <typename T>
+-  static constexpr size_t SerializedSize();
++  static constexpr size_t SerializedSize() {
++    static_assert(std::is_arithmetic_v<T> || std::is_enum_v<T>);
++    return SerializedSizeSimple<T>();
++  }
+   template <typename T>
+   static constexpr size_t SerializedSize(const T& data);
+   static size_t SerializedSize(const PaintImage& image);
+@@ -360,19 +372,6 @@ class CC_PAINT_EXPORT PaintOpWriter {
+   const bool enable_security_constraints_;
+ };
+ 
+-template <typename T>
+-constexpr size_t PaintOpWriter::SerializedSizeSimple() {
+-  static_assert(!std::is_pointer_v<T>);
+-  return base::bits::AlignUp(sizeof(T), kDefaultAlignment);
+-}
+-
+-// size_t is always serialized as two uint32_ts to make the serialized result
+-// portable between 32bit and 64bit processes.
+-template <>
+-constexpr size_t PaintOpWriter::SerializedSizeSimple<size_t>() {
+-  return base::bits::AlignUp(2 * sizeof(uint32_t), kDefaultAlignment);
+-}
+-
+ template <>
+ constexpr size_t PaintOpWriter::SerializedSize<SkGainmapInfo>() {
+   return SerializedSizeSimple<SkColor4f>() +  // fGainmapRatioMin
+@@ -386,11 +385,6 @@ constexpr size_t PaintOpWriter::Serializ
+ }
+ 
+ template <typename T>
+-constexpr size_t PaintOpWriter::SerializedSize() {
+-  static_assert(std::is_arithmetic_v<T> || std::is_enum_v<T>);
+-  return SerializedSizeSimple<T>();
+-}
+-template <typename T>
+ constexpr size_t PaintOpWriter::SerializedSize(const T& data) {
+   return SerializedSizeSimple<T>();
+ }

diff --git a/chromium.spec b/chromium.spec
index a23f423..875cb73 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -324,6 +324,7 @@ Patch107: chromium-99.0.4844.51-el7-extra-operator.patch
 # workaround for clang bug on el7
 Patch109: chromium-114-wireless-el7.patch
 Patch110: chromium-115-buildflag-el7.patch
+Patch111: chromium-116-constexpr.patch
 
 # system ffmpeg
 Patch114: chromium-107-ffmpeg-duration.patch
@@ -947,6 +948,7 @@ udev.
 %patch -P107 -p1 -b .el7-extra-operator-equalequal
 %patch -P109 -p1 -b .wireless
 %patch -P110 -p1 -b .buildflag-el7
+%patch -P111 -p1 -b .constexpr
 %endif
 
 %if 0%{?rhel} == 9

                 reply	other threads:[~2026-08-07 16:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=178611872351.1.10574243488067573913.rpms-chromium-d895b6172822@fedoraproject.org \
    --to=than@redhat.com \
    --cc=git-commits@fedoraproject.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