[opam-devel] opam installs package but ocamlfind fails

Ashish Agarwal agarwal1975 at gmail.com
Mon Apr 1 14:28:21 BST 2013


I've managed to confuse opam.

$ opam switch
utrome3  C 4.00.1                     Official 4.00.1 release
4.00.1   I 4.00.1                     Official 4.00.1 release

So you can see I'm on the "utrome3" switch (an alias to 4.00.1), but:

$ which ocamlfind
~/.opam/4.00.1/bin/ocamlfind

So my environment variable are out of sync with the current switch.

I used to do "eval `opam config eval`" in my login scripts, but I thought
the below meant I should now just source ~/.opam/opam-init/init.sh. This
can't be right though because, after looking into opam-init.sh, I see that
setting environment variables to the 4.00.1 switch (the initial switch I
installed) is hardcoded.

Could we get some clarification on what the init.sh script is supposed to
do exactly. Is calling "eval `opam config eval`" still required in our
login scripts? If so, note that `opam init --auto-setup` doesn't do that.


On Thu, Mar 14, 2013 at 4:28 PM, Thomas Gazagnaire <thomas at ocamlpro.com>
 wrote:

> ...

The most visible new feature, which should be useful for beginners with
> OCaml and OPAM,  is an auto-configuration tool. This tool easily enables
> all the features of OPAM (auto-completion, fix the loading of scripts for
> the toplevel, opam-switch-eval alias, etc). This tool runs interactively on
> each `opam init` invocation. If you don't like OPAM to change your
> configuration files, use `opam init --no-setup`. If you trust the tool
> blindly,  use `opam init --auto-setup`. You can later review the setup by
> doing `opam config setup --list` and call the tool again using `opam config
> setup` (and you can of course manually edit your ~/.profile (or ~/.zshrc
> for zsh users), ~/.ocamlinit and ~/.opam/opam-init/*). ...
>



On Sun, Mar 31, 2013 at 10:01 AM, Nicolas Braud-Santoni <
nicolas at braud-santoni.eu> wrote:

> Did you check, using `which ocamlfind`, that you are indeed using the
> ocamlfind installation from OPAM ?
>
> On 30/03/2013 22:10, Ashish Agarwal wrote:
> > `opam install pxp` succeeds and `opam info pxp` shows that it is
> > installed. However,
> >
> > $ ocamlfind query pxp
> > ocamlfind: Package `pxp' not found
> >
> > This is only happening on one of my computers. On another, ocamlfind
> > does recognize pxp. I'm installing the same versions of all packages.
> > How can I investigate further?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/opam-devel/attachments/20130401/a8f5535f/attachment.html>


More information about the opam-devel mailing list