From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 467F07EEEF for ; Tue, 23 Jun 2015 22:41:55 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of edwin+ml-ocaml@etorok.net) identity=pra; client-ip=62.210.252.135; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of edwin+ml-ocaml@etorok.net designates 62.210.252.135 as permitted sender) identity=mailfrom; client-ip=62.210.252.135; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.etorok.net) identity=helo; client-ip=62.210.252.135; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="postmaster@mail.etorok.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DBBQARw4lV/4f80j5bgxBUX6wMk1CFdQECAoFSTAEBAQEBAYELhCIBAQEDAScZOAIBDgsYCRMDDwkDAgECAUUTCAKIIwwJtXKFWpIDAQaLSoJrgiIWhBWMFWmHBoRYhnmBOkKDTpJrJoFJQgIbgVU7MQEBgkYBAQE X-IPAS-Result: A0DBBQARw4lV/4f80j5bgxBUX6wMk1CFdQECAoFSTAEBAQEBAYELhCIBAQEDAScZOAIBDgsYCRMDDwkDAgECAUUTCAKIIwwJtXKFWpIDAQaLSoJrgiIWhBWMFWmHBoRYhnmBOkKDTpJrJoFJQgIbgVU7MQEBgkYBAQE X-IronPort-AV: E=Sophos;i="5.13,667,1427752800"; d="scan'208";a="137551810" Received: from mail.etorok.net ([62.210.252.135]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Jun 2015 22:41:54 +0200 Received: by mail.etorok.net (OpenSMTPD) with ESMTP id 2dbc098d for ; Tue, 23 Jun 2015 20:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=etorok.net; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=ml; bh=pBOxcj26AahajU 0JNrZzCibDf4g=; b=A1Nub9HloC9PandImzQh7Pl1WJ6PcSDW1s9JpZAJNJiHRI LEUbTBTSQZYu2+OAk5zGk5Q1Xu0Oln4lo1W8dIW1sCcuO2ECEX5rzcW1JGzJxQ6w szjIigZP/NzaH/B+TQ6la1h3UXfjvA1Tb8vB9Ahn4jkiPnEcAzSk6kvkafYds= DomainKey-Signature: a=rsa-sha1; c=simple; d=etorok.net; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=ml; b=swh7yYsr XIADPBCHOCFIYRJ4Vz+mZXd4uZbEkctd1WgkN9f431AjqfKwCEGOTq+laMYfLfr8 HkvPHwg7ZRszxLWqe6nIuOFXLsurEW7VCNow1E2rrSrXG3fqWnXLUFEdzSoyMOX4 StF/Vm8QD2kdBNoU+yZSuYa4u/0jDiZcPZk= Received: by mail.etorok.net (OpenSMTPD) with ESMTPSA id f7dd8ad3 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO for ; Tue, 23 Jun 2015 20:41:53 +0000 (UTC) Message-ID: <5589C490.2030804@etorok.net> Date: Tue, 23 Jun 2015 23:41:52 +0300 From: =?windows-1252?Q?T=F6r=F6k_Edwin?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <20150623195254.GA32190@annexia.org> In-Reply-To: <20150623195254.GA32190@annexia.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] inconsistent assumptions over implementation Printf On 06/23/2015 10:52 PM, Richard W.M. Jones wrote: > This seems like a rather basic question, but here goes. > > For a long time in Fedora we've used RPM dependencies to enforce that > the "inconsistent assumptions" error does not occur for end users. > This means encoding the OCaml version + MD5 hash of each interface. > For example: > > $ rpm -q --provides ocaml-runtime > ... > ocaml(Printf) = eb49a17645c5ea2dd298430a3c986186 > ... > ocaml(runtime) = 4.02.2 > > With the move from 4.02.2+rc1 to 4.02.2 final, we've suddenly started > to see: > > Error: Files /usr/lib64/ocaml/gettext/gettextBase.cmxa > and /usr/lib64/ocaml/stdlib.cmxa > make inconsistent assumptions over implementation Printf > > The ocaml(runtime) version string didn't change, so we're relying > solely on the ocaml(Printf) dependency to prevent this. According to > my understanding the above error "cannot" happen, not least because > Printf didn't change its interface between -rc1 and final. The error message refers to the compiled *implementation* (cmx), not the interface. > > ocamlobjinfo from the relevant libraries: > > http://oirase.annexia.org/tmp/stdlib.cmxa.txt > http://oirase.annexia.org/tmp/gettextBase.cmxa.txt > > Can someone explain where my understanding is wrong? The implementation hash for Printf is different in those two cmxa: Implementations imported: 04c9d8650cdb1dfb88a0138d7aa7f627 Printf Implementations imported: 3f8359483c50f1154e7f110de488d53c Printf If you use ocamlobjinfo to track down the changed implementation hashes you end up in camlinternalFormat changing, which changed due to Sys changing, which changed due to the (inlinable) version number changing: -File /home/edwin/.opam/4.02.2+rc1/lib/ocaml/sys.cmx +File /home/edwin/.opam/4.02.2/lib/ocaml/sys.cmx Name: Sys -CRC of implementation: 0f8a319756ebc1cd7f8defc8ada059bb +CRC of implementation: 68274db6c865f50a2652e53becb14c88 Globals defined: Sys Interfaces imported: @@ -21,7 +21,7 @@ 29: const(-18); 30: const(-19); 31: const(-20); 32: const(-21); 33: global(camlSys,33); 34: function camlSys__catch_break_1066 arity 1 (closed) -> _; - 35: const("camlSys__2"="4.02.2+rc1")) + 35: const("camlSys__2"="4.02.2")) Now camlinternalFormat only uses Sys.max_string_length not Sys.ocaml_version, but the hash won't know that ... > > Also - could we *please* make the error message more explanatory. > Printing out the mismatching MD5 hashes would be a good start. > Yeah, and a -r flag on ocamlobjinfo. Best regards, --Edwin