ocaml-obuild / obuild

simple package build system for ocaml
BSD 2-Clause "Simplified" License
55 stars 20 forks source link

META search paths #27

Open mor1 opened 11 years ago

mor1 commented 11 years ago

i seem to be getting the following error using obuild (to configure or build a project), for any obuild project:

warning: obuild META search paths and ocaml config mismatch

The ocamlfind configuration file used doesn't list the ocaml standard library as part of his search paths. something fishy is going on You can solve the issue by:

  • pointing OCAMLFIND_CONF environment to the right configuration file
  • making sure that the ocamlfind program in your path is the right one (ocamlfind printconf)

    this is likely to cause various compilation problems

i've checked that i've done eval $(opam config env) etc as appropriate. using the latest obuild available via opam.

vincenthz commented 11 years ago

Hm, I don't have much way to detect this problem, which only happens in early stage of an opam setup, when you have a system ocamlfind installation, but not ocamlfind for opam yet. obuild will get the system findlib.conf and get library from the wrong place.

@samoht: could you just add the ocaml stdlib path to findlib.conf 's path as an extra ?

mor1 commented 11 years ago

possibly the issue here then is that i'm using the system compiler (managed solely via opam) -- ocamlfind is at /Users/mort/.opam/system/bin/ocamlfind but ocamlc is at /usr/local/bin/ocamlc ?

it certainly is happening all the time in this scenario though -- this isn't just as part of a new install.

On 20 March 2013 17:05, Vincent Hanquez notifications@github.com wrote:

Hm, I don't have much way to detect this problem, which only happens in early stage of an opam setup, when you have a system ocamlfind installation, but not ocamlfind for opam yet. obuild will get the system findlib.conf and get library from the wrong place.

@samoht https://github.com/samoht: could you just add the ocaml stdlib path to findlib.conf 's path as an extra ?

— Reply to this email directly or view it on GitHubhttps://github.com/vincenthz/obuild/issues/27#issuecomment-15189103 .

Richard Mortier mort@cantab.net

UnixJunkie commented 8 years ago

I suspect this can be closed. It looks like an opam problem: having the ocaml compiler not installed by opam is a route for troubles in my own experience.