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

Re: ocaml-ldconf problems on Woody



On Wed, Dec 25, 2002 at 10:00:08AM -0500, Oleg wrote:
> a) After `apt-get install libpcre-ocaml-dev`, 
> `ocaml-ldconf -a /usr/lib/ocaml/pcre` has to be run for
> `ocaml-ldconf -l` to list it

/usr/lib/ocaml/pcre should not be listed by 'ocaml-ldconf -l' because
PCRE's .so is now installed in /usr/lib/ocaml/stublibs (well, this is
true on Woody, on sid it's now installed in
/usr/lib/ocaml/3.06/stublibs) which as you can test is listed by
'ocaml-ldconf -l'.

> $ ledit /usr/bin/ocaml
>         Objective Caml version 3.06
> 
> # #load "pcre.cma";;
> Cannot find file pcre.cma.
> # #load "pcre/pcre.cma";;
> # open Pcre;;
> Unbound module Pcre

Try this easier way, just tested on a woody box which use the same
apt-gettable repository you are using:

   $ ledit ocaml
           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 "pcre";;
   Loading /usr/lib/ocaml/pcre/pcre.cma
   # open Pcre;;

This is easier because the first '#use' statement loads findlib's stuff
which is able to understand information stored in META files like 'home'
directory for each libraries and additional linking options. Having
access to this kind of information '#require' statement need fewer
information from the user ...

Cheers.

-- 
Stefano Zacchiroli  -  Undergraduate Student of CS @ Uni. Bologna, Italy
 zack@{cs.unibo.it,debian.org,bononia.it} - http://www.bononia.it/zack/
 "I know you believe you understood what you think I said, but I am not
 sure you realize that what you heard is not what I meant!" -- G.Romney



Reply to: