Skip to content

Commit

Permalink
Fix the 3.12.1 compiler to install compiler-libs correctly inside oca…
Browse files Browse the repository at this point in the history
…ml/lib/compiler-libs during the switch phase.

There are now 4 combinations of possible compiler-libs:

system 3.12.1 + utop = user must install local compiler-libs (tested with debian, works great)
switched 3.12.1 + utop = this patch installs correct compiler-libs (test here, works)
system 4.00 + utop = includes compiler-libs
switched 4.00 + utop = includes compiler-libs

Previously, the compiler-lib.3.12.1 package would install them inside .opam/3.12.1/lib/compiler-libs, which would break with the system compiler (where it is expected to be in the system ocamlc by config scripts).

This addresses OCamlPro/opam-repository#108 partially. We may also need to do:
* change compiler-libs.3.12.1 to detect if compiler-libs is installed with a system compiler, and prompt the user to take care of it if not (e.g. via `apt-get install ocaml-compiler-libs`)
* remove the compiler-libs packages as being unnecessary, as we can now assume they are always present. This solves an expensive build-time dependency with utop...
* remove other references in packages to compiler-libs and test them.
  • Loading branch information
avsm committed Oct 7, 2012
1 parent ba02708 commit c07fcd3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion compilers/3.12.1.comp
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
opam-version: "1"
name: "3.12.1"
src: "http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12.1.tar.gz"
make: [ "world" "world.opt" ]
build: [
["./configure" "-prefix" "%{prefix}%"]
["make" "world"]
["make" "world.opt"]
["make" "install"]
["mkdir" "-p" "%{prefix}%/lib/ocaml/compiler-libs"]
["cp" "-r" "typing" "parsing" "utils" "%{prefix}%/lib/ocaml/compiler-libs/"]
]
packages : [ "base-unix" "base-bigarray" "base-threads" ]
env: [
[ CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs" ]
Expand Down
2 changes: 1 addition & 1 deletion packages/utop.1.2.1/opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ build: [
remove: [
["ocamlfind" "remove" "utop"]
]
depends: ["ocamlfind" "compiler-libs" "zed" "lambda-term"]
depends: ["ocamlfind" "zed" "lambda-term"]

0 comments on commit c07fcd3

Please sign in to comment.