[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: Sat, 11 Jun 2016 18:56:38 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)


I am sorry for the long silence, this week was busy and I did not find a
lot of time to look into this.  My apologies for that!

Leo Famulari <address@hidden> writes:

> On Mon, Jun 06, 2016 at 10:07:37AM -0400, Leo Famulari wrote:
>> On Mon, May 30, 2016 at 03:50:41PM -0500, Lukas Gradl wrote:
>> > * gnu/packages/serialization.scm (msgpack): New variable.
>> > +    (inputs
>> > +     `(("zlib" ,zlib)))
>> I noticed that the output does not refer to zlib:
>> $ guix gc --references $(./pre-inst-env guix build msgpack)
>> /gnu/store/8m00x5x8ykmar27s9248cmhnkdb2n54a-glibc-2.22
>> /gnu/store/jh52sklgbvq5f0z637wr99a64y25cx8r-msgpack-1.4.1
>> /gnu/store/v39bh3ln3ncnzhyw0kd12d46kww9747v-gcc-4.9.3-lib

Indeed.  I was not aware of this '--references' before.

>> However, the compilation fails without it.

Specifically, the phase that fails is 'check'.  The phase 'build' passes.

>> We need to make sure that msgpack can find zlib at run time. Lukas, can
>> you check if there is a build-time configuration option to provide the
>> path to zlib?
> This is from the top of the msgpack source tree:
> $ grep -rI zlib
> include/msgpack/zbuffer.h:#include <zlib.h>
> include/msgpack/zbuffer.hpp:#include <zlib.h>
> Should we do string substitution to provide the abolute path to the zlib
> headers?

This is probably not necessary, since it can find zlib (at compile time)
if zlib is provided as an input, i.e. all phases pass in this case.  I
think the reason for the missing reference is another:

I did:

$ grep -ri "Zlib" .
./include/msgpack/zbuffer.hpp:#include <zlib.h>
./include/msgpack/zbuffer.h:#include <zlib.h>
./CMakeLists.txt:FIND_PACKAGE (ZLIB)
./test/CMakeLists.txt:    ${ZLIB_INCLUDE_DIRS}
./test/CMakeLists.txt:        ${ZLIB_LIBRARIES}

Cmake is also supported as build system.  I looked into ./CMakeLists.txt
in the top of the source tree and this is the passage that refers to

    OPTION (MSGPACK_BUILD_TESTS "Build msgpack tests." ON)

It seems that zlib is only required for tests.  In README and
zlib is never  mentioned among the dependencies, which also supports
that it is only needed for tests.  I was not aware of that before (Shame
on me).

I moved zlib from inputs to native-inputs.  An updated patch is

Sorry for the confusion and thank you very much for your work on this!


>From ed3dae4a8f34599c0dc5cf47c26df01adda5a209 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <address@hidden>
Date: Sat, 11 Jun 2016 18:46:13 -0500
Subject: [PATCH] gnu: Add msgpack.

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

diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 8dfd21d..9bd5d60 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,7 +22,11 @@
   #: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 autotools)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation))
 (define-public cereal
@@ -72,3 +77,28 @@
 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"))
+       (sha256
+        (base32
+         "0bpjfh9vz0n2k93mph3x15clmigkgs223xfn8h12ymrh5gsi5ica"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("googletest" ,googletest)
+       ("zlib" ,zlib)))
+    (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]