[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add msgpack

From: Lukas Gradl
Subject: Re: [PATCH] Add msgpack
Date: Tue, 21 Jun 2016 08:55:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Leo Famulari <address@hidden> writes:

> On Sat, Jun 18, 2016 at 10:44:16PM -0500, Lukas Gradl wrote:
>> Lukas Gradl <address@hidden> writes:
>> > So the flags -I, -L, -l for zlib are all there for both dynamic and
>> > static linking.  But still no store reference.
>> I think the reason why there is no reference is that msgpack uses
>> zbuffer only for tests.  Before compilation, the file only references
>> the name "zlib" and does not mention the hash in the path of zlib in the
>> store.  During compilation (during "check"), this mere name "zlib" gets
>> somehow resolved to the path of zlib in the store.  The binary file
>> resulting from compiling zbuffer should therefore contain a reference to
>> zlib, which should be detectable by guix gc --references.  I think
>> however, that this binary file does not get installed as it is only used
>> for tests.  All the files that do get installed in the output path of
>> msgpack in the store do not contain the hash part of the store-path of
>> zlib.  They only refer to zlib by name.  IIUC this can not be detected
>> by guix gc --references since it only searches for the hash part of
>> the store-path of zlib.
>> This is what I grasp from looking at libstore/ and
>> libstore/  I am not sure about this though.
> That's my understanding as well.
> Thanks for trying all the things you described in your previous email.
> Since we are still stuck on this, I think we should continue with Ring
> and see if this becomes a problem later on. If so, let's contact the
> msgpack maintainers and ask for advice.

OK, sounds good.

> We should add a caveat in a comment in msgpack's package definition, for
> future readers.

I added a comment in the attached patch.

> I'm curious — how close are you to a Ring package definition?

Yes, packaging Ring is taking longer than I expected (on my side that
is).  I will send a detailed update within the next two hours.

Thank you for all your work on this.  I would have never even noticed
that issue!  Thank you!


>From ae4a2a66b39059463eb16b8094e2d598249bf9c6 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <address@hidden>
Date: Tue, 21 Jun 2016 08:46:15 -0500
Subject: [PATCH] gnu: Add msgpack.

* gnu/packages/serialization.scm (msgpack): New variable.
 gnu/packages/serialization.scm | 53 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 8dfd21d..6ab0d59 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Ricardo Wurmus <address@hidden>
+;;; Copyright © 2016 Lukas Gradl <address@hidden>
 ;;; This file is part of GNU Guix.
@@ -21,8 +22,13 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages documentation))
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages pkg-config))
 (define-public cereal
@@ -72,3 +78,48 @@
 arbitrary data types and reversibly turns them into different representations,
 such as compact binary encodings, XML, or JSON.")
     (license license:bsd-3)))
+(define-public msgpack
+  (package
+    (name "msgpack")
+    (version "1.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "";
+         "cpp-" version "/msgpack-" version ".tar.gz"))
+       (snippet
+        '(let ((p (open-file "" "a")))
+           (begin
+             (display
+              (string-append "Requires: " "zlib" "\n") p)
+             (close-output-port p))))
+       (sha256
+        (base32
+         "0bpjfh9vz0n2k93mph3x15clmigkgs223xfn8h12ymrh5gsi5ica"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("googletest" ,googletest)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("zlib" ,zlib))) ;; Msgpack installs two headers (zbuffer.h,
+    ;; zbuffer.hpp) which #include <zlib.h>.  However, 'guix gc --references'
+    ;; does not detect a store reference to zlib since these headers are not
+    ;; compiled. 
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autoconf
+           (lambda _
+             (system* "autoreconf" "-vfi"))))))
+    (home-page "";)
+    (synopsis "Binary serialization library")
+    (description "Msgpack is a library for C/C++ that implements binary
+    (license license:boost1.0)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]