From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukas Gradl Subject: Re: [PATCH] Add msgpack Date: Sat, 11 Jun 2016 18:56:38 -0500 Message-ID: <87lh2b7009.fsf@openmailbox.org> References: <87wpmbuv6m.fsf@openmailbox.org> <20160606140737.GA26555@jasmine> <20160611030655.GA24837@jasmine> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBslr-0002yj-Bl for guix-devel@gnu.org; Sat, 11 Jun 2016 19:56:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBsln-0007yq-73 for guix-devel@gnu.org; Sat, 11 Jun 2016 19:56:54 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:54248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBslm-0007xr-QY for guix-devel@gnu.org; Sat, 11 Jun 2016 19:56:51 -0400 In-Reply-To: <20160611030655.GA24837@jasmine> (Leo Famulari's message of "Fri, 10 Jun 2016 23:06:55 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Leo Famulari Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Hi, 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 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 > include/msgpack/zbuffer.hpp:#include > > 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 ./include/msgpack/zbuffer.h:#include ./CMakeLists.txt:FIND_PACKAGE (ZLIB) ./CMakeLists.txt:IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND) ./test/CMakeLists.txt:FIND_PACKAGE (ZLIB REQUIRED) ./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 zlib: FIND_PACKAGE (GTest) FIND_PACKAGE (ZLIB) FIND_PACKAGE (Threads) IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND) OPTION (MSGPACK_BUILD_TESTS "Build msgpack tests." ON) ENDIF () It seems that zlib is only required for tests. In README and README.md 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 attached. Sorry for the confusion and thank you very much for your work on this! Best, Lukas --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-msgpack.patch Content-Transfer-Encoding: quoted-printable >From ed3dae4a8f34599c0dc5cf47c26df01adda5a209 Mon Sep 17 00:00:00 2001 From: Lukas Gradl 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 =C2=A9 2015 Ricardo Wurmus +;;; Copyright =C2=A9 2016 Lukas Gradl ;;; ;;; 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)) =20 (define-public cereal @@ -72,3 +77,28 @@ arbitrary data types and reversibly turns them into different representati= ons, 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 + "https://github.com/msgpack/msgpack-c/releases/download/" + "cpp-" version "/msgpack-" version ".tar.gz")) + (sha256 + (base32 + "0bpjfh9vz0n2k93mph3x15clmigkgs223xfn8h12ymrh5gsi5ica")))) + (build-system gnu-build-system) + (native-inputs + `(("googletest" ,googletest) + ("zlib" ,zlib))) + (home-page "http://www.msgpack.org") + (synopsis "Binary serialization library") + (description "Msgpack is a library for C/C++ that implements binary +serialization.") + (license license:boost1.0))) --=20 2.7.4 --=-=-=--