public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mcrouter] epel10.3: Stop the vendored glog being built as a shared library
@ 2026-10-08 13:27 Michel Lind
  0 siblings, 0 replies; only message in thread
From: Michel Lind @ 2026-10-08 13:27 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/mcrouter
            Branch : epel10.3
            Commit : cfd02574ab632c61cb995f75f63444083181d6ee
            Author : Michel Lind <salimma@fedoraproject.org>
            Date   : 2026-10-08T13:16:01+01:00
            Stats  : +55/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/mcrouter/c/cfd02574ab632c61cb995f75f63444083181d6ee?branch=epel10.3

            Log:
            Stop the vendored glog being built as a shared library

- Carry the getdeps manifest fix: glog set BUILD_SHARED_LIBS=ON
  unconditionally, so a static build still linked a shared libglog

The package ships executables with the whole stack linked statically and no
libraries, yet came out requiring libglog.so.1. Fedora never noticed because
it takes glog from the system, where that resolves to libglog.so.2. On EPEL
10 glog is vendored, nothing ships the .so, and its own glog is 0.3.5 with
soname 0, so the package was uninstallable there (found by ebranch
check-update). Submitted internally from michel-slm/CacheLib 6ad39916.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Michel Lind <salimma@fedoraproject.org>

---
diff --git a/0011-getdeps-build-glog-shared-only-on-request.patch b/0011-getdeps-build-glog-shared-only-on-request.patch
new file mode 100644
index 0000000..bc510b6
--- /dev/null
+++ b/0011-getdeps-build-glog-shared-only-on-request.patch
@@ -0,0 +1,49 @@
+From 6ad39916d25739ad684750550a37572a8b967b88 Mon Sep 17 00:00:00 2001
+From: Michel Lind <salimma@fedoraproject.org>
+Date: Thu, 8 Oct 2026 13:12:23 +0100
+Subject: [PATCH] getdeps: build glog shared only when the consumer asks for it
+
+glog's manifest set BUILD_SHARED_LIBS=ON unconditionally, while folly and
+fbthrift set it only under feature_shared_libs=on. A static build therefore
+still linked a shared libglog, and the manifest's own patchfile comment
+already assumes the opposite ("default-visibility symbols in a static
+archive are harmless for consumers that don't need the shared_libs
+feature").
+
+It shows up downstream: the Fedora and EPEL packages of cachelib and
+mcrouter ship executables with the whole stack linked statically and no
+libraries at all, yet came out requiring libglog.so.1, which nothing
+installs. On EPEL 10 that is not even satisfiable, since its glog is 0.3.5
+and provides libglog.so.0.
+
+Move the define under feature_shared_libs=on, as the other two do, so
+--shared-lib still gets a shared glog and everyone else gets a static one.
+
+Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
+Signed-off-by: Michel Lind <salimma@fedoraproject.org>
+---
+ build/fbcode_builder/manifests/glog | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/build/fbcode_builder/manifests/glog b/build/fbcode_builder/manifests/glog
+index 29f23d77..02f98aaa 100644
+--- a/build/fbcode_builder/manifests/glog
++++ b/build/fbcode_builder/manifests/glog
+@@ -24,10 +24,16 @@ patchfile = glog_default_visibility.patch
+ gflags
+ 
+ [cmake.defines]
+-BUILD_SHARED_LIBS=ON
+ BUILD_TESTING=NO
+ WITH_PKGCONFIG=ON
+ 
++# Shared only when the consumer asks for it, as folly and fbthrift already
++# do. Forcing it on meant a static build still linked a libglog.so that
++# nothing installs: the Fedora/EPEL packages of cachelib and mcrouter, which
++# ship executables and no libraries, came out requiring libglog.so.1.
++[cmake.defines.feature_shared_libs=on]
++BUILD_SHARED_LIBS=ON
++
+ [cmake.defines.os=freebsd]
+ HAVE_TR1_UNORDERED_MAP=OFF
+ HAVE_TR1_UNORDERED_SET=OFF

diff --git a/mcrouter.spec b/mcrouter.spec
index 8aa9017..dabb54e 100644
--- a/mcrouter.spec
+++ b/mcrouter.spec
@@ -145,6 +145,12 @@ Patch:          0005-Build-against-current-folly-and-Boost-1.90.patch
 # 21baa410 (applied by vendor.sh before vendoring, so the vendored set
 # matches what each distro builds)
 Patch:          0010-getdeps-map-the-EL-10-system-packages.patch
+# glog's manifest forced BUILD_SHARED_LIBS=ON, so the vendored glog EL builds
+# use came out shared and the executables linked it: the rpm then required
+# libglog.so.1, which nothing ships (EPEL 10's glog is 0.3.5, soname 0).
+# folly and fbthrift only set it under feature_shared_libs; submitted
+# internally from michel-slm/CacheLib 6ad39916
+Patch:          0011-getdeps-build-glog-shared-only-on-request.patch
 
 # ppc64le was dropped in 0.41.0.20250203 over the folly F14 fallback bug
 # (rhbz#2344416); Patch2 fixes the current incarnation of it, and cachelib

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-08 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 13:27 [rpms/mcrouter] epel10.3: Stop the vendored glog being built as a shared library Michel Lind

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox