Dear Gabriel,

 

>Did you correctly run

>
>  eval $(opam config en)

I tried both (in a fresh shell). The effect is the same.

 

A question for my understanding: I assumed that for building something inside of opam this is not required. I thought I need to do this only when I use ocaml to build something outside of opam. This also matches my (very limited) experience with opam.

 

I try to find out what is going wrong here.

 

Best regards,

 

Michael

 

From: Gabriel Scherer [mailto:gabriel.scherer@gmail.com]
Sent: Saturday, June 25, 2016 5:37 PM
To: Soegtrop, Michael <michael.soegtrop@intel.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Building ocamlbuild with opam fails after opam switch <version>

 

This is a bug, but I think it is likely to be coming from a misconfiguration on your end: the preinstalled test checks
  $(ocamlc -where)/ocamlbuild
and if you are in a non-system switch this should not be /usr/local/lib/ocaml.

Did you correctly run


  eval $(opam config en)

after switching?

 

On Sat, Jun 25, 2016 at 9:57 AM, Soegtrop, Michael <michael.soegtrop@intel.com> wrote:

Dear OCaml Users,

 

Opam works fine for me with the system installed OCaml, but after an opam switch I cannot build ocamlbuild or any package depending on it any more.

 

Building ocamlbuild fails because it explicitly checks if there is already a system installed ocamlbuild:

 

# ERROR: Preinstalled ocamlbuild detected at /usr/local/lib/ocaml/ocamlbuild

# Installation aborted; if you want to bypass this safety check, pass CHECK_IF_PREINSTALLED=false to make

# make: *** [Makefile:333: check-if-preinstalled] Error 2

 

Of cause I can just follow this advice and remove this check, but I wonder how others handle this.

 

Best regards,

 

Michael

 

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

 

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928