caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Török Edwin" <edwin+ml-ocaml@etorok.net>
To: "Richard W.M. Jones" <rich@annexia.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] inconsistent assumptions over implementation Printf
Date: Sat, 27 Jun 2015 00:27:46 +0300	[thread overview]
Message-ID: <558DC3D2.4040407@etorok.net> (raw)
In-Reply-To: <20150625075858.GC31462@annexia.org>

On 06/25/2015 10:58 AM, Richard W.M. Jones wrote:
> On Tue, Jun 23, 2015 at 11:41:52PM +0300, Török Edwin wrote:
> [...]
> 
> Thanks - I have filed a bug about generating better dependencies:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1235561

Do any of the advanced linker features in ocamlopt/ocamlc change the way ocamlobjinfo output should be used by packaging tools?
I see that -no-alias-deps adds '--------------------------------' to list of 'implementations imported' sometimes.
AFAICT this is properly ignored by the current rpm scripts, but I'm not familiar with how all the other linker features (packs, module aliases, rectypes, ...) work at the .cmx(a) level.

Perhaps there should be a 'hello-ocaml-dep' package that contains multiple inter-dependent library sub-packages exercising all these features.

For example should -safe-string usage be tracked by the package manager? OCaml itself doesn't complain now when the main application is linked with -safe-string, and
some module was compiled without it and ends up modifying the (immutable) strings, and I'm not sure whether that information exists in the .cmi/.cmx (should it?)

> 
>>> 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.
> 
> What would the -r flag do?

Starting from  a given module recursively print the modules that are part of its interface/implementation hash, perhaps a better name would be --filter-recursive.
Of course you'd need to have both the old and new .cmx(a) around, in your case:
ocamlobjinfo /usr/lib64/ocaml/stdlib.cmxa  --filter-recursive=Printf >hashes1
ocamlobjinfo /path/to/4.02.2+rc1/stdlib.cmxa  --filter-recursive=Printf >hashes2
diff -u hashes1 hashes2

In fact such a tool could be built by parsing the output of ocamlobjinfo too:
ocamlobjinfo /usr/lib64/ocaml/stdlib.cmxa /path/to/4.02.2+rc1/stdlib.cmxa | ocamlobjdiff --module=Printf

Best regards,
--Edwin



      reply	other threads:[~2015-06-26 21:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 19:52 Richard W.M. Jones
2015-06-23 20:41 ` Török Edwin
2015-06-25  7:58   ` Richard W.M. Jones
2015-06-26 21:27     ` Török Edwin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=558DC3D2.4040407@etorok.net \
    --to=edwin+ml-ocaml@etorok.net \
    --cc=caml-list@inria.fr \
    --cc=rich@annexia.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).