caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alessandro Baretta <alex@baretta.com>
To: Gerd Stolpmann <info@gerd-stolpmann.de>, Ocaml <caml-list@inria.fr>
Subject: [Caml-list] Meta module in findlib and the need for namespaces
Date: Tue, 17 Sep 2002 16:47:09 +0200	[thread overview]
Message-ID: <3D87406D.9010406@baretta.com> (raw)

There seems to be an incompatibility between dynlink.cma and 
findlib. The following text shows a sample toplevel session 
where you can see how linking to "dynlink.cma" is rendered 
impossible by the presence of the findlib module.

         Objective Caml version 3.06

# #use "topfind";;
Findlib has been successfully loaded. Additional directives:
   #require "package";;      to load a package
   #list;;                   to list the available packages
   #camlp4o;;                to load camlp4 (standard syntax)
   #camlp4r;;                to load camlp4 (revised syntax)
   Topfind.reset();;         to force that packages will be 
reloaded

- : unit = ()
# #require "afo";;
Loading /usr/lib/ocaml/site-lib/pcre/pcre.cma
Loading /usr/lib/ocaml/unix.cma
Loading /usr/lib/ocaml/site-lib/netstring/netstring.cma
Loading /usr/lib/ocaml/site-lib/netstring/netmappings_iso.cmo
Loading /usr/lib/ocaml/site-lib/netstring/netmappings_other.cmo
Loading /usr/lib/ocaml/site-lib/netstring/netstring_top.cmo
Loading /usr/lib/ocaml/site-lib/pxp-engine/pxp_engine.cma
Loading /usr/lib/ocaml/site-lib/pxp-engine/pxp_top.cmo
Loading 
/usr/lib/ocaml/site-lib/pxp-lex-iso88591/pxp_lex_iso88591.cma
Loading 
/usr/lib/ocaml/site-lib/pxp-lex-iso88591/pxp_lex_link_iso88591.cmo
Loading /usr/lib/ocaml/site-lib/pxp-lex-utf8/pxp_lex_utf8.cma
Loading 
/usr/lib/ocaml/site-lib/pxp-lex-utf8/pxp_lex_link_utf8.cmo
*Loading /usr/lib/ocaml/dynlink.cma*
Files /usr/lib/ocaml/dynlink.cma
and /usr/lib/ocaml/site-lib/findlib/findlib.cma
make inconsistent assumptions over interface Meta

This seems to imply that a Meta module is already defined in 
  dynlink.cma, and that such module is different from that 
referenced by findlib. I have no evidence to prove this 
point though, for I have not found in the Ocaml sources 
where a Meta module is defined.

***

This incompatibility between findlib and dynlink is the 
first example I have encountered of a nameclash bug in Ocaml 
software. Of course, Gerd could easily solve the problem by 
renaming his Meta to Findlib_meta, or something like that, 
but it would be a lot easier to have a namespace construct 
to allow Gerd to distinguish *his* Meta from the one in the 
standard library.

Cheers to everyone,
Alex

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2002-09-17 14:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-17 14:47 Alessandro Baretta [this message]
2002-09-22 21:29 ` Gerd Stolpmann
2002-09-23  8:43   ` We should start using -pack by default when building libraries, (was : Re: [Caml-list] Meta module in findlib and the need for namespaces) Sven LUTHER
2002-09-23 14:36     ` Xavier Leroy
2002-09-24  6:30       ` Sven LUTHER
2002-09-25  4:48         ` [Caml-list] Re: We should start using -pack by default when building libraries, (was : " Michaël Grünewald
2002-09-25  9:32           ` Sven LUTHER
2002-09-25 19:33             ` Michaël Grünewald
2002-09-26 11:00               ` Sven
2002-09-29  5:27                 ` Michaël Grünewald
2002-09-23 15:03     ` [Caml-list] Re: We should start using -pack by default when building libraries John Carr

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=3D87406D.9010406@baretta.com \
    --to=alex@baretta.com \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    /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).