OCamlPro / ocaml-top

A simple cross-platform OCaml code editor built for top-level evaluation.
http://typerex.org/ocaml-top.html
GNU General Public License v3.0
64 stars 8 forks source link

Installing fails in Ubuntu (Trusty) #51

Closed AllanDaemon closed 3 years ago

AllanDaemon commented 9 years ago

I'm using a almost fresh installed installation of Ubuntu 14.04 (Trusty) 64bits, all up to date.

I'm trying install the ocaml-top folling the guide Documentation > Installation in this page: http://www.typerex.org/ocaml-top.html

I'm using the ppa:avsm/ppa version of opam, m4 and libgtksourceview2.0-dev as indicated in the guide.

I already tried many things to been able to install ocaml-top, but everything had failed.

The opam version:

$ opam --version
1.2.0

If I follows the guide in the opam part, this whats happens

$ opam init default 4.01.0+ocp-bin
(...)

$ opam update
[default] Synchronizing with /home/user/4.01.0+ocp-bin
Updating ~/.opam/repo/compiler-index ...
Updating ~/.opam/compilers/ ...
Updating ~/.opam/repo/package-index ...
Updating ~/.opam/packages/ ...

$ opam install ocaml-top
[ERROR] No package named ocaml-top found.

I also tried the following, using a normal init. I always clean the ~/.opam to reset the state when trying over again.

$ opam init
Checking for available remotes: rsync and local, git, darcs.
[NOTE] hg not found, you won't be able to use mercurial repositories unless you install it.
[default] Downloading https://opam.ocaml.org/urls.txt
[default] Downloading https://opam.ocaml.org/index.tar.gz
Updating ~/.opam/repo/compiler-index ...
Updating ~/.opam/compilers/ ...
Updating ~/.opam/repo/package-index ...
Updating ~/.opam/packages/ ...
The following actions will be performed:
 - install   base-unix.base
 - install   base-bigarray.base
 - install   base-threads.base
=== 3 to install ===

=-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

=-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Installing base-bigarray.base.
Installing base-threads.base.
Installing base-unix.base.

In normal operation, OPAM only alters files within ~/.opam.

During this initialisation, you can allow OPAM to add information to two
other files for best results. You can also make these additions manually
if you wish.

If you agree, OPAM will modify:

  - ~/.bashrc (or a file you specify) to set the right environment
    variables and to load the auto-completion scripts for your shell (bash)
    on startup. Specifically, it checks for and appends the following line:

    . /home/user/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true

  - ~/.ocamlinit to ensure that non-system installations of `ocamlfind`
    (i.e. those installed by OPAM) will work correctly when running the
    OCaml toplevel. It does this by adding $OCAML_TOPLEVEL_PATH to the list
    of include directories.

If you choose to not configure your system now, you can either configure
OPAM manually (instructions will be displayed) or launch the automatic setup
later by running:

   opam config setup -a

Do you want OPAM to modify ~/.bashrc and ~/.ocamlinit?
(default is 'no', use 'f' to name a file other than ~/.bashrc)
    [N/y/f] y

User configuration:
  ~/.ocamlinit is already up-to-date.
  ~/.bashrc is already up-to-date.
Global configuration:
  Updating ~/.opam/opam-init/init.sh
    auto-completion : [true]
    opam-switch-eval: [true]
  Updating ~/.opam/opam-init/init.zsh
    auto-completion : [true]
    opam-switch-eval: [true]
  Updating ~/.opam/opam-init/init.csh
    auto-completion : [true]
    opam-switch-eval: [true]
  Updating ~/.opam/opam-init/init.fish
    auto-completion : [true]
    opam-switch-eval: [true]
# To setup the new switch in the current shell, you need to run:
eval `opam config env`

$ opam config env
CAML_LD_LIBRARY_PATH="/home/user/.opam/system/lib/stublibs:/usr/lib/ocaml/stublibs"; export CAML_LD_LIBRARY_PATH;
MANPATH="/home/user/.opam/system/man:"; export MANPATH;
MAKELEVEL=""; export MAKELEVEL;
MAKEFLAGS=""; export MAKEFLAGS;
PERL5LIB="/home/user/.opam/system/lib/perl5"; export PERL5LIB;
OCAML_TOPLEVEL_PATH="/home/user/.opam/system/lib/toplevel"; export OCAML_TOPLEVEL_PATH;
PATH="/home/user/.opam/system/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"; export PATH;

$ eval `opam config env`

$ opam install ocaml-top
The following actions will be performed:
 - install   ocamlfind.1.5.5                       [required by ocp-build, lablgtk]
 - install   camlp4.4.01.0                         [required by ocp-build, lablgtk]
 - install   conf-gtksourceview.2                  [required by ocaml-top]
 - install   cmdliner.0.9.7                        [required by ocp-index, ocp-indent]
 - install   base-bytes.legacy                     [required by re]
 - install   ocp-build.1.99.9-beta                 [required by ocaml-top]
 - install   lablgtk.2.18.3                        [required by ocaml-top]
 - install   re.1.3.1                              [required by ocp-index]
 - install   ocp-indent.1.5                        [required by ocaml-top]
 - install   ocp-index.1.1.1                       [required by ocaml-top]
     To install ocp-browser, please install lambda-term.
 - install   ocaml-top.1.1.2
=== 11 to install ===
Do you want to continue ? [Y/n] n

$ opam update
[default] Downloading https://opam.ocaml.org/urls.txt
Updating ~/.opam/repo/compiler-index ...
Updating ~/.opam/compilers/ ...
Updating ~/.opam/repo/package-index ...
Updating ~/.opam/packages/ ...

$ opam install ocaml-top
The following actions will be performed:
 - install   ocamlfind.1.5.5                       [required by ocp-build, lablgtk]
 - install   camlp4.4.01.0                         [required by ocp-build, lablgtk]
 - install   conf-gtksourceview.2                  [required by ocaml-top]
 - install   cmdliner.0.9.7                        [required by ocp-index, ocp-indent]
 - install   base-bytes.legacy                     [required by re]
 - install   ocp-build.1.99.9-beta                 [required by ocaml-top]
 - install   lablgtk.2.18.3                        [required by ocaml-top]
 - install   re.1.3.1                              [required by ocp-index]
 - install   ocp-indent.1.5                        [required by ocaml-top]
 - install   ocp-index.1.1.1                       [required by ocaml-top]
     To install ocp-browser, please install lambda-term.
 - install   ocaml-top.1.1.2
=== 11 to install ===
Do you want to continue ? [Y/n] 

=-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] Downloading https://opam.ocaml.org/archives/cmdliner.0.9.7+opam.tar.gz
[default] Downloading https://opam.ocaml.org/archives/lablgtk.2.18.3+opam.tar.gz
[default] Downloading https://opam.ocaml.org/archives/ocaml-top.1.1.2+opam.tar.gz
[default] Downloading https://opam.ocaml.org/archives/ocamlfind.1.5.5+opam.tar.gz
[default] Downloading https://opam.ocaml.org/archives/ocp-build.1.99.9-beta+opam.tar.gz
[default] Downloading https://opam.ocaml.org/archives/ocp-indent.1.5+opam.tar.gz
[default] Downloading https://opam.ocaml.org/archives/ocp-index.1.1.1+opam.tar.gz
[default] Downloading https://opam.ocaml.org/archives/re.1.3.1+opam.tar.gz

=-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Installing camlp4.4.01.0.
Building cmdliner.0.9.7:
  ocaml pkg/git.ml
  ocaml pkg/build.ml native=true native-dynlink=true
Installing cmdliner.0.9.7.
Building conf-gtksourceview.2:
  pkg-config gtksourceview-2.0
Installing conf-gtksourceview.2.
Building ocamlfind.1.5.5:
  ./configure -bindir /home/user/.opam/system/bin -sitelib /home/user/.opam/system/lib -mandir /home/user/.opam/system/man -config /home/user/.opam/system/lib/findlib.conf -no-topfind
  make all
  make opt
  make install
Installing ocamlfind.1.5.5.
Installing base-bytes.legacy.
Applying lablgldir.patch.
Building lablgtk.2.18.3:
  ./configure --prefix /home/user/.opam/system LABLGLDIR=/home/user/.opam/system/lib/lablgl
  make world
  make install
Installing lablgtk.2.18.3.
Building ocp-build.1.99.9-beta:
  ./configure --prefix /home/user/.opam/system
  make
  make install
[ERROR] The compilation of ocp-build.1.99.9-beta failed.
Removing ocp-build.1.99.9-beta.
  rm -f /home/user/.opam/system/bin/ocp-build
  rm -f /home/user/.opam/system/lib/ocaml/typerex/ocp-build/ocaml.ocp
  rm -f /home/user/.opam/system/lib/ocaml/typerex/ocp-build/camlp4.ocp
Building re.1.3.1:
  ocaml setup.ml -configure --prefix /home/user/.opam/system
  ocaml setup.ml -build
  ocaml setup.ml -install
Installing re.1.3.1.

#=== ERROR while installing ocp-build.1.99.9-beta =============================#
# opam-version 1.2.0
# os           linux
# command      make
# path         /home/user/.opam/system/build/ocp-build.1.99.9-beta
# compiler     system (4.01.0)
# exit-code    2
# env-file     /home/user/.opam/system/build/ocp-build.1.99.9-beta/ocp-build-24453-d4902a.env
# stdout-file  /home/user/.opam/system/build/ocp-build.1.99.9-beta/ocp-build-24453-d4902a.out
# stderr-file  /home/user/.opam/system/build/ocp-build.1.99.9-beta/ocp-build-24453-d4902a.err
### stdout ###
# ...[truncated]
# configure: creating ./config.status
# config.status: creating Makefile
# config.status: creating ../src/ocp-build-bundle.ocp
# 
# Executables will be installed in /home/user/.opam/system/bin
# Libraries will be installed in /home/user/.opam/system/lib/ocaml/typerex
# Data files will be installed in /home/user/.opam/system/share/typerex
# Manual pages will be installed in /home/user/.opam/system/share/man
# Creating root directory _obuild/
# ocamllex.opt src/ocplib/lang/ocamllexer.mll
### stderr ###
# config.status: WARNING:  '../src/ocp-build-bundle.ocp.in' seems to ignore the --datarootdir setting
# make: ocamllex.opt: Command not found
# make: *** [src/ocplib/lang/ocamllexer.ml] Error 127

=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
These actions have been completed successfully
 - install   base-bytes.legacy
 - install   re.1.3.1
 - install   lablgtk.2.18.3
 - install   cmdliner.0.9.7
 - install   conf-gtksourceview.2
 - install   camlp4.4.01.0
 - install   ocamlfind.1.5.5
The following failed
 - install   ocp-build.1.99.9-beta
Due to the errors, the following have been cancelled
 - install   ocp-indent.1.5
 - install   ocaml-top.1.1.2
 - install   ocp-index.1.1.1

The former state can be restored with opam switch import "/home/user/.opam/system/backup/state-20150307032625.export"
AltGr commented 9 years ago

Thanks for the detailed report !

AllanDaemon commented 3 years ago

Closing this as this isn't relevant anymore (trusty is no longer used)