andrewray / iocaml

An OCaml kernel for the IPython notebook
MIT License
193 stars 20 forks source link

iOCaml from OPAM, not compiling due to ocp-build -init: unknown option `-install-lib' #24

Closed heidihoward closed 10 years ago

heidihoward commented 10 years ago

The version of ocp-index required by iOCaml, no longer works with lastest ocaml-build in OPAM

$ opam install ocp-indent
[NOTE] Package ocp-indent is already installed (current version is 1.4.2).

$ opam install iocaml
The following actions will be performed:
 - install ocp-index.1.0.2 [required by iocaml]
 - install iocaml-kernel.0.4.4 [required by iocaml]
 - install iocaml.0.4.5
3 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
Do you want to continue ? [Y/n] y

=-=-= Installing ocp-index.1.0.2 =-=-=
Building ocp-index.1.0.2:
  ./configure --prefix /Users/heidi/.opam/4.01.0
  make
[ERROR] The compilation of ocp-index.1.0.2 failed.
Removing ocp-index.1.0.2.

[ERROR] Due to some errors while processing ocp-index.1.0.2, the following actions will NOT proceed:
 - install iocaml.0.4.5
 - install iocaml-kernel.0.4.4

===== ERROR while installing ocp-index.1.0.2 =====
# opam-version 1.1.2
# os           darwin
# command      make
# path         /Users/heidi/.opam/4.01.0/build/ocp-index.1.0.2
# compiler     4.01.0
# exit-code    2
# env-file     /Users/heidi/.opam/4.01.0/build/ocp-index.1.0.2/ocp-index-40560-5f1023.env
# stdout-file  /Users/heidi/.opam/4.01.0/build/ocp-index.1.0.2/ocp-index-40560-5f1023.out
# stderr-file  /Users/heidi/.opam/4.01.0/build/ocp-index.1.0.2/ocp-index-40560-5f1023.err
### stdout ###
# ...[truncated]
# checking for ocamldoc... ocamldoc
# checking for ocamlbuild... ocamlbuild
# checking for ocamlfind... ocamlfind
# checking for OCaml findlib package cmdliner... found
# checking for OCaml findlib package curses... not found
# configure: creating ./config.status
# config.status: creating Makefile.config
# 
# Executables will be installed in /Users/heidi/.opam/4.01.0/bin
# ocp-build -init -install-lib /Users/heidi/.opam/4.01.0/lib/ocp-index
### stderr ###
# ...[truncated]
# ocp-build -init: unknown option `-install-lib'.
# Command:
#   ocp-build -init [OPTIONS] 
# 
# Set the root of a project.
# 
# Available options in this mode:
#   -help  Display this list of options
#   --help  Display this list of options
# make: *** [ocp-build.root] Error 2

'opam install iocaml' failed.
andrewray commented 10 years ago

The latest ocp-build is causing a few problems with ocp-index ocaml/opam-repository#2540. The new release of iocaml will also fix this by making ocp-index optional ocaml/opam-repository#2549.

In the meantime hopefully this will get things working again

opam install iocaml.0.4.5 ocp-build.1.99.6-beta
heidihoward commented 10 years ago

thanks, unfortunately not

$ opam install iocaml.0.4.5 ocp-build.1.99.6-beta
The following actions will be performed:
 - install ocp-build.1.99.6-beta [required by iocaml]
 - install ocp-indent.1.4.2 [required by iocaml]
 - install ocp-index.1.0.2 [required by iocaml]
 - install iocaml-kernel.0.4.4 [required by iocaml]
 - install iocaml.0.4.5
5 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
Do you want to continue ? [Y/n] y

=-=-= Installing ocp-build.1.99.6-beta =-=-=
Installing ocp-build.1.99.6-beta.

=-=-= Installing ocp-indent.1.4.2 =-=-=
Building ocp-indent.1.4.2:
  ./configure --prefix /Users/heidi/.opam/4.01.0
  make
[ERROR] The compilation of ocp-indent.1.4.2 failed.
Removing ocp-indent.1.4.2.

[ERROR] Due to some errors while processing ocp-indent.1.4.2, the following actions will NOT proceed:
 - install iocaml.0.4.5
 - install iocaml-kernel.0.4.4
 - install ocp-index.1.0.2

===== ERROR while installing ocp-indent.1.4.2 =====
# opam-version 1.1.2
# os           darwin
# command      make
# path         /Users/heidi/.opam/4.01.0/build/ocp-indent.1.4.2
# compiler     4.01.0
# exit-code    2
# env-file     /Users/heidi/.opam/4.01.0/build/ocp-indent.1.4.2/ocp-indent-58735-58c514.env
# stdout-file  /Users/heidi/.opam/4.01.0/build/ocp-indent.1.4.2/ocp-indent-58735-58c514.out
# stderr-file  /Users/heidi/.opam/4.01.0/build/ocp-indent.1.4.2/ocp-indent-58735-58c514.err
### stdout ###
# ...[truncated]
# checking for ocamldep... ocamldep
# checking for ocamlmktop... ocamlmktop
# checking for ocamlmklib... ocamlmklib
# checking for ocamldoc... ocamldoc
# checking for ocamlbuild... ocamlbuild
# configure: creating ./config.status
# config.status: creating Makefile.config
# config.status: creating version.ocp
# 
# Executables will be installed in /Users/heidi/.opam/4.01.0/bin
### stderr ###
# Error: you need ocp-build >= 1.99.
# make: *** [ocp-build.root] Error 1

I'ved tried compiling ocp-indent first using the most upto date version of ocp-build but iocaml just recompiles it

heidihoward commented 10 years ago

I've got it going using the steps from https://github.com/ocaml/opam-repository/commit/55042c39fcef4f8b1c4e5db7b1120180bab05921#commitcomment-7540530 before installing iocaml

andrewray commented 10 years ago

Ah, ok. I was testing with opam-1.2-beta and it seemed to manage it.

Either way, ocp-index.1.0.3 is out which should fix this and iocaml.0.4.6 isn't far off which will also fix things.