[opam-devel] opam installs package but ocamlfind fails

Ashish Agarwal agarwal1975 at gmail.com
Sun Apr 7 19:51:59 BST 2013


On Tue, Apr 2, 2013 at 3:52 AM, Thomas Gazagnaire <thomas at ocamlpro.com>wrote:


> In an init script, you don't need to eval `opam config env`, you can just
> source ~/.opam/opam-config/init.sh.


I don't see how this is possible. My variables.sh file is:

$ cat variables.sh
CAML_LD_LIBRARY_PATH=/Users/ashish/.opam/4.00.1/lib/stublibs; export
CAML_LD_LIBRARY_PATH;
OCAML_TOPLEVEL_PATH=/Users/ashish/.opam/4.00.1/lib/toplevel; export
OCAML_TOPLEVEL_PATH;
MANPATH=/Users/ashish/.opam/4.00.1/man:$MANPATH; export MANPATH;
PATH=/Users/ashish/.opam/4.00.1/bin:$PATH; export PATH;

All path variables have a specific switch hardcoded in. When I do `opam
switch foo`, these paths will be wrong.



> And after a switch you still need eval, because you want to dynamically
> rewrite the contents of some of your variables


Right, so thus I have to eval `opam config env` in my login scripts too.
Otherwise, my path variables will always be whatever is in the above
variables.sh script.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/opam-devel/attachments/20130407/1b4dfa70/attachment.html>


More information about the opam-devel mailing list