GNU bug report logs -
#77964
spdlog is bundling fmt
Previous Next
To reply to this bug, email your comments to 77964 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#77964
; Package
guix
.
(Mon, 21 Apr 2025 16:00:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dariqq <dariqq <at> posteo.net>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Mon, 21 Apr 2025 16:00:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
Today I tried to rebuild a package in my channel which uses both fmt and
spdlog.
The build failed with a linking error with undefined references for some
spdlog code.
Recently the spdlog symbol got updated to 1.15, when I downgrade to
using spdlog 1.13 the error went away.
After looking around online for similar issues I found that the reason
could be a version mismatch with the fmt package and the fmt bundled
with spdlog.
If I use fmt-11 instead of fmt-9 (the fmt symbol) the issue went away.
I think Guix generally tries to unbundle things if possible and looking
at some build recipes in other distributions (debian, gentoo, fedora)
all of them add the -DSPDLOG_FMT_EXTERNAL=ON flag (usually with an
additional patch to force the unbundled fmt)
Thanks.
Information forwarded
to
sharlatanus <at> gmail.com, bug-guix <at> gnu.org
:
bug#77964
; Package
guix
.
(Wed, 23 Apr 2025 14:44:10 GMT)
Full text and
rfc822 format available.
Message #8 received at 77964 <at> debbugs.gnu.org (full text, mbox):
As reported by Dariqq, the "spdlog" and "fmt" packages should play well
together. This patchset adds a pinned version of spdlog to track the
pinned version of fmt. We also unbundle spdlog's fmt dependency.
Greg Hogan (2):
gnu: spdlog: Pin version
gnu: spdlog: Unbundle dependency.
gnu/packages/logging.scm | 36 +++++++++++++++++++++++++----------
gnu/packages/pretty-print.scm | 2 +-
gnu/packages/xdisorg.scm | 2 +-
3 files changed, 28 insertions(+), 12 deletions(-)
base-commit: 699ce22ed812cf8cfcdd8d0341829f8fac2c864a
--
2.49.0
Information forwarded
to
sharlatanus <at> gmail.com, bug-guix <at> gnu.org
:
bug#77964
; Package
guix
.
(Wed, 23 Apr 2025 14:44:14 GMT)
Full text and
rfc822 format available.
Message #11 received at 77964 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/logging.scm (spdlog): Rename to ...
(spdlog-1.15): ... this.
(spdlog-1.13, spdlog-1.10): Inherit from spdlog-1.15.
(spdlog): Pin to spdlog-1.15.
Change-Id: I7b907cf2bbfa079bec28d4264a1dfc7f58037cd6
---
gnu/packages/logging.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm
index b5431566fe..a764fee5be 100644
--- a/gnu/packages/logging.scm
+++ b/gnu/packages/logging.scm
@@ -236,7 +236,7 @@ (define-public multitail
output in multiple windows in a terminal.")
(license license:gpl2+)))
-(define-public spdlog
+(define-public spdlog-1.15
(package
(name "spdlog")
(version "1.15.1")
@@ -269,7 +269,7 @@ (define-public spdlog
(license (list license:expat license:bsd-2))))
(define-public spdlog-1.13
- (package/inherit spdlog
+ (package/inherit spdlog-1.15
(version "1.13.0")
(source
(origin
@@ -277,13 +277,13 @@ (define-public spdlog-1.13
(uri (git-reference
(url "https://github.com/gabime/spdlog")
(commit (string-append "v" version))))
- (file-name (git-file-name (package-name spdlog) version))
+ (file-name (git-file-name (package-name spdlog-1.15) version))
(sha256
(base32 "0zgdmdgnp2y36jrlk85d4fiyjkjd6anly8pambyc3f3v6sg02zyy"))))))
(define-public spdlog-1.10
(package
- (inherit spdlog)
+ (inherit spdlog-1.15)
(version "1.10.0")
(source
(origin
@@ -295,6 +295,8 @@ (define-public spdlog-1.10
(sha256
(base32 "02xz017ba9fssm1rp1fcfld7h79awbr6fqai9dxaqp02akp3davk"))))))
+(define-public spdlog spdlog-1.15)
+
(define-public rsyslog
(package
(name "rsyslog")
--
2.49.0
Information forwarded
to
sharlatanus <at> gmail.com, bug-guix <at> gnu.org
:
bug#77964
; Package
guix
.
(Wed, 23 Apr 2025 14:44:16 GMT)
Full text and
rfc822 format available.
Message #14 received at 77964 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/logging.scm (spdlog-1.15, spdlog-1.13, spdlog-1.10)
[source]: Remove bundled fmt ...
[propagated-inputs]: ... and add corresponding fmt.
[arguments]<#:configure-flags>: Use system fmt.
[license]: Remove fmt license.
(spdlog): Pin to spdlog-1.13.
* gnu/packages/xdisorg.scm (j4-dmenu-desktop)[inputs]: Replace spdlog
with spdlog-1.15 and remove fmt-11.
Change-Id: I8bea1e6a0cb375eaaeb8fdf0843a62d86d9fc4fd
---
gnu/packages/logging.scm | 28 +++++++++++++++++++++-------
gnu/packages/pretty-print.scm | 2 +-
gnu/packages/xdisorg.scm | 2 +-
3 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm
index a764fee5be..26525e5fc8 100644
--- a/gnu/packages/logging.scm
+++ b/gnu/packages/logging.scm
@@ -52,6 +52,7 @@ (define-module (gnu packages logging)
#:use-module (gnu packages networking)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages pretty-print)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
@@ -248,7 +249,9 @@ (define-public spdlog-1.15
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1drpbn7b6iikypdlsvzpcjwyls0rqzl7sz7f7xjbn3d7ic55a1p1"))))
+ (base32 "1drpbn7b6iikypdlsvzpcjwyls0rqzl7sz7f7xjbn3d7ic55a1p1"))
+ (modules '((guix build utils)))
+ (snippet #~(delete-file-recursively "include/spdlog/fmt/bundled"))))
(build-system cmake-build-system)
;; TODO run benchmark. Currently not possible, as adding
;; (gnu packages benchmark) forms a dependency cycle
@@ -256,17 +259,17 @@ (define-public spdlog-1.15
(list #:configure-flags
#~(list "-DSPDLOG_BUILD_BENCH=OFF"
"-DSPDLOG_BUILD_SHARED=ON"
+ "-DSPDLOG_FMT_EXTERNAL=ON"
#$@(if (%current-target-system)
'()
'("-DSPDLOG_BUILD_TESTS=ON")))))
(native-inputs (list catch2-3))
+ (propagated-inputs (list fmt-11))
(home-page "https://github.com/gabime/spdlog")
(synopsis "Fast C++ logging library")
(description "Spdlog is a very fast header-only/compiled C++ logging
library.")
- ;; spdlog is under Expat license, but the bundled fmt library in
- ;; "include/spdlog/fmt/bundled" is under BSD 2 clause license.
- (license (list license:expat license:bsd-2))))
+ (license license:expat)))
(define-public spdlog-1.13
(package/inherit spdlog-1.15
@@ -279,7 +282,12 @@ (define-public spdlog-1.13
(commit (string-append "v" version))))
(file-name (git-file-name (package-name spdlog-1.15) version))
(sha256
- (base32 "0zgdmdgnp2y36jrlk85d4fiyjkjd6anly8pambyc3f3v6sg02zyy"))))))
+ (base32 "0zgdmdgnp2y36jrlk85d4fiyjkjd6anly8pambyc3f3v6sg02zyy"))
+ (modules '((guix build utils)))
+ (snippet #~(delete-file-recursively "include/spdlog/fmt/bundled"))))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs spdlog-1.15)
+ (replace "fmt" fmt-9)))))
(define-public spdlog-1.10
(package
@@ -293,9 +301,15 @@ (define-public spdlog-1.10
(commit (string-append "v" version))))
(file-name (git-file-name "spdlog" version))
(sha256
- (base32 "02xz017ba9fssm1rp1fcfld7h79awbr6fqai9dxaqp02akp3davk"))))))
+ (base32 "02xz017ba9fssm1rp1fcfld7h79awbr6fqai9dxaqp02akp3davk"))
+ (modules '((guix build utils)))
+ (snippet #~(delete-file-recursively "include/spdlog/fmt/bundled"))))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs spdlog-1.15)
+ (replace "fmt" fmt-8)))))
-(define-public spdlog spdlog-1.15)
+;; Update when changing the pinned version of fmt.
+(define-public spdlog spdlog-1.13)
(define-public rsyslog
(package
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index fb676539b2..cd42582dc9 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -299,7 +299,7 @@ (define-public fmt-6
("clang" ,clang-6)))))
;; Note: Updating fmt causes some 1000s of rebuilds, so let's have a pinned
-;; version.
+;; version. When changing also update the pinned version of spdlog.
(define-public fmt fmt-9)
(define-public source-highlight
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index fee7e02d6e..18f1a19ff9 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -3538,7 +3538,7 @@ (define-public j4-dmenu-desktop
(build-system meson-build-system)
(native-inputs
(list catch2-3 pkg-config))
- (inputs (list spdlog fmt-11))
+ (inputs (list spdlog-1.15))
(arguments
(list
#:configure-flags
--
2.49.0
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.