From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukas Gradl Subject: Re: [PATCH] Add msgpack Date: Tue, 21 Jun 2016 08:55:45 -0500 Message-ID: <87vb128x3y.fsf@openmailbox.org> References: <87wpmbuv6m.fsf@openmailbox.org> <20160606140737.GA26555@jasmine> <20160611030655.GA24837@jasmine> <87lh2b7009.fsf@openmailbox.org> <20160612001750.GA9854@jasmine> <87eg836nm3.fsf@openmailbox.org> <20160613165852.GA31846@jasmine> <20160613175910.GA6456@jasmine> <87fusbyhk7.fsf@openmailbox.org> <8737o9onan.fsf@openmailbox.org> <20160620170949.GA22393@jasmine> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFM9o-0001Xh-1b for guix-devel@gnu.org; Tue, 21 Jun 2016 09:56:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFM9i-0002O3-LC for guix-devel@gnu.org; Tue, 21 Jun 2016 09:55:59 -0400 Received: from mail.openmailbox.org ([62.4.1.34]:34899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFM9i-0002Nc-7K for guix-devel@gnu.org; Tue, 21 Jun 2016 09:55:54 -0400 In-Reply-To: <20160620170949.GA22393@jasmine> (Leo Famulari's message of "Mon, 20 Jun 2016 13:09:49 -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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Leo Famulari writes: > On Sat, Jun 18, 2016 at 10:44:16PM -0500, Lukas Gradl wrote: >> Lukas Gradl writes: >>=20 >> > So the flags -I, -L, -l for zlib are all there for both dynamic and >> > static linking. But still no store reference. >>=20 >> 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. >>=20 >> This is what I grasp from looking at libstore/references.cc and >> libstore/store-api.cc. 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 =E2=80=94 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! 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 ae4a2a66b39059463eb16b8094e2d598249bf9c6 Mon Sep 17 00:00:00 2001 From: Lukas Gradl 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 =C2=A9 2015 Ricardo Wurmus +;;; Copyright =C2=A9 2016 Lukas Gradl ;;; ;;; 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)) =20 (define-public cereal (package @@ -72,3 +78,48 @@ 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")) + (snippet + '(let ((p (open-file "msgpack.pc.in" "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 . However, 'guix gc --referenc= es' + ;; does not detect a store reference to zlib since these headers are n= ot + ;; compiled.=20 + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'autoconf + (lambda _ + (system* "autoreconf" "-vfi")))))) + (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 --=-=-=--