From owner-freebsd-perl@FreeBSD.ORG Sat Jan 3 14:22:03 2009 Return-Path: Delivered-To: freebsd-perl@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42358106564A for ; Sat, 3 Jan 2009 14:22:03 +0000 (UTC) (envelope-from fernan.aguero@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id E9F878FC14 for ; Sat, 3 Jan 2009 14:22:02 +0000 (UTC) (envelope-from fernan.aguero@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so3991829qwb.7 for ; Sat, 03 Jan 2009 06:22:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=bAy2Fo05hweLdGNtivMDRXmEYvzdzZHPZ37wqUGhulo=; b=Cyjc+00bBZ1mUfT4OkwHIZysd+ob2AaXtbr7sU685z7JjWGUvtON/gG7qzMUKJfuIr JVn/QZn6c730KX/QIPQbbyInudyjMFY+SgvteIRYZB5tXYHOxBD61kuVpwOTDgSNuYo2 Wg8L5RfMVRBoMyLXSUKYrE7V01zCF1+Job4jM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=vPVoDOdFJWyDDTOf37/BDacdldgYjk2TQvBjJpL3YnO3djAOx1oQvawv1gLSIrFEAy BKPH08WtGQcU5V9TAVSav6ksn8TUolTSwteGI46R/T+SC6x0YLVHYVg7IhPsWUJd5SMv YGGlYy4jNX6Uvv5MDOI92ReveaJnUePHPp7G8= Received: by 10.214.148.19 with SMTP id v19mr15562045qad.351.1230992522022; Sat, 03 Jan 2009 06:22:02 -0800 (PST) Received: by 10.214.45.3 with HTTP; Sat, 3 Jan 2009 06:22:01 -0800 (PST) Message-ID: <520894aa0901030622k173d9eu2a2792758abbcfee@mail.gmail.com> Date: Sat, 3 Jan 2009 12:22:01 -0200 From: "Fernan Aguero" To: "Anton Berezin" In-Reply-To: <20090103135718.GC41513@heechee.tobez.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <520894aa0901020758o79bb1233teee539f6d599d10a@mail.gmail.com> <20090102164439.GF40649@heechee.tobez.org> <520894aa0901030433i7a103ba7i4236ae17b83c6eae@mail.gmail.com> <20090103135718.GC41513@heechee.tobez.org> Cc: freebsd-perl@freebsd.org Subject: Re: Storable byteorder incompatibilities in different FreeBSD installations X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 14:22:03 -0000 On Sat, Jan 3, 2009 at 11:57 AM, Anton Berezin wrote: > Fernan, > > On Sat, Jan 03, 2009 at 10:33:22AM -0200, Fernan Aguero wrote: > >> Apart from the byteorder issue, the other issue which I raised in my >> post, was also the incompatibility in 'longsize' between two perl >> instances built from ports, in different boxes. >> >> In this case, the perl built in a FBSD-6.3, i386 box has a longsize of >> 4, whereas the same perl built in FBSD-7.1, amd64 has a longsize of 8. >> In both cases they were compiled with PERL_64BITINT (the default for >> the port), and in both cases the byteorder is the same! >> >> How can I build a perl with a byteorder of 12345678, and a longsize of >> 4, in an amd64 platform? Is that possible at all? > > Not really. Amd64 is a 64-bit platform, meaning sizeof(long) = 8. I am > pretty positive that the same is true for x86-64 Linux. That's more or less > what "12345678" indicates. > > At any rate, this is the application design issue. The practical solution > in your case would be to take an offline copy of the DB, and to go through > every record and convert it into a KNOWN to you binary format. I have not > done the relevant testing, so I do not even know whether nstore() will do > what you want - after all, it only handles the byteorder issues, not integer > size issues. I am doing these tests as we speak, and will convert all my data using nstore/nfreeze. Thanks. > Cheers, > \Anton. -- fernan