Hi Thomas,

I just realized this isn't specific to Eclipse at all.  Typing ocaml in the terminal gives the same error:

        OCaml version 4.00.1

Cannot find file topfind.
Unknown directive `camlp4o'.

I am definitely running "eval `opam config env`" as well it is in my .bash_profile

When I try: opam install findlib
findlib is not a valid versioned package name
'opam install findlib' failed.

The information about any of this on google is extremely scarce. I've installed three versions of the compiler so far and all have given me this error.

As I noted earlier, I've tried make installing findlib from the source.  

There is a topfind in the 4.01.0dev+trunk/lib/toplevel directory but it wasn't working when the system was set to that compiler.  I've tried moving the file to 4.00.1 but it give an error about being the wrong version.

copy/pasting the let()=.... into the ocaml in the terminal had no effect.

Any other idea as to what might be wrong?



On Tue, Aug 20, 2013 at 12:09 PM, Thomas Gazagnaire <thomas@ocamlpro.com> wrote:
> I built the latest dev on osx and also installed the ocaml binaries.  I am getting errors with OcaIDE. Eclipse:

You need to tell Eclipse/OcaIDE to load the right environment variables (to locate your OPAM installation).

I am not very used to OcaIDE so I can't help you much there, but I can suggest few workaround:

- start Eclipse on the command-line -- be sure to have "eval `opam config env`" before. It it works that means that your application is not run with the right environment variables -- dunno how to fix this properly on OSX.

- copy paste:
> let () =
>   try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
>   with Not_found -> ()
directly in the Eclipse top-level, and run "#load "topfind" again. If it works, that means that OCaIDE is not loading ~/.ocamlinit (a bug worth reporting upstream)

- change the path of ocaml& ocamlc/ocamlopt in some OcaIDE menus to hard-code /Users/caseybasichis/.opam/4.01.0dev+trunk/bin/ocaml{,c,opt}

Hope this help,

Thomas

> OCaml version 4.00.1
> Cannot find file topfind.
>
> Unknown directive `camlp4o'.
>
> #
>
> I've tried a number of things to get it going to no avail.
>
> I added the following to ~/.ocamlinit :
> let () =
>   try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
>   with Not_found -> ()
>
> to ~/.bash_profile I added :
>
> export OCAML_TOPLEVEL_PATH=/Users/caseybasichis/.opam/4.01.0dev+trunk/lib/toplevel
> eval `opam config env`
>
> I also tried adding those to ~/.profile
>
> I also tried building and make installing findlib-1.4
>
> If you have any ideas of how I might get this running I would greatly appreciate it, I am very much looking forward to hello world hallelujah.
>
> Thanks,
> Casey
>
> --
> Casey James Basichis
> Composer - Adventure Time - Cartoon Network
> http://www.caseyjamesbasichis.com
> caseybasichis@gmail.com
> 310.387.7540




--
Casey James Basichis
Composer - Adventure Time - Cartoon Network
http://www.caseyjamesbasichis.com
caseybasichis@gmail.com
310.387.7540