[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ocamlfind configuration



On Fri, Jan 23, 2004 at 11:16:53AM +0200, Johann Spies wrote:
> On Debian unstable I so far could not succeed to get ocamlfind to work
> in the toplevel.
> 
> I have changed the following line in /etc/ocamlfind:
> 
> destdir="/usr/local/lib/ocaml/3.07" to 
> destdir="/usr/lib/ocaml/3.07:/usr/local/lib/ocaml/3.07" 

The above setting is incorrect, AFAIK destdir should be a single dir and
not a list of them. The default setting
(destdir="/usr/local/lib/ocaml/3.07") should be the correct one. Also
please note that the "destdir" variable is used by findlib only when you
do issua an "ocamlfind install" command without providing a "-destdir"
switch. If you're using just debian packages this setting is completely
useless.

> % ledit ocaml
>        Objective Caml version 3.07+2
> # #use "ocamlfind";;
> Cannot find file ocamlfind

If you just want to load ocamlfind extension to the ocaml toplevel the
correct command is #use "topfind". IIRC it was renamed by upstream from
"ocamlfind" to "topfind" a while ago.

  $ ledit ocaml
          Objective Caml version 3.07+2
   
  # #use "topfind";;
  - : unit = ()
  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)
    #predicates "p,q,...";;   to set these predicates
    Topfind.reset();;         to force that packages will be reloaded
    #thread;;                 to enable threads
   
  - : unit = ()
  #

You can also add it to your ~/.ocamlinit:

  $ cat ~/.ocamlinit
  #use "topfind";;

> Can you help me to correct this please?  On Sarge everything is
> working as expected.

Are you sure?, it sounds a bit strange to me. If this is indeed the case
there used to be a symlink /usr/lib/ocaml/3.07/ocamlfind -> topfind that
was not preserved in the last findlib package. I can add it also in the
last one if needed ...

Cheers.

-- 
^Stefano Zacchiroli - Computer Science PhD student @ Uny Bologna, Italy$
^zack@{cs.unibo.it,debian.org,bononia.it} -- http://www.bononia.it/zack$
^Frequentando il mio maestro mi ero reso conto [.] che la logica poteva$
^servire a molto a condizione di entrarci dentro e poi di uscirne -Adso$

Attachment: signature.asc
Description: Digital signature


Reply to: